Commit d0de79f6 authored by Jonathan Kim's avatar Jonathan Kim Committed by Alex Deucher
Browse files

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: default avatarJonathan Kim <jonathan.kim@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
parent 883f309a
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -228,7 +228,12 @@ static int mes_v12_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
			pipe, x_pkt->header.opcode);

	r = amdgpu_fence_wait_polling(ring, seq, timeout);
	if (r < 1 || !*status_ptr) {

	/*
	 * status_ptr[31:0] == 0 (fail) or status_ptr[63:0] == 1 (success).
	 * If status_ptr[31:0] == 0 then status_ptr[63:32] will have debug error information.
	 */
	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",