summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2023-03-06 02:40:59 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2023-03-06 02:40:59 +0000
commit359a8eddf33e6f6d5041a450db4ac4b8961b43db (patch)
tree293c14a9d4c534c9ebffe2e3dfa51299895103e4
parent4b81830864ee6f35ae58419557e46105dc2f6b2e (diff)
drm/amd/display: Properly reuse completion structure
From Stylon Wang 118ad80d27d938868299ef184f7483b21f011f0b in linux-6.1.y/6.1.15 0cf8307adbc6beb5ff3b8a76afedc6e4e0b536a9 in mainline linux
-rw-r--r--sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c3
1 files changed, 3 insertions, 0 deletions
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;
}