]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amd/display: Correct the reply value when AUX write incomplete
authorWayne Lin <Wayne.Lin@amd.com>
Fri, 25 Apr 2025 06:44:02 +0000 (14:44 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 13 May 2025 18:18:09 +0000 (14:18 -0400)
commitd433981385c62c72080e26f1c00a961d18b233be
tree5d6badec1a47cb58539ebe59f06bb8bf9b50b3be
parent2d73b0845ab3963856e857b810600e5594bc29f4
drm/amd/display: Correct the reply value when AUX write incomplete

[Why]
Now forcing aux->transfer to return 0 when incomplete AUX write is
inappropriate. It should return bytes have been transferred.

[How]
aux->transfer is asked not to change original msg except reply field of
drm_dp_aux_msg structure. Copy the msg->buffer when it's write request,
and overwrite the first byte when sink reply 1 byte indicating partially
written byte number. Then we can return the correct value without
changing the original msg.

Fixes: 3637e457eb00 ("drm/amd/display: Fix wrong handling for AUX_DEFER case")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Ray Wu <ray.wu@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 7ac37f0dcd2e0b729fa7b5513908dc8ab802b540)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c