Commit 5a384664 authored by Wayne Lin's avatar Wayne Lin Committed by Alex Deucher
Browse files

drm/amd/display: Shift DMUB AUX reply command if necessary



[Why]
Defined value of dmub AUX reply command field get updated but didn't
adjust dm receiving side accordingly.

[How]
Check the received reply command value to see if it's updated version
or not. Adjust it if necessary.

Fixes: ead08b95 ("drm/amd/display: Fix race condition in DPIA AUX transfer")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarRay Wu <ray.wu@amd.com>
Signed-off-by: default avatarWayne Lin <Wayne.Lin@amd.com>
Signed-off-by: default avatarRay Wu <ray.wu@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
(cherry picked from commit d5c9ade7)
Cc: stable@vger.kernel.org
parent eba692ca
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -12758,8 +12758,11 @@ int amdgpu_dm_process_dmub_aux_transfer_sync(
		goto out;
	}

	payload->reply[0] = adev->dm.dmub_notify->aux_reply.command & 0xF;
	if (adev->dm.dmub_notify->aux_reply.command & 0xF0)
		/* The reply is stored in the top nibble of the command. */
		payload->reply[0] = (adev->dm.dmub_notify->aux_reply.command >> 4) & 0xF;

	payload->reply[0] = adev->dm.dmub_notify->aux_reply.command;
	if (!payload->write && p_notify->aux_reply.length &&
			(payload->reply[0] == AUX_TRANSACTION_REPLY_AUX_ACK)) {