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 <shaoyun.liu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Jesse Zhang
2026-06-20 23:06:34 +08:00
committed by Alex Deucher
parent c0cae35661
commit 41eb81a306

View File

@@ -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) {