drm/amdgpu - Graphics and Compute (GC)¶
The relationship between the CPU and GPU can be described as theproducer-consumer problem, where the CPU fills out a buffer with operations(producer) to be executed by the GPU (consumer). The requested operations inthe buffer are calledCommand Packets, which can be summarized as acompressed way of transmitting command information to the graphics controller.
The component that acts as the front end between the CPU and the GPU is calledCommand Processor (CP). This component is responsible for providing greaterflexibility to theGraphics and Compute (GC) since CP makes it possible toprogram various aspects of the GPU pipeline. CP also coordinates thecommunication between the CPU and GPU via a mechanism namedRing Buffers,where the CPU appends information to the buffer while the GPU removesoperations. CP is also responsible for handlingIndirect Buffers (IB).
For reference, internally the CP consists of several sub-blocks (CPC - CPcompute, CPG - CP graphics, and CPF - CP fetcher). Some of these acronymsappear in register names, but this is more of an implementation detail and notsomething that directly impacts driver programming or debugging.
Graphics (GFX) and Compute Microcontrollers¶
GC is a large block, and as a result, it has multiple firmware associated withit. Some of them are:
- CP (Command Processor)
The name for the hardware block that encompasses the front end of theGFX/Compute pipeline. Consists mainly of a bunch of microcontrollers(PFP, ME, CE, MEC). The firmware that runs on these microcontrollersprovides the driver interface to interact with the GFX/Compute engine.
- MEC (MicroEngine Compute)
This is the microcontroller that controls the compute queues on theGFX/compute engine.
- MES (MicroEngine Scheduler)
This is the engine for managing queues. For more details checkMicroEngine Scheduler (MES).
- RLC (RunList Controller)
This is another microcontroller in the GFX/Compute engine. It handlespower management related functionality within the GFX/Compute engine.The name is a vestige of old hardware where it was originally addedand doesn’t really have much relation to what the engine does now.