Skip to content

Commit

Permalink
doc: uapi: Add document describing dma-buf semantics
Browse files Browse the repository at this point in the history
Since there's a lot of confusion around this, document both the rules
and the best practices around negotiating, allocating, importing, and
using buffers when crossing context/process/device/subsystem boundaries.

This ties up all of dma-buf, formats and modifiers, and their usage.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Sui Jingfeng <suijingfeng@loongson.cn>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803154908.105124-4-daniels@collabora.com
  • Loading branch information
fooishbar authored and berolinux committed Oct 30, 2023
1 parent 35f5199 commit 051c423
Show file tree
Hide file tree
Showing 5 changed files with 406 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Documentation/driver-api/dma-buf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ interact with the three main primitives offered by dma-buf:
allowing implicit (kernel-ordered) synchronization of work to
preserve the illusion of coherent access


Userspace API principles and use
--------------------------------

For more details on how to design your subsystem's API for dma-buf use, please
see Documentation/userspace-api/dma-buf-alloc-exchange.rst.


Shared DMA Buffers
------------------

Expand Down
7 changes: 7 additions & 0 deletions Documentation/gpu/drm-uapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -486,3 +486,10 @@ and the CRTC index is its position in this array.

.. kernel-doc:: include/uapi/drm/drm_mode.h
:internal:


dma-buf interoperability
========================

Please see Documentation/userspace-api/dma-buf-alloc-exchange.rst for
information on how dma-buf is integrated and exposed within DRM.
Loading

0 comments on commit 051c423

Please sign in to comment.