aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2017-05-18 21:26:04 -0400
committerGustavo Padovan <gustavo.padovan@collabora.com>2017-05-24 12:01:27 -0400
commitc16f291dee8b7dc28d4bd0f395ccecf3f898cd21 (patch)
tree91219dec70851878d050308caad6177ea3b3bd2f
parent7fcd07506878db19510b6e7bd1f9153bce6702e3 (diff)
sync_file.txt: standardize document format
Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Use markup for document title and authorship; - Mark literal blocks; - Use a numbered list for references. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Link: http://patchwork.freedesktop.org/patch/msgid/e781f61e582e7c7eb5de456608043aff9fe2b2b5.1495157082.git.mchehab@s-opensource.com
-rw-r--r--Documentation/sync_file.txt23
1 files changed, 13 insertions, 10 deletions
diff --git a/Documentation/sync_file.txt b/Documentation/sync_file.txt
index c3d033a06e8d..496fb2c3b3e6 100644
--- a/Documentation/sync_file.txt
+++ b/Documentation/sync_file.txt
@@ -1,8 +1,8 @@
1 Sync File API Guide 1===================
2 ~~~~~~~~~~~~~~~~~~~ 2Sync File API Guide
3===================
3 4
4 Gustavo Padovan 5:Author: Gustavo Padovan <gustavo at padovan dot org>
5 <gustavo at padovan dot org>
6 6
7This document serves as a guide for device drivers writers on what the 7This document serves as a guide for device drivers writers on what the
8sync_file API is, and how drivers can support it. Sync file is the carrier of 8sync_file API is, and how drivers can support it. Sync file is the carrier of
@@ -46,16 +46,17 @@ Creating Sync Files
46 46
47When a driver needs to send an out-fence userspace it creates a sync_file. 47When a driver needs to send an out-fence userspace it creates a sync_file.
48 48
49Interface: 49Interface::
50
50 struct sync_file *sync_file_create(struct dma_fence *fence); 51 struct sync_file *sync_file_create(struct dma_fence *fence);
51 52
52The caller pass the out-fence and gets back the sync_file. That is just the 53The caller pass the out-fence and gets back the sync_file. That is just the
53first step, next it needs to install an fd on sync_file->file. So it gets an 54first step, next it needs to install an fd on sync_file->file. So it gets an
54fd: 55fd::
55 56
56 fd = get_unused_fd_flags(O_CLOEXEC); 57 fd = get_unused_fd_flags(O_CLOEXEC);
57 58
58and installs it on sync_file->file: 59and installs it on sync_file->file::
59 60
60 fd_install(fd, sync_file->file); 61 fd_install(fd, sync_file->file);
61 62
@@ -71,7 +72,8 @@ When userspace needs to send an in-fence to the driver it passes file descriptor
71of the Sync File to the kernel. The kernel can then retrieve the fences 72of the Sync File to the kernel. The kernel can then retrieve the fences
72from it. 73from it.
73 74
74Interface: 75Interface::
76
75 struct dma_fence *sync_file_get_fence(int fd); 77 struct dma_fence *sync_file_get_fence(int fd);
76 78
77 79
@@ -79,5 +81,6 @@ The returned reference is owned by the caller and must be disposed of
79afterwards using dma_fence_put(). In case of error, a NULL is returned instead. 81afterwards using dma_fence_put(). In case of error, a NULL is returned instead.
80 82
81References: 83References:
82[1] struct sync_file in include/linux/sync_file.h 84
83[2] All interfaces mentioned above defined in include/linux/sync_file.h 851. struct sync_file in include/linux/sync_file.h
862. All interfaces mentioned above defined in include/linux/sync_file.h