[PATCH v2 0/9] Introduce a helper functions to get the CSB buffer
Rodrigo Siqueira
siqueira at igalia.com
Sat Apr 12 20:21:05 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.
Thanks
Rodrigo Siqueira (9):
drm/amdgpu/gfx: Introduce helpers for 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: Clean up gfx_v7_0_get_csb_buffer
drm/amdgpu/gfx: Use CSB helpers in gfx_v6_0_get_csb_buffer
drm/amdgpu: Add CSB documentation
Documentation/gpu/amdgpu/amdgpu-glossary.rst | 3 +
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 69 ++++++++++++++++++++
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 3 +
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 | 39 ++---------
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 34 ++--------
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 32 ++-------
10 files changed, 116 insertions(+), 175 deletions(-)
--
2.49.0
More information about the amd-gfx
mailing list