Add more kernel-doc and expand the glossary
Subsystems (4)
v3 cover Add more kernel-doc and expand the glossary
This version is a follow-up from:
From Alex's feedback, this new version includes:
- More documentation about amdgpu writeback.
- More ring documentation.
- Expand glossary.
Thanks
Rodrigo Siqueira (2):
drm/amdgpu: Add documentation to some parts of the AMDGPU ring and wb Documentation/gpu: Add new entries to amdgpu glossary
Documentation/gpu/amdgpu/amdgpu-glossary.rst | 33 +++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu.h | 52 +++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 74 ++++++++++++++++++++ 3 files changed, 158 insertions(+), 1 deletion(-)
Signature · 1 line
2.47.2
PATCH v3 1/2 drm/amdgpu: Add documentation to some parts of the AMDGPU ring and wb
Add some random documentation associated with the ring buffer manipulations and writeback.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 52 ++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 74 ++++++++++++++++++++++++ 2 files changed, 125 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +51 -1
@@ -520,12 +520,62 @@ int amdgpu_file_to_fpriv(struct file *filp, struct amdgpu_fpriv **fpriv);*/ #define AMDGPU_MAX_WB 1024/* Reserve at most 1024 WB slots for amdgpu-owned rings. */ +/** +* amdgpu_wb - This struct is used for small GPU memory allocation. +* +* This struct is used to allocate a small amount of GPU memory that can be +* used to shadow certain states into the memory. This is especially useful for +* providing easy CPU access to some states without requiring register access +* (e.g., if some block is power gated, reading register may be problematic). +* +* Note: the term writeback was initially used because many of the amdgpu +* components had some level of writeback memory, and this struct initially +* described those components. +*/ struct amdgpu_wb { + +/** +* @wb_obj: +* +* Buffer Object used for the writeback memory. +*/ struct amdgpu_bo *wb_obj; + +/** +* @wb: +* +* Pointer to the first writeback slot. In terms of CPU address +* this value can be accessed directly by using the offset as an index. +* For the GPU address, it is necessary to use gpu_addr and the offset. +*/ volatile uint32_t *wb; + +/** +* @gpu_addr: +* +* Writeback base address in the GPU. +*/ uint64_t gpu_addr; -u32 num_wb;/* Number of wb slots actually reserved for amdgpu. */ + +/** +* @num_wb: +* +* Number of writeback slots reserved for amdgpu. +*/ +u32 num_wb; + +/** +* @used: +* +* Track the writeback slot already used. +*/ unsigned long used[DIV_ROUND_UP (AMDGPU_MAX_WB ,BITS_PER_LONG )]; + +/** +* @lock: +* +* Protects read and write of the used field array. +*/ spinlock_t lock; };
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +74 -0
107 lines not on this page · raw message
Signature · 1 line
2.47.2
PATCH v3 2/2 Documentation/gpu: Add new entries to amdgpu glossary
In reply to Rodrigo Siqueira--- Documentation/gpu/amdgpu/amdgpu-glossary.rst | 33 ++++++++++++++++++++ 1 file changed, 33 insertions(+)
Documentation/gpu/amdgpu/amdgpu-glossary.rst +33 -0
@@ -24,6 +24,9 @@ we have a dedicated glossary for Display Core at CIK Sea Islands + CB + Color Buffer + CP Command Processor
@@ -39,6 +42,9 @@ we have a dedicated glossary for Display Core at CU Compute Unit + DB + Depth Buffer + DFS Digital Frequency Synthesizer
@@ -63,6 +69,12 @@ we have a dedicated glossary for Display Core at GC Graphics and Compute + GDS + Global Data Share + + GE + Geometry Engine + GMC Graphic Memory Controller
@@ -128,6 +140,9 @@ we have a dedicated glossary for Display Core at MQD Memory Queue Descriptor + PA + Primitive Assembler / Physical Address + PFP Pre-Fetch Parser (Graphics)
@@ -146,6 +161,9 @@ we have a dedicated glossary for Display Core at the GFX block. It's involved in GFX power management and SR-IOV, among other things. + SC + Scan Converter + SDMA System DMA
@@ -164,6 +182,9 @@ we have a dedicated glossary for Display Core at SMU/SMC System Management Unit / System Management Controller + SPI + Shader Processor Input + SRLC Save/Restore List Control
@@ -176,6 +197,9 @@ we have a dedicated glossary for Display Core at SS Spread Spectrum + SX + Shader Execution / Shader Export + TA Trusted Application
@@ -185,6 +209,9 @@ we have a dedicated glossary for Display Core at TOC Table of Contents + UMSCH + User Mode Scheduler + UVD Unified Video Decoder
@@ -202,3 +229,9 @@ we have a dedicated glossary for Display Core at VPE Video Processing Engine + + XCC + Accelerator Core Complex + + XCP + Accelerator Core Partition
Signature · 1 line
2.47.2
Re: [PATCH v3 2/2] Documentation/gpu: Add new entries to amdgpu glossary
Applied the series with some minor tweaks.
Alex
Quoted 106 lines · Rodrigo Siqueira
Signed-off-by Rodrigo Siqueira <[email protected]>--- Documentation/gpu/amdgpu/amdgpu-glossary.rst | 33 ++++++++++++++++++++ 1 file changed, 33 insertions(+)Documentation/gpu/amdgpu/amdgpu-glossary.rst +33
-1@@ -24,6 +24,9 @@ we have a dedicated glossary for Display Core at CIK Sea Islands + CB + Color Buffer + CP Command Processor@@ -39,6 +42,9 @@ we have a dedicated glossary for Display Core at CU Compute Unit + DB + Depth Buffer + DFS Digital Frequency Synthesizer@@ -63,6 +69,12 @@ we have a dedicated glossary for Display Core at GC Graphics and Compute + GDS + Global Data Share + + GE + Geometry Engine + GMC Graphic Memory Controller@@ -128,6 +140,9 @@ we have a dedicated glossary for Display Core at MQD Memory Queue Descriptor + PA + Primitive Assembler / Physical Address + PFP Pre-Fetch Parser (Graphics)@@ -146,6 +161,9 @@ we have a dedicated glossary for Display Core at the GFX block. It's involved in GFX power management and SR-IOV, among other things. + SC + Scan Converter + SDMA System DMA@@ -164,6 +182,9 @@ we have a dedicated glossary for Display Core at SMU/SMC System Management Unit / System Management Controller + SPI + Shader Processor Input + SRLC Save/Restore List Control@@ -176,6 +197,9 @@ we have a dedicated glossary for Display Core at SS Spread Spectrum + SX + Shader Execution / Shader Export + TA Trusted Application@@ -185,6 +209,9 @@ we have a dedicated glossary for Display Core at TOC Table of Contents + UMSCH + User Mode Scheduler + UVD Unified Video Decoder@@ -202,3 +229,9 @@ we have a dedicated glossary for Display Core at VPE Video Processing Engine + + XCC + Accelerator Core Complex + + XCP + Accelerator Core Partition --2.47.2