summaryrefslogtreecommitdiffstats
path: root/Documentation/driver-api
diff options
context:
space:
mode:
authorDaniel Stone <daniels@collabora.com>2023-08-03 16:47:28 +0100
committerSimon Ser <contact@emersion.fr>2023-08-21 17:10:33 +0200
commit09902f3a1f83085006742f18388b5098c1b57132 (patch)
tree8ec84afea9dd6cedadf44fe4452d4f21e02b9d47 /Documentation/driver-api
parentd7a407bc9ba30628eb699170e21d50c701c0e872 (diff)
downloadlinux-09902f3a1f83085006742f18388b5098c1b57132.tar.gz
linux-09902f3a1f83085006742f18388b5098c1b57132.tar.bz2
linux-09902f3a1f83085006742f18388b5098c1b57132.zip
doc: dma-buf: Rewrite intro section a little
Make it a little bit more clear what's going on and fix some formatting. Signed-off-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Simon Ser <contact@emersion.fr> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20230803154908.105124-3-daniels@collabora.com
Diffstat (limited to 'Documentation/driver-api')
-rw-r--r--Documentation/driver-api/dma-buf.rst24
1 files changed, 16 insertions, 8 deletions
diff --git a/Documentation/driver-api/dma-buf.rst b/Documentation/driver-api/dma-buf.rst
index f92a32d095d9..862dbc2759d0 100644
--- a/Documentation/driver-api/dma-buf.rst
+++ b/Documentation/driver-api/dma-buf.rst
@@ -5,14 +5,22 @@ The dma-buf subsystem provides the framework for sharing buffers for
hardware (DMA) access across multiple device drivers and subsystems, and
for synchronizing asynchronous hardware access.
-This is used, for example, by drm "prime" multi-GPU support, but is of
-course not limited to GPU use cases.
-
-The three main components of this are: (1) dma-buf, representing a
-sg_table and exposed to userspace as a file descriptor to allow passing
-between devices, (2) fence, which provides a mechanism to signal when
-one device has finished access, and (3) reservation, which manages the
-shared or exclusive fence(s) associated with the buffer.
+As an example, it is used extensively by the DRM subsystem to exchange
+buffers between processes, contexts, library APIs within the same
+process, and also to exchange buffers with other subsystems such as
+V4L2.
+
+This document describes the way in which kernel subsystems can use and
+interact with the three main primitives offered by dma-buf:
+
+ - dma-buf, representing a sg_table and exposed to userspace as a file
+ descriptor to allow passing between processes, subsystems, devices,
+ etc;
+ - dma-fence, providing a mechanism to signal when an asynchronous
+ hardware operation has completed; and
+ - dma-resv, which manages a set of dma-fences for a particular dma-buf
+ allowing implicit (kernel-ordered) synchronization of work to
+ preserve the illusion of coherent access
Shared DMA Buffers
------------------