From patchwork Mon Jul 4 23:57:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 9213239 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 C851B60467 for ; Mon, 4 Jul 2016 23:57:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B56F028790 for ; Mon, 4 Jul 2016 23:57:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA3FB287E0; Mon, 4 Jul 2016 23:57:36 +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 44E8228790 for ; Mon, 4 Jul 2016 23:57:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7E47C6E53C; Mon, 4 Jul 2016 23:57:35 +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 5BE246E53C for ; Mon, 4 Jul 2016 23:57:33 +0000 (UTC) Received: by mail-yw0-f195.google.com with SMTP id f75so6594397ywb.3 for ; Mon, 04 Jul 2016 16:57:33 -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=No95ZqIJHhW/m10BI69ufyYmyP4+T/mQM20PyydQBWc9+3CAizjl2Zoo0gaTbPDJgr 58+9aJuHsUt2J85cfNUyYNOqJ2NdpbMSPr8sEx7lAk6WXc88/6awMtlmWxBsRVmt/OWv hdEiJ0z6qoIpC9qwwg6rBbi0G+ASrSENmHvDEMp6x7bLQ6mv/jOEN5Y8qYuwe6ir6Afr zXQSjCjCYrvLkYPwCD71PkGv5LNPvH27/uBRBL2tJgEMz7Uq/Tp94Uu9ZrvIjejuHRpT vWbLZFdDe6UNY1V4sCv5NAMjiaIPqk31SUBmcomD8cLjcWnS/7i5yRbYAQ9v04yG2CpT h5Cg== X-Gm-Message-State: ALyK8tJJadW7Dt8bOzwUHALZXb0GkkK12rxXnuvWrkLro/mCp4i/eiZgVIVnp/ZKAU81pQ== X-Received: by 10.129.125.2 with SMTP id y2mr9122560ywc.188.1467676652364; Mon, 04 Jul 2016 16:57:32 -0700 (PDT) Received: from jade.localdomain ([189.61.225.79]) by smtp.gmail.com with ESMTPSA id t8sm8573299ywc.40.2016.07.04.16.57.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jul 2016 16:57:31 -0700 (PDT) From: Gustavo Padovan To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 4/4] Documentation: add doc for sync_file_get_fence() Date: Mon, 4 Jul 2016 20:57:08 -0300 Message-Id: <1467676628-4121-5-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1467676628-4121-1-git-send-email-gustavo@padovan.org> References: <1467676628-4121-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