xref: /linux/Documentation/gpu/amdgpu/gc/index.rst (revision ab93e0dd72c37d378dd936f031ffb83ff2bd87ce)
1e7aaa5fbSRodrigo Siqueira.. _amdgpu-gc:
2e7aaa5fbSRodrigo Siqueira
3e7aaa5fbSRodrigo Siqueira========================================
4e7aaa5fbSRodrigo Siqueira drm/amdgpu - Graphics and Compute (GC)
5e7aaa5fbSRodrigo Siqueira========================================
6e7aaa5fbSRodrigo Siqueira
7e7aaa5fbSRodrigo SiqueiraThe relationship between the CPU and GPU can be described as the
8e7aaa5fbSRodrigo Siqueiraproducer-consumer problem, where the CPU fills out a buffer with operations
9e7aaa5fbSRodrigo Siqueira(producer) to be executed by the GPU (consumer). The requested operations in
10e7aaa5fbSRodrigo Siqueirathe buffer are called Command Packets, which can be summarized as a compressed
11e7aaa5fbSRodrigo Siqueiraway of transmitting command information to the graphics controller.
12e7aaa5fbSRodrigo Siqueira
13e7aaa5fbSRodrigo SiqueiraThe component that acts as the front end between the CPU and the GPU is called
14e7aaa5fbSRodrigo Siqueirathe Command Processor (CP). This component is responsible for providing greater
15e7aaa5fbSRodrigo Siqueiraflexibility to the GC since CP makes it possible to program various aspects of
16e7aaa5fbSRodrigo Siqueirathe GPU pipeline. CP also coordinates the communication between the CPU and GPU
17e7aaa5fbSRodrigo Siqueiravia a mechanism named **Ring Buffers**, where the CPU appends information to
18e7aaa5fbSRodrigo Siqueirathe buffer while the GPU removes operations. It is relevant to highlight that a
19e7aaa5fbSRodrigo SiqueiraCPU can add a pointer to the Ring Buffer that points to another region of
20e7aaa5fbSRodrigo Siqueiramemory outside the Ring Buffer, and CP can handle it; this mechanism is called
21e7aaa5fbSRodrigo Siqueira**Indirect Buffer (IB)**. CP receives and parses the Command Streams (CS), and
22e7aaa5fbSRodrigo Siqueirawrites the operations to the correct hardware blocks.
23e7aaa5fbSRodrigo Siqueira
24e7aaa5fbSRodrigo SiqueiraGraphics (GFX) and Compute Microcontrollers
25e7aaa5fbSRodrigo Siqueira-------------------------------------------
26e7aaa5fbSRodrigo Siqueira
27e7aaa5fbSRodrigo SiqueiraGC is a large block, and as a result, it has multiple firmware associated with
28e7aaa5fbSRodrigo Siqueirait. Some of them are:
29e7aaa5fbSRodrigo Siqueira
30e7aaa5fbSRodrigo SiqueiraCP (Command Processor)
31e7aaa5fbSRodrigo Siqueira    The name for the hardware block that encompasses the front end of the
32e7aaa5fbSRodrigo Siqueira    GFX/Compute pipeline. Consists mainly of a bunch of microcontrollers
33e7aaa5fbSRodrigo Siqueira    (PFP, ME, CE, MEC). The firmware that runs on these microcontrollers
34e7aaa5fbSRodrigo Siqueira    provides the driver interface to interact with the GFX/Compute engine.
35e7aaa5fbSRodrigo Siqueira
36e7aaa5fbSRodrigo Siqueira    MEC (MicroEngine Compute)
37e7aaa5fbSRodrigo Siqueira        This is the microcontroller that controls the compute queues on the
38e7aaa5fbSRodrigo Siqueira        GFX/compute engine.
39e7aaa5fbSRodrigo Siqueira
40e7aaa5fbSRodrigo Siqueira    MES (MicroEngine Scheduler)
41*74f0ff36SRodrigo Siqueira        This is the engine for managing queues. For more details check
42*74f0ff36SRodrigo Siqueira        :ref:`MicroEngine Scheduler (MES) <amdgpu-mes>`.
43e7aaa5fbSRodrigo Siqueira
44e7aaa5fbSRodrigo SiqueiraRLC (RunList Controller)
45e7aaa5fbSRodrigo Siqueira    This is another microcontroller in the GFX/Compute engine. It handles
46e7aaa5fbSRodrigo Siqueira    power management related functionality within the GFX/Compute engine.
47e7aaa5fbSRodrigo Siqueira    The name is a vestige of old hardware where it was originally added
48e7aaa5fbSRodrigo Siqueira    and doesn't really have much relation to what the engine does now.
49*74f0ff36SRodrigo Siqueira
50*74f0ff36SRodrigo Siqueira.. toctree::
51*74f0ff36SRodrigo Siqueira
52*74f0ff36SRodrigo Siqueira   mes.rst
53