Skip to content

Commit

Permalink
drm/amd/display: Remove incorrect checking in dmub aux handler
Browse files Browse the repository at this point in the history
[Why & How]
"Request length != reply length" is expected behavior defined in spec.
It's not an invalid reply. Besides, replied data handling logic is not
designed to be written in amdgpu_dm_process_dmub_aux_transfer_sync().
Remove the incorrectly handling section.

Fixes: ead08b9 ("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: 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>
  • Loading branch information
Wayne Lin authored and Alex Deucher committed May 5, 2025
1 parent 1db6c9e commit 81b5c6f
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -12854,19 +12854,9 @@ int amdgpu_dm_process_dmub_aux_transfer_sync(
payload->reply[0] = (adev->dm.dmub_notify->aux_reply.command >> 4) & 0xF;

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

if (payload->length != p_notify->aux_reply.length) {
drm_warn(adev_to_drm(adev), "invalid read length %d from DPIA AUX 0x%x(%d)!\n",
p_notify->aux_reply.length,
payload->address, payload->length);
*operation_result = AUX_RET_ERROR_INVALID_REPLY;
goto out;
}

(payload->reply[0] == AUX_TRANSACTION_REPLY_AUX_ACK))
memcpy(payload->data, p_notify->aux_reply.data,
p_notify->aux_reply.length);
}

/* success */
ret = p_notify->aux_reply.length;
Expand Down

0 comments on commit 81b5c6f

Please sign in to comment.