drm/amdgpu/gfx: Introduce helpers handling CSB manipulation
authorRodrigo Siqueira <siqueira@igalia.com>
Mon, 21 Apr 2025 22:12:18 +0000 (16:12 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 30 Apr 2025 22:04:29 +0000 (18:04 -0400)
commit9718f7457dba2e98dab256217814296b5ad47ee4
tree3c1956a9851200c7b626bfbcbea6e84afc587d50
parent5a2658fda44f67003e7587547da6ac5decc97072
drm/amdgpu/gfx: Introduce helpers handling CSB manipulation

From GFX6 to GFX11, there is a function for getting the CSB buffer to be
put into the hardware. Three common parts are duplicated in all of these
GFX functions:

1. Prepare the CSB preamble.
2. Parser the CS data.
3. End the CSB preamble.

This commit creates helpers to be used from GFX6 to GFX11.

Signed-off-by: Rodrigo Siqueira <siqueira@igalia.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h