drm/amd/display: fix return value of dm_dp_aux_transfer()
Subsystems (3)
PATCH 1/1 drm/amd/display: fix return value of dm_dp_aux_transfer()
Currently the dm_dp_aux_transfer() does not parse
the return value of dal_ddc_service_read_dpcd_data(), which also has a failure case.
This patch captures the same and ensures the i2c operation status is sent provided appropriately to the callers to it.
Signed-off-by Shirish S <[email protected]>
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +5 -1
@@ -115,7 +115,11 @@ static ssize_t dm_dp_aux_transfer(struct drm_dp_aux *aux, msg->address, msg->buffer, msg->size); -return read_bytes; +if (read_bytes != msg->size && + read_bytes >=DDC_RESULT_FAILED_OPERATION ) +return -EIO ; +else +return read_bytes;case DP_AUX_I2C_WRITE : res = dal_ddc_service_write_dpcd_data( TO_DM_AUX(aux)->ddc_service,
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx