From 6ae5eaab20c8442ad4663d4ed0bc613b8965c561 Mon Sep 17 00:00:00 2001 From: Sunil Khatri Date: Thu, 17 Sep 2026 18:58:26 +0530 Subject: [PATCH] drm/amdgpu/mes12: add more debug info on MES packet failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When MES fails to respond to a packet, the existing failure log only prints the op name. Add fence_wait_ret and the packet's status word to the same message, so a fence-wait timeout (MES itself stalled) can be told apart from a fast explicit rejection (fence signaled, but the low status word is 0) directly from the log, along with the MES-reported error code carried in the high status word for the latter case. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Sunil Khatri Reviewed-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c index 9e149cf98889..9d220bff0f6f 100644 --- a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c +++ b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c @@ -240,14 +240,20 @@ static int mes_v12_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes, if (r < 1 || !(lower_32_bits(*status_ptr))) { if (misc_op_str) - dev_err(adev->dev, "MES(%d) failed to respond to msg=%s (%s)\n", - pipe, op_str, misc_op_str); + dev_err(adev->dev, + "MES(%d) failed to respond to msg=%s (%s) fence_wait_ret=%ld status=0x%x_%x\n", + pipe, op_str, misc_op_str, r, + upper_32_bits(*status_ptr), lower_32_bits(*status_ptr)); else if (op_str) - dev_err(adev->dev, "MES(%d) failed to respond to msg=%s\n", - pipe, op_str); + dev_err(adev->dev, + "MES(%d) failed to respond to msg=%s fence_wait_ret=%ld status=0x%x_%x\n", + pipe, op_str, r, + upper_32_bits(*status_ptr), lower_32_bits(*status_ptr)); else - dev_err(adev->dev, "MES(%d) failed to respond to msg=%d\n", - pipe, x_pkt->header.opcode); + dev_err(adev->dev, + "MES(%d) failed to respond to msg=%d fence_wait_ret=%ld status=0x%x_%x\n", + pipe, x_pkt->header.opcode, r, + upper_32_bits(*status_ptr), lower_32_bits(*status_ptr)); while (halt_if_hws_hang) schedule();