[PATCH v2 9/9] drm/amdgpu: Add CSB documentation
Rodrigo Siqueira
siqueira at igalia.com
Sat Apr 12 20:21:14 UTC 2025
Add a description for the get_csb_buffer callback and an entry for CSB
in the glossary.
Signed-off-by: Rodrigo Siqueira <siqueira at igalia.com>
---
Documentation/gpu/amdgpu/amdgpu-glossary.rst | 3 +++
drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h | 14 ++++++++++++++
2 files changed, 17 insertions(+)
diff --git a/Documentation/gpu/amdgpu/amdgpu-glossary.rst b/Documentation/gpu/amdgpu/amdgpu-glossary.rst
index 080c3f2250d1..8fb5f6de4df3 100644
--- a/Documentation/gpu/amdgpu/amdgpu-glossary.rst
+++ b/Documentation/gpu/amdgpu/amdgpu-glossary.rst
@@ -33,6 +33,9 @@ we have a dedicated glossary for Display Core at
CS
Command Submission
+ CSB
+ Clear State Indirect Buffer
+
CU
Compute Unit
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h
index fce22d3f816b..c210625be220 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h
@@ -237,6 +237,20 @@ struct amdgpu_rlc_funcs {
void (*unset_safe_mode)(struct amdgpu_device *adev, int xcc_id);
int (*init)(struct amdgpu_device *adev);
u32 (*get_csb_size)(struct amdgpu_device *adev);
+
+ /**
+ * @get_csb_buffer: Get the clear state to be put into the hardware.
+ *
+ * The parameter adev is used to get the CS data and other gfx info,
+ * and buffer is the RLC CS pointer
+ *
+ * Sometimes, the user space puts a request to clear the state in the
+ * command buffer; this function provides the clear state that gets put
+ * into the hardware. Note that the driver programs Clear State
+ * Indirect Buffer (CSB) explicitly when it sets up the kernel rings,
+ * and it also provides a pointer to it which is used by the firmware
+ * to load the clear state in some cases.
+ */
void (*get_csb_buffer)(struct amdgpu_device *adev, volatile u32 *buffer);
int (*get_cp_table_num)(struct amdgpu_device *adev);
int (*resume)(struct amdgpu_device *adev);
--
2.49.0
More information about the amd-gfx
mailing list