aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWayne Lin <[email protected]>2020-08-18 03:19:42 +0000
committerAlex Deucher <[email protected]>2020-08-26 20:40:19 +0000
commitec314c4612653aaf6e8d6a7c23fed9b3f7a0039f (patch)
tree12ca67f2f39361717caa7d409471d9d542b2ac70
parentdrm/amdgpu: Fix buffer overflow in INFO ioctl (diff)
downloadkernel-ec314c4612653aaf6e8d6a7c23fed9b3f7a0039f.tar.gz
kernel-ec314c4612653aaf6e8d6a7c23fed9b3f7a0039f.zip
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 <[email protected]> Reviewed-by: Hersen Wu <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-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 bbc20834c643..bd477a166015 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)