summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Lin <Wayne.Lin@amd.com>2020-08-18 06:19:42 +0300
committerAlex Deucher <alexander.deucher@amd.com>2020-08-26 22:45:51 +0300
commitef67d792a2fc578319399f605fbec2f99ecc06ea (patch)
tree8490fad1b186a4611338d2e202b78ecda3e5aa5e
parentb5b97cab55eb71daba3283c8b1d2cce456d511a1 (diff)
downloadlinux-ef67d792a2fc578319399f605fbec2f99ecc06ea.tar.xz
drm/amd/display: Retry AUX write when fail occurs
[Why] In dm_dp_aux_transfer() now, we forget to handle AUX_WR fail cases. We suppose every write wil get done successfully and hence some AUX commands might not sent out indeed. [How] Check if AUX_WR success. If not, retry it. Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Reviewed-by: Hersen Wu <hersenxs.wu@amd.com> Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index e85b58f0f416..336aaa09be46 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -67,7 +67,7 @@ static ssize_t dm_dp_aux_transfer(struct drm_dp_aux *aux,
result = dc_link_aux_transfer_raw(TO_DM_AUX(aux)->ddc_service, &payload,
&operation_result);
- if (payload.write)
+ if (payload.write && result >= 0)
result = msg->size;
if (result < 0)