AMD General
> -----Original Message-----
> From: Liu, Shaoyun <[email protected]>
> Sent: Tuesday, June 23, 2026 12:22 AM
> To: Zhang, Jesse(Jie) <[email protected]>; [email protected]
> Cc: Deucher, Alexander <[email protected]>; Koenig, Christian
> <[email protected]>; Lin, Amber <[email protected]>; Zhang,
> Jesse(Jie) <[email protected]>
> Subject: RE: [PATCH 1/3] drm/amdgpu/mes12: drop queue state on
> RESET_QUEUES unmap
>
> AMD General
>
> Shouldn't this apply to mes v11 as well ?
Thanks Shaoyun. I will prepare the patch for mev v11 .
>
> Shaoyun.liu
>
> -----Original Message-----
> From: Jesse Zhang <[email protected]>
> Sent: Saturday, June 20, 2026 11:38 AM
> To: [email protected]
> Cc: Deucher, Alexander <[email protected]>; Koenig, Christian
> <[email protected]>; Liu, Shaoyun <[email protected]>; Lin,
> Amber <[email protected]>; Zhang, Jesse(Jie) <[email protected]>
> Subject: [PATCH 1/3] drm/amdgpu/mes12: drop queue state on RESET_QUEUES
> unmap
>
> Set remove_queue_after_reset=1 (MES >= 0x5a) so MES drops its internal state
> instead of re-unmapping an already MMIO-reset queue, which can timeout into a
> GPU reset.
>
> Suggested-by: Shaoyun Liu <[email protected]>
> Signed-off-by: Jesse Zhang <[email protected]>
> ---
> drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
> b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
> index d80a983b1b6c..20f4fd57b1da 100644
> --- a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
> @@ -749,6 +749,17 @@ static int mes_v12_0_unmap_legacy_queue(struct
> amdgpu_mes *mes,
> mes_remove_queue_pkt.unmap_legacy_queue = 1;
> mes_remove_queue_pkt.queue_type =
> convert_to_mes_queue_type(input->queue_type);
> + /*
> + * A reset-time unmap: the queue was already reset via MMIO
> while
> + * gangs are suspended and it is on the MES hung/fail list.
> Tell
> + * MES to just drop its internal state for it. Without this
> flag
> + * MES asks CP to unmap the already-reset (still wedged) queue
> + * again, which times out and forces a GPU reset.
> + */
> + if (input->action == RESET_QUEUES &&
> + (mes->sched_version & AMDGPU_MES_VERSION_MASK) >=
> 0x5a)
> + mes_remove_queue_pkt.remove_queue_after_reset = 1;
> +
> }
>
> if (mes->adev->enable_uni_mes) {
> --
> 2.49.0
>