From patchwork Fri Aug 5 02:24:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 9264721 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 EB21460467 for ; Fri, 5 Aug 2016 02:25:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC70A283AC for ; Fri, 5 Aug 2016 02:25:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D12D828409; Fri, 5 Aug 2016 02:25:30 +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 6F087283AC for ; Fri, 5 Aug 2016 02:25:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BE56B6EAD0; Fri, 5 Aug 2016 02:25:25 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw0-f195.google.com (mail-yw0-f195.google.com [209.85.161.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5C3C86EAC7 for ; Fri, 5 Aug 2016 02:24:47 +0000 (UTC) Received: by mail-yw0-f195.google.com with SMTP id r9so21100224ywg.2 for ; Thu, 04 Aug 2016 19:24:47 -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=E3RRYLORZaubGfE513Gc/X/u2ADULQkSOLGboAlHa6+drWxVzA1+HFeGEi8IQz8+Yo XdDZu3GBEp3W5POTbnNUYdY35LUxbEwFe0iyu81yORZRPabwEmeaavvleIbXZBc15v/n bFmjOkMO+BwTJg6+mbjsinfUgiom5Epe3KwDM7fC7xh9xt++Rh6Qdkt4QgOtXkI5M5+b JT9OnmmrQEwNxk4bTHChgOxToH0oHOq38bfb/H3JEN7q8AvM68pfYlF+XDJiXGIUmqBC 1T0TQft87PrUcdGJq8SRx0+I4oTE7yHRgsHPB+cdnpxTTUNXvSeqbCDgWhi5zCMXWPnB 0j3w== X-Gm-Message-State: AEkoouuXcWuqV9S/wRy0pizmfOcMNDEalH0hBfiuJ/IJZuosoExNpiMkYvuffopFx+l2ig== X-Received: by 10.129.131.16 with SMTP id t16mr59597854ywf.192.1470363885294; Thu, 04 Aug 2016 19:24:45 -0700 (PDT) Received: from jade.localdomain ([201.82.189.183]) by smtp.gmail.com with ESMTPSA id j189sm6894648ywc.32.2016.08.04.19.24.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Aug 2016 19:24:44 -0700 (PDT) From: Gustavo Padovan To: dri-devel@lists.freedesktop.org Subject: [PATCH v5 4/5] Documentation: add doc for sync_file_get_fence() Date: Thu, 4 Aug 2016 23:24:13 -0300 Message-Id: <1470363854-7846-4-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1470363854-7846-1-git-send-email-gustavo@padovan.org> References: <1470363854-7846-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 Reviewed-by: Chris Wilson --- 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