aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h
diff options
context:
space:
mode:
author[email protected] <[email protected]>2025-02-20 06:43:59 +0000
committerAlex Deucher <[email protected]>2025-02-25 16:43:59 +0000
commitfdbfaaaae06bbf3074d309b03d3853281f6cf433 (patch)
treeb12ecbba80831a6ed3f9e5fcfbe96c1728540685 /drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h
parentdrm/amdgpu/sdma: Introduce is_guilty callbacks for sdma GFX and PAGE rings (diff)
downloadkernel-fdbfaaaae06bbf3074d309b03d3853281f6cf433.tar.gz
kernel-fdbfaaaae06bbf3074d309b03d3853281f6cf433.zip
drm/amdgpu: Improve SDMA reset logic with guilty queue tracking
This patch includes the remaining improvements to the SDMA reset logic: - Added `gfx_guilty` and `page_guilty` flags to track guilty queues. - Updated the reset and resume functions to handle the guilty state. - Cached the `rptr` before reset. v2: 1.replace the caller with a guilty bool. If the queue is the guilty one, set the rptr and wptr to the saved wptr value, else, set the rptr and wptr to the saved rptr value. (Alex) 2. cache the rptr before the reset. (Alex) v3: Keeping intermediate variables like u64 rwptr simplifies resotre rptr/wptr.(Lijo) Suggested-by: Alex Deucher <[email protected]> Suggested-by: Jiadong Zhu <[email protected]> Signed-off-by: Jesse Zhang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h
index dd4bf2e103e5..965169320065 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h
@@ -126,6 +126,9 @@ struct amdgpu_sdma {
uint32_t *ip_dump;
uint32_t supported_reset;
struct list_head reset_callback_list;
+ /* track guilty state of GFX and PAGE queues */
+ bool gfx_guilty;
+ bool page_guilty;
};
/*