diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-05-18 21:26:04 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.com> | 2017-05-24 12:01:27 -0400 |
commit | c16f291dee8b7dc28d4bd0f395ccecf3f898cd21 (patch) | |
tree | 91219dec70851878d050308caad6177ea3b3bd2f | |
parent | 7fcd07506878db19510b6e7bd1f9153bce6702e3 (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.txt | 23 |
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 | ~~~~~~~~~~~~~~~~~~~ | 2 | Sync 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 | ||
7 | This document serves as a guide for device drivers writers on what the | 7 | This document serves as a guide for device drivers writers on what the |
8 | sync_file API is, and how drivers can support it. Sync file is the carrier of | 8 | sync_file API is, and how drivers can support it. Sync file is the carrier of |
@@ -46,16 +46,17 @@ Creating Sync Files | |||
46 | 46 | ||
47 | When a driver needs to send an out-fence userspace it creates a sync_file. | 47 | When a driver needs to send an out-fence userspace it creates a sync_file. |
48 | 48 | ||
49 | Interface: | 49 | Interface:: |
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 | ||
52 | The caller pass the out-fence and gets back the sync_file. That is just the | 53 | The caller pass the out-fence and gets back the sync_file. That is just the |
53 | first step, next it needs to install an fd on sync_file->file. So it gets an | 54 | first step, next it needs to install an fd on sync_file->file. So it gets an |
54 | fd: | 55 | fd:: |
55 | 56 | ||
56 | fd = get_unused_fd_flags(O_CLOEXEC); | 57 | fd = get_unused_fd_flags(O_CLOEXEC); |
57 | 58 | ||
58 | and installs it on sync_file->file: | 59 | and 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 | |||
71 | of the Sync File to the kernel. The kernel can then retrieve the fences | 72 | of the Sync File to the kernel. The kernel can then retrieve the fences |
72 | from it. | 73 | from it. |
73 | 74 | ||
74 | Interface: | 75 | Interface:: |
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 | |||
79 | afterwards using dma_fence_put(). In case of error, a NULL is returned instead. | 81 | afterwards using dma_fence_put(). In case of error, a NULL is returned instead. |
80 | 82 | ||
81 | References: | 83 | References: |
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 | 85 | 1. struct sync_file in include/linux/sync_file.h |
86 | 2. All interfaces mentioned above defined in include/linux/sync_file.h | ||