From patchwork Thu Mar 9 17:57:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Perttunen X-Patchwork-Id: 9613803 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 31F3660414 for ; Thu, 9 Mar 2017 18:00:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B5F9286D7 for ; Thu, 9 Mar 2017 18:00:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2035C286DB; Thu, 9 Mar 2017 18:00:17 +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]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E5B0F286D7 for ; Thu, 9 Mar 2017 18:00:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3D6E76ECF6; Thu, 9 Mar 2017 18:00:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kapsi.fi (mail.kapsi.fi [IPv6:2001:1bc8:1004::1:25]) by gabe.freedesktop.org (Postfix) with ESMTPS id A9DED6ECF4 for ; Thu, 9 Mar 2017 18:00:10 +0000 (UTC) Received: from dsl-espbrasgw1-54f9c1-183.dhcp.inet.fi ([84.249.193.183] helo=toshino.dhcp.inet.fi) by mail.kapsi.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1cm2MB-0001rA-MD; Thu, 09 Mar 2017 20:00:07 +0200 From: Mikko Perttunen To: thierry.reding@gmail.com Subject: [PATCH 2/3] drm/tegra: Add sync file support to submit interface Date: Thu, 9 Mar 2017 19:57:17 +0200 Message-Id: <20170309175718.14843-3-mperttunen@nvidia.com> X-Mailer: git-send-email 2.11.1 In-Reply-To: <20170309175718.14843-1-mperttunen@nvidia.com> References: <20170309175718.14843-1-mperttunen@nvidia.com> X-SA-Exim-Connect-IP: 84.249.193.183 X-SA-Exim-Mail-From: mperttunen@nvidia.com X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Cc: linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org, Mikko Perttunen 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 Adds ability to pass sync file based prefences and get back sync file based postfences during job submission. Both fence fd's are passed in the `fence` field. A new `flags` field is used to specify if the prefence should be waited or a postfence created. Signed-off-by: Mikko Perttunen --- include/uapi/drm/tegra_drm.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/uapi/drm/tegra_drm.h b/include/uapi/drm/tegra_drm.h index d954f8c33321..b85689c15d8f 100644 --- a/include/uapi/drm/tegra_drm.h +++ b/include/uapi/drm/tegra_drm.h @@ -117,6 +117,9 @@ struct drm_tegra_waitchk { __u32 thresh; }; +#define DRM_TEGRA_SUBMIT_WAIT_FENCE_FD (1 << 0) +#define DRM_TEGRA_SUBMIT_CREATE_FENCE_FD (1 << 1) + struct drm_tegra_submit { __u64 context; __u32 num_syncpts; @@ -129,9 +132,10 @@ struct drm_tegra_submit { __u64 cmdbufs; __u64 relocs; __u64 waitchks; - __u32 fence; /* Return value */ + __u32 fence; + __u32 flags; - __u32 reserved[5]; /* future expansion */ + __u32 reserved[4]; /* future expansion */ }; #define DRM_TEGRA_GEM_TILING_MODE_PITCH 0