From patchwork Fri Jul 1 13:05:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 9209857 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 7635560752 for ; Fri, 1 Jul 2016 13:05:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66B072868E for ; Fri, 1 Jul 2016 13:05:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B2FC2869C; Fri, 1 Jul 2016 13:05:35 +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 194C52868E for ; Fri, 1 Jul 2016 13:05:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 24E916EA63; Fri, 1 Jul 2016 13:05:34 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk0-f196.google.com (mail-qk0-f196.google.com [209.85.220.196]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3921E6EA61 for ; Fri, 1 Jul 2016 13:05:32 +0000 (UTC) Received: by mail-qk0-f196.google.com with SMTP id t2so180729qkh.2 for ; Fri, 01 Jul 2016 06:05:32 -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; bh=84CgvAQHChND49lndO5VfWHxy0X7fclz1SG9VaQVSsQ=; b=iOHqEE2P9DGcwSOPy5lftsEJUByUKzrWdcQytdcWk3p+TWpeIaWhicmtkWlld5taur gRlno1azsWMMwS7c+I0mxHnF/cLX5NzABN8Jar8LFm1seIHdmqVys6rZZtbSAzGiQpLM UD1ERFi01uui9yI9CWvMZYOOpgBzhgivpSAkDyP3ZdT/3K1t57ascgVe8bn1cqPDA19B 0QJ12502dQJ9eSh8Guba9Vzd/xipFonoeH7FSrOCnGHcspsCok3eUUtNmm9BQVtwph3V lqM6MDGSRLD3OFOfiBHYqAwtv/KolSbdNjrQ2pMww39cK9DnOOTW5RtF2XcKi36oaF4x vcBQ== X-Gm-Message-State: ALyK8tILGfrIG2uLT3yl5MzxRrAjfFg8kSzuFaBeBHj2mRVJFUd5vQZORKxhgTcadJt5AA== X-Received: by 10.129.105.194 with SMTP id e185mr9656375ywc.13.1467378330958; Fri, 01 Jul 2016 06:05:30 -0700 (PDT) Received: from jade.localdomain ([189.61.225.79]) by smtp.gmail.com with ESMTPSA id g4sm6516973ywa.48.2016.07.01.06.05.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Jul 2016 06:05:30 -0700 (PDT) From: Gustavo Padovan To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 4/4] Documentation: add doc for sync_file_get_fence() Date: Fri, 1 Jul 2016 10:05:07 -0300 Message-Id: <1467378307-28088-5-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1467378307-28088-1-git-send-email-gustavo@padovan.org> References: <1467378307-28088-1-git-send-email-gustavo@padovan.org> 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: , MIME-Version: 1.0 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 --- 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