In the functions gfx_vX_0_cp_gfx_start(), where X ranges from 7 to 11, parts of the code parser CSB. However, CSB was already parsed in the get_csb_buffer() called before gfx_vX_0_cp_gfx_start(). This commit introduces a helper to read directly from the CSB buffer available in adev->gfx.rlc.cs_ptr, and avoid re-parse CSB.
Note: This series idea came from a discussion available in the below link: https://lore.kernel.org/amd-gfx/cadnq5_nagvaj1-7+_nzqszlsphccudrskkhkezjbeqg0gme...@mail.gmail.com/T/#m8fd6d9ce10b9644299f2f306f2a7d00a9aa1e5ee Thanks Rodrigo Siqueira (6): drm/amd/amdgpu: Add a helper to copy the CSB buffer into the ring buffer drm/amd/amdgpu: Avoid re-parser CSB in gfx_v7_0_cp_gfx_start drm/amd/amdgpu: Avoid re-parser CSB in gfx_v8_0_cp_gfx_start drm/amd/amdgpu: Avoid re-parser CSB in gfx_v9_0_cp_gfx_start drm/amd/amdgpu: Avoid re-parser CSB in gfx_v10_0_cp_gfx_start drm/amd/amdgpu: Avoid re-parser CSB in gfx_v11_0_cp_gfx_start drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 21 +++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 4 ++++ drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 23 +++++------------------ drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 23 +++++------------------ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 20 +++++--------------- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 22 +++++----------------- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 23 ++++++----------------- 7 files changed, 51 insertions(+), 85 deletions(-) -- 2.47.2