This is a note to let you know that I've just added the patch titled drm/amd/display: Properly reuse completion structure to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-amd-display-properly-reuse-completion-structure.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 0cf8307adbc6beb5ff3b8a76afedc6e4e0b536a9 Mon Sep 17 00:00:00 2001 From: Stylon Wang <stylon.wang@xxxxxxx> Date: Tue, 10 Jan 2023 14:38:33 +0800 Subject: drm/amd/display: Properly reuse completion structure From: Stylon Wang <stylon.wang@xxxxxxx> commit 0cf8307adbc6beb5ff3b8a76afedc6e4e0b536a9 upstream. [Why] Connecting displays to TBT3 docks often produces invalid replies for DPIA AUX requests. It turns out the completion structure was not re-initialized before reusing it, resulting in immature wake up to completion. [How] Properly call reinit_completion() on reused completion structure. Cc: stable@xxxxxxxxxxxxxxx Reviewed-by: Solomon Chiu <solomon.chiu@xxxxxxx> Acked-by: Alan Liu <HaoPing.Liu@xxxxxxx> Signed-off-by: Stylon Wang <stylon.wang@xxxxxxx> Tested-by: Daniel Wheeler <daniel.wheeler@xxxxxxx> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> Cc: "Limonciello, Mario" <mario.limonciello@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -10249,6 +10249,7 @@ int amdgpu_dm_process_dmub_aux_transfer_ 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; } @@ -10276,6 +10277,8 @@ int amdgpu_dm_process_dmub_set_config_sy *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; } Patches currently in stable-queue which might be from stylon.wang@xxxxxxx are queue-6.1/drm-amd-display-properly-reuse-completion-structure.patch queue-6.1/drm-amd-display-fix-race-condition-in-dpia-aux-transfer.patch