|author||Gustavo Padovan <firstname.lastname@example.org>||2016-08-05 10:39:37 -0300|
|committer||Sumit Semwal <email@example.com>||2016-08-11 15:33:24 +0530|
Documentation: add doc for sync_file_get_fence()
Document the new function added to sync_file.c v2: Adapt to fence_array v3: Take in Chris Wilson suggestions Signed-off-by: Gustavo Padovan <firstname.lastname@example.org> Acked-by: Christian König <email@example.com> Reviewed-by: Chris Wilson <firstname.lastname@example.org> Signed-off-by: Sumit Semwal <email@example.com>
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/sync_file.txt b/Documentation/sync_file.txt
index e8e2eba..b63a685 100644
@@ -64,6 +64,20 @@ The sync_file fd now can be sent to userspace.
If the creation process fail, or the sync_file needs to be released by any
other reason fput(sync_file->file) should be used.
+Receiving Sync Files from Userspace
+When userspace needs to send an in-fence to the driver it passes file descriptor
+of the Sync File to the kernel. The kernel can then retrieve the fences
+ struct fence *sync_file_get_fence(int fd);
+The returned reference is owned by the caller and must be disposed of
+afterwards using fence_put(). In case of error, a NULL is returned instead.
 struct sync_file in include/linux/sync_file.h
 All interfaces mentioned above defined in include/linux/sync_file.h