]> 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 13:25:43 +0000 (09:25 -0400)
commit7ac37f0dcd2e0b729fa7b5513908dc8ab802b540
treecbeea770463440b99cfea4c1b1355795213eb82e
parent37052175016ca0d4816365fa333474867184d0af
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>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c