[PATCH v3 0/9] Introduce a helper functions to get the CSB buffer
Rodrigo Siqueira
siqueira at igalia.com
Mon Apr 21 22:12:17 UTC 2025
This patchset was inspired from the below series:
https://lore.kernel.org/amd-gfx/20250319162225.3775315-1-alexander.deucher@amd.com/
In the above series, there is a bug fix in many functions named
gfx_vX_0_get_csb_buffer (where X ranges from 6 to 11). After closely
looking at those functions, it became clear that most of the code could
be shared from gfx6 to gfx11. Aside from the code duplication removal,
this also improves maintainability since a bug fix in a shared function
can be propagated to all ASICs.
Alex provided some feedback, and from that, I modified this new version
to:
1. Create a dedicated function for the preamble start.
2. Create a function to parse the cs data.
3. Create a helper for finishing the preamble.
4. Replace the duplicated part from gfx6 to 11.
For the GFX update, I created one commit for each to ensure this series
is bisectable.
Changes since v2:
- Alex:
- Update GFX7 CSB to use rb_config struct.
- Expand documentation based on Alex's explanations in the previous
series.
Thanks
Rodrigo Siqueira (9):
drm/amdgpu/gfx: Introduce helpers handling CSB manipulation
drm/amdgpu/gfx: Use CSB helpers in gfx_v11_0_get_csb_buffer
drm/amdgpu/gfx: Use CSB helpers in gfx_v10_0_get_csb_buffer
drm/amdgpu/gfx: Use CSB helpers in gfx_v9_0_get_csb_buffer
drm/amdgpu/gfx: Use CSB helpers in gfx_v8_0_get_csb_buffer
drm/amdgpu/gfx: Use CSB helpers in gfx_v7_0_get_csb_buffer
drm/amdgpu/gfx: Fix gfx_v7_0_get_csb_buffer to use rb_config
drm/amdgpu/gfx: Use CSB helpers in gfx_v6_0_get_csb_buffer
drm/amdgpu: Add documentation associated with CSB
Documentation/gpu/amdgpu/amdgpu-glossary.rst | 6 ++
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 69 ++++++++++++++++++++
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 46 +++++++++++++
drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h | 14 ++++
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 34 ++--------
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 34 ++--------
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 29 ++------
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 55 ++--------------
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 34 ++--------
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 32 ++-------
10 files changed, 164 insertions(+), 189 deletions(-)
--
2.49.0
More information about the amd-gfx
mailing list