[PATCH] drm: add overview diagram for drm stack

Abdulrasaq Lawani posted 1 patch 6 months, 3 weeks ago
There is a newer version of this series
Documentation/gpu/introduction.rst | 38 +++++++++++++++++++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)
[PATCH] drm: add overview diagram for drm stack
Posted by Abdulrasaq Lawani 6 months, 3 weeks ago
Add an overview diagram of Linux DRM architecture for
graphics and compute to introduction.rst

---
Signed-off-by: Abdulrasaq Lawani <abdulrasaqolawani@gmail.com>
---
 Documentation/gpu/introduction.rst | 38 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)

diff --git a/Documentation/gpu/introduction.rst b/Documentation/gpu/introduction.rst
index 3cd0c8860b949408ed570d3f9384edd5f03df002..91bb0efc96d69921a122c5265b1431fa18110a7a 100644
--- a/Documentation/gpu/introduction.rst
+++ b/Documentation/gpu/introduction.rst
@@ -14,7 +14,43 @@ 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,
-- 
Abdulrasaq Lawani <abdulrasaqolawani@gmail.com>
Re: [PATCH] drm: add overview diagram for drm stack
Posted by Jonathan Corbet 6 months, 3 weeks ago
Abdulrasaq Lawani <abdulrasaqolawani@gmail.com> writes:

> Add an overview diagram of Linux DRM architecture for
> graphics and compute to introduction.rst
>
> ---
> Signed-off-by: Abdulrasaq Lawani <abdulrasaqolawani@gmail.com>
> ---
>  Documentation/gpu/introduction.rst | 38 +++++++++++++++++++++++++++++++++++++-
>  1 file changed, 37 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/gpu/introduction.rst b/Documentation/gpu/introduction.rst
> index 3cd0c8860b949408ed570d3f9384edd5f03df002..91bb0efc96d69921a122c5265b1431fa18110a7a 100644
> --- a/Documentation/gpu/introduction.rst
> +++ b/Documentation/gpu/introduction.rst
> @@ -14,7 +14,43 @@ 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.) |
> ++-----------------------------+

[...]

Please actually build the docs after a change like this and look at the
results; they will not be what you expect here.  You need to put that
diagram into a literal block.

Thanks,

jon
Re: [PATCH] drm: add overview diagram for drm stack
Posted by Abdulrasaq Lawani 6 months, 3 weeks ago
Thanks for the feedback. I have added the fix and sent another version
(v2) of the patch.

https://lore.kernel.org/all/20250523-drm-doc-updates-v2-0-e517df152cf6@gmail.com/

best regards,
Abdulrasaq


On Fri, May 23, 2025 at 7:58 AM Jonathan Corbet <corbet@lwn.net> wrote:
>
> Abdulrasaq Lawani <abdulrasaqolawani@gmail.com> writes:
>
> > Add an overview diagram of Linux DRM architecture for
> > graphics and compute to introduction.rst
> >
> > ---
> > Signed-off-by: Abdulrasaq Lawani <abdulrasaqolawani@gmail.com>
> > ---
> >  Documentation/gpu/introduction.rst | 38 +++++++++++++++++++++++++++++++++++++-
> >  1 file changed, 37 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/gpu/introduction.rst b/Documentation/gpu/introduction.rst
> > index 3cd0c8860b949408ed570d3f9384edd5f03df002..91bb0efc96d69921a122c5265b1431fa18110a7a 100644
> > --- a/Documentation/gpu/introduction.rst
> > +++ b/Documentation/gpu/introduction.rst
> > @@ -14,7 +14,43 @@ 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.) |
> > ++-----------------------------+
>
> [...]
>
> Please actually build the docs after a change like this and look at the
> results; they will not be what you expect here.  You need to put that
> diagram into a literal block.
>
> Thanks,
>
> jon
Re: [PATCH] drm: add overview diagram for drm stack
Posted by Bagas Sanjaya 6 months, 3 weeks ago
On Thu, May 22, 2025 at 06:20:27PM -0400, Abdulrasaq Lawani wrote:
> -[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 |
> ++----------------+     +-------------------+
> +

I get multiple Sphinx indentation warnings and errors:

Documentation/gpu/introduction.rst:23: ERROR: Unexpected indentation. [docutils]
Documentation/gpu/introduction.rst:22: WARNING: Block quote ends without a blank line; unexpected unindent. [docutils]
Documentation/gpu/introduction.rst:23: WARNING: Blank line required after table. [docutils]
Documentation/gpu/introduction.rst:24: WARNING: Line block ends without a blank line. [docutils]
Documentation/gpu/introduction.rst:25: WARNING: Block quote ends without a blank line; unexpected unindent. [docutils]
Documentation/gpu/introduction.rst:29: ERROR: Unexpected indentation. [docutils]
Documentation/gpu/introduction.rst:28: WARNING: Block quote ends without a blank line; unexpected unindent. [docutils]
Documentation/gpu/introduction.rst:29: WARNING: Blank line required after table. [docutils]
Documentation/gpu/introduction.rst:29: WARNING: Inline substitution_reference start-string without end-string. [docutils]
Documentation/gpu/introduction.rst:30: WARNING: Line block ends without a blank line. [docutils]
Documentation/gpu/introduction.rst:31: WARNING: Block quote ends without a blank line; unexpected unindent. [docutils]
Documentation/gpu/introduction.rst:35: ERROR: Unexpected indentation. [docutils]
Documentation/gpu/introduction.rst:35: WARNING: Inline substitution_reference start-string without end-string. [docutils]
Documentation/gpu/introduction.rst:36: WARNING: Line block ends without a blank line. [docutils]
Documentation/gpu/introduction.rst:37: ERROR: Unexpected indentation. [docutils]
Documentation/gpu/introduction.rst:37: WARNING: Blank line required after table. [docutils]
Documentation/gpu/introduction.rst:38: WARNING: Line block ends without a blank line. [docutils]
Documentation/gpu/introduction.rst:39: WARNING: Block quote ends without a blank line; unexpected unindent. [docutils]
Documentation/gpu/introduction.rst:42: ERROR: Unexpected indentation. [docutils]
Documentation/gpu/introduction.rst:42: WARNING: Blank line required after table. [docutils]
Documentation/gpu/introduction.rst:43: WARNING: Line block ends without a blank line. [docutils]
Documentation/gpu/introduction.rst:44: WARNING: Block quote ends without a blank line; unexpected unindent. [docutils]
Documentation/gpu/introduction.rst:48: ERROR: Unexpected indentation. [docutils]
Documentation/gpu/introduction.rst:48: WARNING: Blank line required after table. [docutils]
Documentation/gpu/introduction.rst:48: WARNING: Inline substitution_reference start-string without end-string. [docutils]
Documentation/gpu/introduction.rst:49: WARNING: Line block ends without a blank line. [docutils]
Documentation/gpu/introduction.rst:50: WARNING: Block quote ends without a blank line; unexpected unindent. [docutils]

Please wrap the diagram above in literal code block.

Thanks.

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