]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: Remove incorrect checking in dmub aux handler
authorWayne Lin <Wayne.Lin@amd.com>
Sun, 20 Apr 2025 08:56:54 +0000 (16:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 May 2025 06:24:07 +0000 (08:24 +0200)
commit 396dc51b3b7ea524bf8061f478332d0039e96d5d upstream.

[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: ead08b95fa50 ("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>
(cherry picked from commit 81b5c6fa62af62fe89ae9576f41aae37830b94cb)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index a0bd970c09b46e0214ffe9578b0391627a67c369..b123b37941dd669844db45c1611b01d59a03183b 100644 (file)
@@ -11070,19 +11070,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("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;