Skip to content

Commit eae1760

Browse files
robclarksumitsemwal
authored andcommitted
doc: update/fixup dma-buf related DocBook
Split out dma-buf related parts into their own section, add missing files, and write a bit of overview about how it all fits together. Signed-off-by: Rob Clark <[email protected]> Signed-off-by: Sumit Semwal <[email protected]>
1 parent dad6c39 commit eae1760

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

Documentation/DocBook/device-drivers.tmpl

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,44 @@ X!Edrivers/base/interface.c
128128
!Edrivers/base/platform.c
129129
!Edrivers/base/bus.c
130130
</sect1>
131-
<sect1><title>Device Drivers DMA Management</title>
131+
<sect1>
132+
<title>Buffer Sharing and Synchronization</title>
133+
<para>
134+
The dma-buf subsystem provides the framework for sharing buffers
135+
for hardware (DMA) access across multiple device drivers and
136+
subsystems, and for synchronizing asynchronous hardware access.
137+
</para>
138+
<para>
139+
This is used, for example, by drm "prime" multi-GPU support, but
140+
is of course not limited to GPU use cases.
141+
</para>
142+
<para>
143+
The three main components of this are: (1) dma-buf, representing
144+
a sg_table and exposed to userspace as a file descriptor to allow
145+
passing between devices, (2) fence, which provides a mechanism
146+
to signal when one device as finished access, and (3) reservation,
147+
which manages the shared or exclusive fence(s) associated with
148+
the buffer.
149+
</para>
150+
<sect2><title>dma-buf</title>
132151
!Edrivers/dma-buf/dma-buf.c
152+
!Iinclude/linux/dma-buf.h
153+
</sect2>
154+
<sect2><title>reservation</title>
155+
!Pdrivers/dma-buf/reservation.c Reservation Object Overview
156+
!Edrivers/dma-buf/reservation.c
157+
!Iinclude/linux/reservation.h
158+
</sect2>
159+
<sect2><title>fence</title>
133160
!Edrivers/dma-buf/fence.c
134-
!Edrivers/dma-buf/seqno-fence.c
135161
!Iinclude/linux/fence.h
162+
!Edrivers/dma-buf/seqno-fence.c
136163
!Iinclude/linux/seqno-fence.h
137-
!Edrivers/dma-buf/reservation.c
138-
!Iinclude/linux/reservation.h
139164
!Edrivers/dma-buf/sync_file.c
140165
!Iinclude/linux/sync_file.h
166+
</sect2>
167+
</sect1>
168+
<sect1><title>Device Drivers DMA Management</title>
141169
!Edrivers/base/dma-coherent.c
142170
!Edrivers/base/dma-mapping.c
143171
</sect1>

0 commit comments

Comments
 (0)