Skip to content

Commit d0de79f

Browse files
jokim-amdalexdeucher
authored andcommitted
drm/amdgpu: fix gfx12 mes packet status return check
GFX12 MES uses low 32 bits of status return for success (1 or 0) and high bits for debug information if low bits are 0. GFX11 MES doesn't do this so checking full 64-bit status return for 1 or 0 is still valid. Signed-off-by: Jonathan Kim <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent 883f309 commit d0de79f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

drivers/gpu/drm/amd/amdgpu/mes_v12_0.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,12 @@ static int mes_v12_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
228228
pipe, x_pkt->header.opcode);
229229

230230
r = amdgpu_fence_wait_polling(ring, seq, timeout);
231-
if (r < 1 || !*status_ptr) {
231+
232+
/*
233+
* status_ptr[31:0] == 0 (fail) or status_ptr[63:0] == 1 (success).
234+
* If status_ptr[31:0] == 0 then status_ptr[63:32] will have debug error information.
235+
*/
236+
if (r < 1 || !(lower_32_bits(*status_ptr))) {
232237

233238
if (misc_op_str)
234239
dev_err(adev->dev, "MES(%d) failed to respond to msg=%s (%s)\n",

0 commit comments

Comments
 (0)