Skip to contentSkip to conversation

drm: add overview diagram for drm stack

PATCH In review Abdulrasaq Lawani 3 participants 5 messages Jun 1, 2025 – Jun 9, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 drm: add overview diagram for drm stack

Add an overview diagram of Linux DRM architecture for graphics and compute to introduction.rst

---
Changes in v4:
- Ensure patch description describe diff adding overview diagram.
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- revert the promotion of the overview diagram header
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Update the overview diagram to display correctly by putting in a literal block.
- Also update the overview section diagram to a higher order.
- Ensured docs are successfully rendering by building for htmldocs and pdfdocs.
- Rendered pages are okay on html and pdf.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 Documentation/gpu/introduction.rst | 40 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)
Documentation/gpu/introduction.rst +39 -1
index 3cd0c8860b949408ed570d3f9384edd5f03df002..a8d3f953a470180b395ec52a45d0f3f4561424e0 100644
@@ -14,7 +14,45 @@ including the TTM memory manager, output configuration and mode setting,
 and the new vblank internals, in addition to all the regular features
 found in current kernels.
 
-[Insert diagram of typical DRM stack here]
+Overview of the Linux DRM Architecture
+--------------------------------------
+::
+
+        +-----------------------------+
+        |     User-space Apps         |
+        | (Games, Browsers, ML, etc.) |
+        +-----------------------------+
+                      |
+                      v
+        +---------------------------------------+
+        |    Graphics APIs   |   Compute APIs   |
+        |  (OpenGL, Vulkan)  |  (OpenCL, CUDA)  |
+        +---------------------------------------+
+                |                   |
+                v                   v
+        +---------------------+  +-----------------------+
+        |  User-space Driver  |  |    Compute Runtime    |
+        |  (Mesa, AMD/NVIDIA) |  |  (OpenCL, CUDA, ROCm) |
+        +---------------------+  +-----------------------+
+                |                   |
+                +--------+----------+
+                         |
+                         v
+                +-----------------------+
+                |   libdrm (DRM API)    |
+                +-----------------------+
+                          |
+                          v
+        +-------------------------------------------+
+        |     Kernel DRM/KMS Driver (i915, amdgpu,  |
+        |     nouveau, etc.)                        |
+        +-------------------------------------------+
+                |                       |
+                v                       v
+        +----------------+     +-------------------+
+        | GPU Display HW |     | GPU Compute Units |
+        +----------------+     +-------------------+
+
 
 Style Guidelines
 ================

---
base-commit: 4d07f5440d7afee27dada528aaf5230e760531cb
change-id: 20250522-drm-doc-updates-3686f6d48122

Best regards,

Signature · 1 line
Abdulrasaq Lawani <[email protected]>
Reviewed-by on v4 1/1
#1 lore raw
Quoted 48 lines · Abdulrasaq Lawani

Add an overview diagram of Linux DRM architecture for graphics and compute to introduction.rst

---
<snipped>...

Documentation/gpu/introduction.rst +32 -1
index 3cd0c8860b949408ed570d3f9384edd5f03df002..a8d3f953a470180b395ec52a45d0f3f4561424e0 100644
@@ -14,7 +14,45 @@ including the TTM memory manager, output configuration and mode setting,
 and the new vblank internals, in addition to all the regular features
 found in current kernels.
 
-[Insert diagram of typical DRM stack here]
+Overview of the Linux DRM Architecture
+--------------------------------------
+::
+
+        +-----------------------------+
+        |     User-space Apps         |
+        | (Games, Browsers, ML, etc.) |
+        +-----------------------------+
+                      |
+                      v
+        +---------------------------------------+
+        |    Graphics APIs   |   Compute APIs   |
+        |  (OpenGL, Vulkan)  |  (OpenCL, CUDA)  |
+        +---------------------------------------+
+                |                   |
+                v                   v
+        +---------------------+  +-----------------------+
+        |  User-space Driver  |  |    Compute Runtime    |
+        |  (Mesa, AMD/NVIDIA) |  |  (OpenCL, CUDA, ROCm) |
+        +---------------------+  +-----------------------+
+                |                   |
+                +--------+----------+
+                         |
+                         v
+                +-----------------------+
+                |   libdrm (DRM API)    |
+                +-----------------------+
+                          |
+                          v
+        +-------------------------------------------+
+        |     Kernel DRM/KMS Driver (i915, amdgpu,  |
+        |     nouveau, etc.)                        |

Documentation/gpu/introduction.rst including the TTM memory manager, output configuration and mode setting, · line 58

Quoted 10 lines
Documentation/gpu/introduction.rst +7 -0
+        +-------------------------------------------+
+                |                       |
+                v                       v
+        +----------------+     +-------------------+
+        | GPU Display HW |     | GPU Compute Units |
+        +----------------+     +-------------------+
+
 
 Style Guidelines
 ================

The patch LGTM, thanks!

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#2 lore raw
Quoted 47 lines · Bagas Sanjaya
Quoted 46 lines · Abdulrasaq Lawani

Add an overview diagram of Linux DRM architecture for graphics and compute to introduction.rst

---
<snipped>...

Documentation/gpu/introduction.rst +31 -1
index 3cd0c8860b949408ed570d3f9384edd5f03df002..a8d3f953a470180b395ec52a45d0f3f4561424e0 100644
@@ -14,7 +14,45 @@ including the TTM memory manager, output configuration and mode setting,
 and the new vblank internals, in addition to all the regular features
 found in current kernels.
 
-[Insert diagram of typical DRM stack here]
+Overview of the Linux DRM Architecture
+--------------------------------------
+::
+
+        +-----------------------------+
+        |     User-space Apps         |
+        | (Games, Browsers, ML, etc.) |
+        +-----------------------------+
+                      |
+                      v
+        +---------------------------------------+
+        |    Graphics APIs   |   Compute APIs   |
+        |  (OpenGL, Vulkan)  |  (OpenCL, CUDA)  |
+        +---------------------------------------+
+                |                   |
+                v                   v
+        +---------------------+  +-----------------------+
+        |  User-space Driver  |  |    Compute Runtime    |
+        |  (Mesa, AMD/NVIDIA) |  |  (OpenCL, CUDA, ROCm) |
+        +---------------------+  +-----------------------+
+                |                   |
+                +--------+----------+
+                         |
+                         v
+                +-----------------------+
+                |   libdrm (DRM API)    |
+                +-----------------------+
+                          |
+                          v
+        +-------------------------------------------+
+        |     Kernel DRM/KMS Driver (i915, amdgpu,  |
Quoted 8 lines

Documentation/gpu/introduction.rst including the TTM memory manager, output configuration and mode setting, · line 55

Quoted 8 lines
Documentation/gpu/introduction.rst +8 -0
+        |     nouveau, etc.)                        |
+        +-------------------------------------------+
+                |                       |
+                v                       v
+        +----------------+     +-------------------+
+        | GPU Display HW |     | GPU Compute Units |
+        +----------------+     +-------------------+
+

I'm a bit late to the party, apologies. I'm not sure how much use there is in an extremely simplified diagram like this, least because it's really incomplete and leaves out the entire display and compositor side.

My idea was that we'd instead link to the large pile of introductory and overview talks further down in this file, if people want to get an overview over what drm does.

If you want I guess you could add some links to the relevant wikipedia pages, I think they also do a fairly decent job of explaining the big picture.

Thanks, Sima

Quoted 11 lines

Documentation/gpu/introduction.rst including the TTM memory manager, output configuration and mode setting,

Quoted 4 lines
Documentation/gpu/introduction.rst +0 -0
 Style Guidelines
 ================
 

The patch LGTM, thanks!

Signature · 1 line
An old man doll... just what I always wanted! - Clara
Signature · 3 lines
Simona Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
#3 lore raw
Quoted 61 lines · Simona Vetter
Quoted 47 lines · Bagas Sanjaya
Quoted 46 lines · Abdulrasaq Lawani

Add an overview diagram of Linux DRM architecture for graphics and compute to introduction.rst

---
<snipped>...

Documentation/gpu/introduction.rst +31 -1
index 3cd0c8860b949408ed570d3f9384edd5f03df002..a8d3f953a470180b395ec52a45d0f3f4561424e0 100644
@@ -14,7 +14,45 @@ including the TTM memory manager, output configuration and mode setting,
 and the new vblank internals, in addition to all the regular features
 found in current kernels.
 
-[Insert diagram of typical DRM stack here]
+Overview of the Linux DRM Architecture
+--------------------------------------
+::
+
+        +-----------------------------+
+        |     User-space Apps         |
+        | (Games, Browsers, ML, etc.) |
+        +-----------------------------+
+                      |
+                      v
+        +---------------------------------------+
+        |    Graphics APIs   |   Compute APIs   |
+        |  (OpenGL, Vulkan)  |  (OpenCL, CUDA)  |
+        +---------------------------------------+
+                |                   |
+                v                   v
+        +---------------------+  +-----------------------+
+        |  User-space Driver  |  |    Compute Runtime    |
+        |  (Mesa, AMD/NVIDIA) |  |  (OpenCL, CUDA, ROCm) |
+        +---------------------+  +-----------------------+
+                |                   |
+                +--------+----------+
+                         |
+                         v
+                +-----------------------+
+                |   libdrm (DRM API)    |
+                +-----------------------+
+                          |
+                          v
+        +-------------------------------------------+
+        |     Kernel DRM/KMS Driver (i915, amdgpu,  |
Quoted 8 lines

Documentation/gpu/introduction.rst including the TTM memory manager, output configuration and mode setting, · line 55

Quoted 8 lines
Documentation/gpu/introduction.rst +8 -0
+        |     nouveau, etc.)                        |
+        +-------------------------------------------+
+                |                       |
+                v                       v
+        +----------------+     +-------------------+
+        | GPU Display HW |     | GPU Compute Units |
+        +----------------+     +-------------------+
+

I'm a bit late to the party, apologies. I'm not sure how much use there is in an extremely simplified diagram like this, least because it's really incomplete and leaves out the entire display and compositor side.

Quoted 3 lines

My idea was that we'd instead link to the large pile of introductory and overview talks further down in this file, if people want to get an overview over what drm does.

So the stub that's being patched here can be removed, right?

Quoted 4 lines

If you want I guess you could add some links to the relevant wikipedia pages, I think they also do a fairly decent job of explaining the big picture.

What articles?

Thanks.

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#4 lore raw
In reply to Simona Vetter

Hi,

Should I go ahead make the diagram more detailed or just add the links in 'Slides and articles' & 'Conference talks' to the existing diagram?

Best regards,

Quoted 91 lines · Simona Vetter
Quoted 47 lines · Bagas Sanjaya
Quoted 46 lines · Abdulrasaq Lawani

Add an overview diagram of Linux DRM architecture for graphics and compute to introduction.rst

---
<snipped>...

Documentation/gpu/introduction.rst +31 -1
index 3cd0c8860b949408ed570d3f9384edd5f03df002..a8d3f953a470180b395ec52a45d0f3f4561424e0 100644
@@ -14,7 +14,45 @@ including the TTM memory manager, output configuration and mode setting,
 and the new vblank internals, in addition to all the regular features
 found in current kernels.
 
-[Insert diagram of typical DRM stack here]
+Overview of the Linux DRM Architecture
+--------------------------------------
+::
+
+        +-----------------------------+
+        |     User-space Apps         |
+        | (Games, Browsers, ML, etc.) |
+        +-----------------------------+
+                      |
+                      v
+        +---------------------------------------+
+        |    Graphics APIs   |   Compute APIs   |
+        |  (OpenGL, Vulkan)  |  (OpenCL, CUDA)  |
+        +---------------------------------------+
+                |                   |
+                v                   v
+        +---------------------+  +-----------------------+
+        |  User-space Driver  |  |    Compute Runtime    |
+        |  (Mesa, AMD/NVIDIA) |  |  (OpenCL, CUDA, ROCm) |
+        +---------------------+  +-----------------------+
+                |                   |
+                +--------+----------+
+                         |
+                         v
+                +-----------------------+
+                |   libdrm (DRM API)    |
+                +-----------------------+
+                          |
+                          v
+        +-------------------------------------------+
+        |     Kernel DRM/KMS Driver (i915, amdgpu,  |
Quoted 8 lines

Documentation/gpu/introduction.rst including the TTM memory manager, output configuration and mode setting, · line 55

Quoted 8 lines
Documentation/gpu/introduction.rst +8 -0
+        |     nouveau, etc.)                        |
+        +-------------------------------------------+
+                |                       |
+                v                       v
+        +----------------+     +-------------------+
+        | GPU Display HW |     | GPU Compute Units |
+        +----------------+     +-------------------+
+

I'm a bit late to the party, apologies. I'm not sure how much use there is in an extremely simplified diagram like this, least because it's really incomplete and leaves out the entire display and compositor side.

My idea was that we'd instead link to the large pile of introductory and overview talks further down in this file, if people want to get an overview over what drm does.

If you want I guess you could add some links to the relevant wikipedia pages, I think they also do a fairly decent job of explaining the big picture.

Thanks, Sima

Quoted 11 lines

Documentation/gpu/introduction.rst including the TTM memory manager, output configuration and mode setting,

Quoted 4 lines
Documentation/gpu/introduction.rst +0 -0
 Style Guidelines
 ================
 

The patch LGTM, thanks!

--
An old man doll... just what I always wanted! - Clara

--
Simona Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch