From patchwork Tue Jul 12 18:08:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 9225895 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EA9EE60868 for ; Tue, 12 Jul 2016 18:09:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E04A227FA6 for ; Tue, 12 Jul 2016 18:09:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D317F2807E; Tue, 12 Jul 2016 18:09:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B33627FA6 for ; Tue, 12 Jul 2016 18:09:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8A7E76E5CC; Tue, 12 Jul 2016 18:09:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw0-f196.google.com (mail-yw0-f196.google.com [209.85.161.196]) by gabe.freedesktop.org (Postfix) with ESMTPS id DF63C6E5CC for ; Tue, 12 Jul 2016 18:09:15 +0000 (UTC) Received: by mail-yw0-f196.google.com with SMTP id c13so1508522ywh.2 for ; Tue, 12 Jul 2016 11:09:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zTMqq3PxFuMRYmY6MSlI8yja8Oqq9e3dlrT+tBH5/e4=; b=RmZlzgDNWrAmdz7q5UsEsxtjS7jeRozUIvtRK9t48WqB54T5pemcoAntBhJc+Q5rk3 4erxHDLKUxX+UTa0OsESJLWabPbHWp7HROeBQNnCsJagySnL4bIMfkXVS+wWkWd4h3Zc EhEN6XA7BRxe0mOhG52V3e06fjguAXcyMn5SuFkJkStRvr+DpXEpO5+ePurA6paho1Y3 nwf3WyXEYEmuHQKAU/Pnzi68GN56cgxr4ciY/EbCMKAKHfVUMb27OGULbdwHQulbOGTB llOEtRTuJw0v6Y2+qmGUx8WWWA3UNWkOufpfoufJUPM7ez0SzyTuZZZbZmU5dZwKK8Qf ipqQ== X-Gm-Message-State: ALyK8tL5ybIgr5VzBDo+e8iLef3F4ePspukFMfUh5brEfUsK5qBpXTE/eqVs2lJly8TtmA== X-Received: by 10.37.219.18 with SMTP id g18mr1477563ybf.180.1468346954777; Tue, 12 Jul 2016 11:09:14 -0700 (PDT) Received: from jade.localdomain ([189.61.225.79]) by smtp.gmail.com with ESMTPSA id v68sm196062ywg.31.2016.07.12.11.09.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jul 2016 11:09:14 -0700 (PDT) From: Gustavo Padovan To: dri-devel@lists.freedesktop.org Subject: [PATCH v4 4/5] Documentation: add doc for sync_file_get_fence() Date: Tue, 12 Jul 2016 15:08:44 -0300 Message-Id: <1468346925-12774-4-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1468346925-12774-1-git-send-email-gustavo@padovan.org> References: <1468346925-12774-1-git-send-email-gustavo@padovan.org> MIME-Version: 1.0 Cc: marcheu@google.com, Daniel Stone , seanpaul@google.com, Daniel Vetter , linux-kernel@vger.kernel.org, laurent.pinchart@ideasonboard.com, Gustavo Padovan , John Harrison , m.chehab@samsung.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 +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