From c41659869d285cb473e42fd31fde83f1fd5c5c75 Mon Sep 17 00:00:00 2001 From: Jesse Zhang Date: Fri, 11 Sep 2026 13:52:45 +0800 Subject: [PATCH] drm/amdgpu/gfx: add a detect_hung_queue callback Allow GFX recovery to resolve a doorbell to an HQD (ME, pipe, queue) without querying a stalled MES scheduler. Signed-off-by: Jesse Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h index f5fb2e585e8a..a158b7f71b2f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h @@ -373,6 +373,9 @@ struct amdgpu_gfx_funcs { int (*get_xccs_per_xcp)(struct amdgpu_device *adev); void (*get_hdp_flush_mask)(struct amdgpu_ring *ring, uint32_t *ref_and_mask, uint32_t *reg_mem_engine); + /* find the gfx HQD slot (me/pipe/queue) for a doorbell */ + bool (*detect_hung_queue)(struct amdgpu_device *adev, u32 doorbell_index, + u32 *me, u32 *pipe, u32 *queue); }; struct sq_work {