From: Jude Shih <shenshih@xxxxxxx> [Why] Condition variable sometimes terminated unexpectedly [How] Use wait_for_completion_timeout to avoid unexpected termination of CV Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@xxxxxxx> Acked-by: Wayne Lin <Wayne.Lin@xxxxxxx> Signed-off-by: Jude Shih <shenshih@xxxxxxx> --- 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 cbf83a6e56b9..2962123b5f7e 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -11398,8 +11398,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); -- 2.25.1