aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2016-12-09 13:53:05 -0500
committerJonathan Corbet <corbet@lwn.net>2016-12-11 15:37:55 -0500
commit868c97a846a73e937d835b09b8c885a69df50ec8 (patch)
tree9cdc05e799d117ac71b29d0958ee3dc65b8d539d
parent9e22ff439fa2e1201b168c001683f275afd46258 (diff)
dma-buf: Extract dma-buf.rst
Just prep work to polish and consolidate all the dma-buf related documenation. Unfortunately I didn't discover a way to both integrate this new file into the overall toc while keeping it at the current place. Work around that by moving it into the overall driver-api/index.rst. Cc: linux-doc@vger.kernel.org Cc: Jonathan Corbet <corbet@lwn.net> Cc: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
-rw-r--r--Documentation/driver-api/dma-buf.rst73
-rw-r--r--Documentation/driver-api/index.rst1
-rw-r--r--Documentation/driver-api/infrastructure.rst70
3 files changed, 74 insertions, 70 deletions
diff --git a/Documentation/driver-api/dma-buf.rst b/Documentation/driver-api/dma-buf.rst
new file mode 100644
index 000000000000..a9b457a4b949
--- /dev/null
+++ b/Documentation/driver-api/dma-buf.rst
@@ -0,0 +1,73 @@
1Buffer Sharing and Synchronization
2==================================
3
4The dma-buf subsystem provides the framework for sharing buffers for
5hardware (DMA) access across multiple device drivers and subsystems, and
6for synchronizing asynchronous hardware access.
7
8This is used, for example, by drm "prime" multi-GPU support, but is of
9course not limited to GPU use cases.
10
11The three main components of this are: (1) dma-buf, representing a
12sg_table and exposed to userspace as a file descriptor to allow passing
13between devices, (2) fence, which provides a mechanism to signal when
14one device as finished access, and (3) reservation, which manages the
15shared or exclusive fence(s) associated with the buffer.
16
17Shared DMA Buffers
18------------------
19
20.. kernel-doc:: drivers/dma-buf/dma-buf.c
21 :export:
22
23.. kernel-doc:: include/linux/dma-buf.h
24 :internal:
25
26Reservation Objects
27-------------------
28
29.. kernel-doc:: drivers/dma-buf/reservation.c
30 :doc: Reservation Object Overview
31
32.. kernel-doc:: drivers/dma-buf/reservation.c
33 :export:
34
35.. kernel-doc:: include/linux/reservation.h
36 :internal:
37
38DMA Fences
39----------
40
41.. kernel-doc:: drivers/dma-buf/dma-fence.c
42 :export:
43
44.. kernel-doc:: include/linux/dma-fence.h
45 :internal:
46
47Seqno Hardware Fences
48~~~~~~~~~~~~~~~~~~~~~
49
50.. kernel-doc:: drivers/dma-buf/seqno-fence.c
51 :export:
52
53.. kernel-doc:: include/linux/seqno-fence.h
54 :internal:
55
56DMA Fence Array
57~~~~~~~~~~~~~~~
58
59.. kernel-doc:: drivers/dma-buf/dma-fence-array.c
60 :export:
61
62.. kernel-doc:: include/linux/dma-fence-array.h
63 :internal:
64
65DMA Fence uABI/Sync File
66~~~~~~~~~~~~~~~~~~~~~~~~
67
68.. kernel-doc:: drivers/dma-buf/sync_file.c
69 :export:
70
71.. kernel-doc:: include/linux/sync_file.h
72 :internal:
73
diff --git a/Documentation/driver-api/index.rst b/Documentation/driver-api/index.rst
index 0823a6a52f43..a528178a54a5 100644
--- a/Documentation/driver-api/index.rst
+++ b/Documentation/driver-api/index.rst
@@ -16,6 +16,7 @@ available subsections can be seen below.
16 16
17 basics 17 basics
18 infrastructure 18 infrastructure
19 dma-buf
19 device_link 20 device_link
20 message-based 21 message-based
21 sound 22 sound
diff --git a/Documentation/driver-api/infrastructure.rst b/Documentation/driver-api/infrastructure.rst
index a0d65eb49055..0bb0b5fc9512 100644
--- a/Documentation/driver-api/infrastructure.rst
+++ b/Documentation/driver-api/infrastructure.rst
@@ -46,76 +46,6 @@ Device Drivers Base
46.. kernel-doc:: drivers/base/bus.c 46.. kernel-doc:: drivers/base/bus.c
47 :export: 47 :export:
48 48
49Buffer Sharing and Synchronization
50----------------------------------
51
52The dma-buf subsystem provides the framework for sharing buffers for
53hardware (DMA) access across multiple device drivers and subsystems, and
54for synchronizing asynchronous hardware access.
55
56This is used, for example, by drm "prime" multi-GPU support, but is of
57course not limited to GPU use cases.
58
59The three main components of this are: (1) dma-buf, representing a
60sg_table and exposed to userspace as a file descriptor to allow passing
61between devices, (2) fence, which provides a mechanism to signal when
62one device as finished access, and (3) reservation, which manages the
63shared or exclusive fence(s) associated with the buffer.
64
65dma-buf
66~~~~~~~
67
68.. kernel-doc:: drivers/dma-buf/dma-buf.c
69 :export:
70
71.. kernel-doc:: include/linux/dma-buf.h
72 :internal:
73
74reservation
75~~~~~~~~~~~
76
77.. kernel-doc:: drivers/dma-buf/reservation.c
78 :doc: Reservation Object Overview
79
80.. kernel-doc:: drivers/dma-buf/reservation.c
81 :export:
82
83.. kernel-doc:: include/linux/reservation.h
84 :internal:
85
86fence
87~~~~~
88
89.. kernel-doc:: drivers/dma-buf/dma-fence.c
90 :export:
91
92.. kernel-doc:: include/linux/dma-fence.h
93 :internal:
94
95.. kernel-doc:: drivers/dma-buf/seqno-fence.c
96 :export:
97
98.. kernel-doc:: include/linux/seqno-fence.h
99 :internal:
100
101.. kernel-doc:: drivers/dma-buf/dma-fence-array.c
102 :export:
103
104.. kernel-doc:: include/linux/dma-fence-array.h
105 :internal:
106
107.. kernel-doc:: drivers/dma-buf/reservation.c
108 :export:
109
110.. kernel-doc:: include/linux/reservation.h
111 :internal:
112
113.. kernel-doc:: drivers/dma-buf/sync_file.c
114 :export:
115
116.. kernel-doc:: include/linux/sync_file.h
117 :internal:
118
119Device Drivers DMA Management 49Device Drivers DMA Management
120----------------------------- 50-----------------------------
121 51