From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752346AbcHEHXd (ORCPT ); Fri, 5 Aug 2016 03:23:33 -0400 Received: from mail.fireflyinternet.com ([109.228.58.192]:49975 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750732AbcHEHXb (ORCPT ); Fri, 5 Aug 2016 03:23:31 -0400 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Date: Fri, 5 Aug 2016 08:23:02 +0100 From: Chris Wilson To: Gustavo Padovan Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Daniel Stone , Daniel Vetter , Rob Clark , Greg Hackmann , John Harrison , laurent.pinchart@ideasonboard.com, seanpaul@google.com, marcheu@google.com, m.chehab@samsung.com, Sumit Semwal , Maarten Lankhorst , Gustavo Padovan Subject: Re: [PATCH v5 4/5] Documentation: add doc for sync_file_get_fence() Message-ID: <20160805072302.GD12034@nuc-i3427.alporthouse.com> Mail-Followup-To: Chris Wilson , Gustavo Padovan , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Daniel Stone , Daniel Vetter , Rob Clark , Greg Hackmann , John Harrison , laurent.pinchart@ideasonboard.com, seanpaul@google.com, marcheu@google.com, m.chehab@samsung.com, Sumit Semwal , Maarten Lankhorst , Gustavo Padovan References: <1470363854-7846-1-git-send-email-gustavo@padovan.org> <1470363854-7846-4-git-send-email-gustavo@padovan.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1470363854-7846-4-git-send-email-gustavo@padovan.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 04, 2016 at 11:24:13PM -0300, Gustavo Padovan wrote: > From: Gustavo Padovan > > Document the new function added to sync_file.c > > v2: Adapt to fence_array > > Signed-off-by: Gustavo Padovan > Acked-by: Christian König > --- > 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, Intel Open Source Technology Centre