From 99501b882c3ebbd1f504d8099e1db35d086ffe76 Mon Sep 17 00:00:00 2001 From: Sumit Semwal Date: Mon, 1 Aug 2016 20:21:33 +0530 Subject: Documentation: move dma-buf documentation to rst Branch out dma-buf related documentation into its own rst file to allow adding it to the sphinx documentation generated. Signed-off-by: Sumit Semwal --- Documentation/DocBook/device-drivers.tmpl | 37 ---------------- Documentation/dma-buf.rst | 74 +++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 37 deletions(-) create mode 100644 Documentation/dma-buf.rst (limited to 'Documentation') diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl index 99cdc05bbb7a..a93fbffa9742 100644 --- a/Documentation/DocBook/device-drivers.tmpl +++ b/Documentation/DocBook/device-drivers.tmpl @@ -128,43 +128,6 @@ X!Edrivers/base/interface.c !Edrivers/base/platform.c !Edrivers/base/bus.c - - Buffer Sharing and Synchronization - - 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 as finished access, and (3) reservation, - which manages the shared or exclusive fence(s) associated with - the buffer. - - dma-buf -!Edrivers/dma-buf/dma-buf.c -!Iinclude/linux/dma-buf.h - - reservation -!Pdrivers/dma-buf/reservation.c Reservation Object Overview -!Edrivers/dma-buf/reservation.c -!Iinclude/linux/reservation.h - - fence -!Edrivers/dma-buf/fence.c -!Iinclude/linux/fence.h -!Edrivers/dma-buf/seqno-fence.c -!Iinclude/linux/seqno-fence.h -!Edrivers/dma-buf/sync_file.c -!Iinclude/linux/sync_file.h - - Device Drivers DMA Management !Edrivers/base/dma-coherent.c !Edrivers/base/dma-mapping.c diff --git a/Documentation/dma-buf.rst b/Documentation/dma-buf.rst new file mode 100644 index 000000000000..939d1ad1075e --- /dev/null +++ b/Documentation/dma-buf.rst @@ -0,0 +1,74 @@ +================================== +Buffer Sharing and Synchronization +================================== + + +Introduction +------------ + +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: + +* dma-buf_: represents an sg_table, and is exposed to userspace as a file + descriptor to allow passing between devices, + +* fence_: which provides a mechanism to signal when one device has finished + access, and + +* reservation_: manages the shared or exclusive fence(s) associated with the + buffer. + +.. _dma-buf: + +dma-buf +~~~~~~~ + +.. kernel-doc:: drivers/dma-buf/dma-buf.c + :export: + +.. kernel-doc:: include/linux/dma-buf.h + :internal: + +.. _fence: + +fence +~~~~~ + +.. kernel-doc:: drivers/dma-buf/fence.c + :export: + +.. kernel-doc:: include/linux/fence.h + :internal: + +.. kernel-doc:: drivers/dma-buf/seqno-fence.c + :export: + +.. kernel-doc:: include/linux/seqno-fence.h + :internal: + +.. kernel-doc:: drivers/dma-buf/sync_file.c + :export: + +.. kernel-doc:: include/linux/sync_file.h + :internal: + +.. _reservation: + +reservation +~~~~~~~~~~~ + +.. kernel-doc:: drivers/dma-buf/reservation.c + :doc: Reservation Object Overview + +.. kernel-doc:: drivers/dma-buf/reservation.c + :export: + +.. kernel-doc:: include/linux/reservation.h + :internal: + -- cgit v1.2.3