On Thu, Oct 9, 2025 at 2:50 PM Jonathan Kim <[email protected]> wrote:
>
> 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]>
> ---
>  drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c 
> b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
> index aff06f06aeee..be8a352f9771 100644
> --- a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
> @@ -228,7 +228,7 @@ 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) {
> +       if (r < 1 || !(*status_ptr & 0xffffffff)) {

You could also use lower_32_bits() here, I think that would be
clearer. Please add a comment here about the status in the upper 32
bits if the value is 0.

Alex

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

Reply via email to