From 0bd9d38e3ea68622e3306db03135e3ca08bbf1f0 Mon Sep 17 00:00:00 2001 From: Sunil Khatri Date: Thu, 17 Sep 2026 18:58:27 +0530 Subject: [PATCH] drm/amdgpu/mes12.1: 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. status_ptr is written directly by MES as part of completing the packet, independently of the ring fence that fence_wait_ret waits on, so a nonzero status despite a timed-out fence_wait_ret narrows the failure to the trailing ring/query-status packet rather than the original request. 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_1.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c b/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c index 7459547b7a69..20159fb9d6ea 100644 --- a/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c +++ b/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c @@ -236,16 +236,16 @@ static int mes_v12_1_submit_pkt_and_poll_completion(struct amdgpu_mes *mes, if (r < 1 || !*status_ptr) { if (misc_op_str) dev_err(adev->dev, - "MES(%d, %d) failed to respond to msg=%s (%s)\n", - xcc_id, pipe, op_str, misc_op_str); + "MES(%d, %d) failed to respond to msg=%s (%s) fence_wait_ret=%ld status=0x%x\n", + xcc_id, pipe, op_str, misc_op_str, r, *status_ptr); else if (op_str) dev_err(adev->dev, - "MES(%d, %d) failed to respond to msg=%s\n", - xcc_id, pipe, op_str); + "MES(%d, %d) failed to respond to msg=%s fence_wait_ret=%ld status=0x%x\n", + xcc_id, pipe, op_str, r, *status_ptr); else dev_err(adev->dev, - "MES(%d, %d) failed to respond to msg=%d\n", - xcc_id, pipe, x_pkt->header.opcode); + "MES(%d, %d) failed to respond to msg=%d fence_wait_ret=%ld status=0x%x\n", + xcc_id, pipe, x_pkt->header.opcode, r, *status_ptr); while (halt_if_hws_hang) schedule();