mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gustavo Padovan <gustavo@padovan.org>
To: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org,
	Daniel Stone <daniels@collabora.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Rob Clark <robdclark@gmail.com>,
	Greg Hackmann <ghackmann@google.com>,
	John Harrison <John.C.Harrison@Intel.com>,
	laurent.pinchart@ideasonboard.com, seanpaul@google.com,
	marcheu@google.com, m.chehab@samsung.com,
	Sumit Semwal <sumit.semwal@linaro.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: [PATCH 3/3] Documentation: add doc for sync_file_get_fence()
Date: Thu,  9 Jun 2016 12:05:30 -0300	[thread overview]
Message-ID: <1465484730-8128-3-git-send-email-gustavo@padovan.org> (raw)
In-Reply-To: <1465484730-8128-1-git-send-email-gustavo@padovan.org>

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>
---
 Documentation/sync_file.txt | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/Documentation/sync_file.txt b/Documentation/sync_file.txt
index eaf8297..46f5769 100644
--- a/Documentation/sync_file.txt
+++ b/Documentation/sync_file.txt
@@ -64,6 +64,25 @@ 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 sync_file
+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. If the Sync File contains only one fence, this fence is returned. But if
+has more than one fence a fence_array[3] is returned. However the callers only
+see the arrays' base class which is struct fence. In both cases a reference to
+the returned fence is held.
+
+
 References:
 [1] struct sync_file in include/linux/sync_file.h
 [2] All interfaces mentioned above defined in include/linux/sync_file.h
+[1] struct fence_array in include/linux/fence-array.h
-- 
2.5.5

  parent reply	other threads:[~2016-06-09 15:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-09 15:05 [PATCH 1/3] dma-buf/sync_file: only enable fence signalling during wait Gustavo Padovan
2016-06-09 15:05 ` [PATCH 2/3] dma-buf/sync_file: add sync_file_get_fence() Gustavo Padovan
2016-06-10 12:23   ` Chris Wilson
2016-06-13 21:21     ` Gustavo Padovan
2016-06-09 15:05 ` Gustavo Padovan [this message]
2016-06-09 22:12 ` [PATCH 1/3] dma-buf/sync_file: only enable fence signalling during wait Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1465484730-8128-3-git-send-email-gustavo@padovan.org \
    --to=gustavo@padovan.org \
    --cc=John.C.Harrison@Intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniels@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ghackmann@google.com \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marcheu@google.com \
    --cc=robdclark@gmail.com \
    --cc=seanpaul@google.com \
    --cc=sumit.semwal@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®