From 809d5b2d2101b46c96299060ec7b658606bab599 Mon Sep 17 00:00:00 2001 From: Jude Shih Date: Wed, 29 Sep 2021 11:13:56 +0800 Subject: [PATCH] drm/amd/display: Fix USB4 Aux via DMUB terminate unexpectedly BugLink: https://bugs.launchpad.net/bugs/1951868 [Why] Condition variable sometimes terminated unexpectedly [How] Use wait_for_completion_timeout to avoid unexpected termination of CV Reviewed-by: Nicholas Kazlauskas Acked-by: Wayne Lin Acked-by: Harry Wentland Signed-off-by: Jude Shih Signed-off-by: Alex Deucher (cherry picked from commit 9e3a50d23e31d9fad2fe47529b3668cc83323762) Signed-off-by: Timo Aaltonen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index f1cc46e1bc5db..ff7de23030cef 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -11087,8 +11087,9 @@ int amdgpu_dm_process_dmub_aux_transfer_sync(bool is_cmd_aux, struct dc_context (uint32_t *)operation_result); } - ret = wait_for_completion_interruptible_timeout(&adev->dm.dmub_aux_transfer_done, 10*HZ); + ret = wait_for_completion_timeout(&adev->dm.dmub_aux_transfer_done, 10 * HZ); if (ret == 0) { + DRM_ERROR("wait_for_completion_timeout timeout!"); return amdgpu_dm_set_dmub_async_sync_status(is_cmd_aux, ctx, DMUB_ASYNC_TO_SYNC_ACCESS_TIMEOUT, (uint32_t *)operation_result);