From 359a8eddf33e6f6d5041a450db4ac4b8961b43db Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Mon, 6 Mar 2023 02:40:59 +0000 Subject: drm/amd/display: Properly reuse completion structure From Stylon Wang 118ad80d27d938868299ef184f7483b21f011f0b in linux-6.1.y/6.1.15 0cf8307adbc6beb5ff3b8a76afedc6e4e0b536a9 in mainline linux --- sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c index e08b0556d99..0f6d9ba64f0 100644 --- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -10256,6 +10256,7 @@ int amdgpu_dm_process_dmub_aux_transfer_sync( ret = p_notify->aux_reply.length; *operation_result = p_notify->result; out: + reinit_completion(&adev->dm.dmub_aux_transfer_done); mutex_unlock(&adev->dm.dpia_aux_lock); return ret; } @@ -10283,6 +10284,8 @@ int amdgpu_dm_process_dmub_set_config_sync( *operation_result = SET_CONFIG_UNKNOWN_ERROR; } + if (!is_cmd_complete) + reinit_completion(&adev->dm.dmub_aux_transfer_done); mutex_unlock(&adev->dm.dpia_aux_lock); return ret; } -- cgit v1.2.3