Message ID | 1470363854-7846-4-git-send-email-gustavo@padovan.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Aug 04, 2016 at 11:24:13PM -0300, Gustavo Padovan wrote: > From: Gustavo Padovan <gustavo.padovan@collabora.co.uk> > > Document the new function added to sync_file.c > > v2: Adapt to fence_array > > Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> > Acked-by: Christian König <christian.koenig@amd.com> > --- > Documentation/sync_file.txt | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/Documentation/sync_file.txt b/Documentation/sync_file.txt > index e8e2eba..ae2dbad1 100644 > --- a/Documentation/sync_file.txt > +++ b/Documentation/sync_file.txt > @@ -64,6 +64,21 @@ 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 pass file descriptor s/pass/passes/ > +of the Sync File to the kernel. The kernel then can retrieve the fences /then can/can then/ > +from it. > + > +Interface: > + struct fence *sync_file_get_fence(int fd); > + > + > +The function return a struct fence pointer referencing the fence(s) in the Sync > +File. + 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. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> -Chris
diff --git a/Documentation/sync_file.txt b/Documentation/sync_file.txt index e8e2eba..ae2dbad1 100644 --- a/Documentation/sync_file.txt +++ b/Documentation/sync_file.txt @@ -64,6 +64,21 @@ 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 pass file descriptor +of the Sync File to the kernel. The kernel then can retrieve the fences +from it. + +Interface: + struct fence *sync_file_get_fence(int fd); + + +The function return a struct fence pointer referencing the fence(s) in the Sync +File. + + References: [1] struct sync_file in include/linux/sync_file.h [2] All interfaces mentioned above defined in include/linux/sync_file.h