From patchwork Wed Sep 27 11:58:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foss X-Patchwork-Id: 9973865 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 286B0602D6 for ; Wed, 27 Sep 2017 11:59:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CAE627BFF for ; Wed, 27 Sep 2017 11:59:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 119612888E; Wed, 27 Sep 2017 11:59:07 +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 D341E27BFF for ; Wed, 27 Sep 2017 11:59:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C5B96E6F8; Wed, 27 Sep 2017 11:59:03 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by gabe.freedesktop.org (Postfix) with ESMTPS id 898436E6F9 for ; Wed, 27 Sep 2017 11:59:01 +0000 (UTC) Received: from localhost.localdomain (unknown [IPv6:2a02:8109:9a3f:ee3b:c7ab:3df6:4b82:1a62]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: robertfoss) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 2AFBF26CE5B; Wed, 27 Sep 2017 12:59:00 +0100 (BST) From: Robert Foss To: dri-devel@lists.freedesktop.org, robh@kernel.org, salidoa@google.com, seanpaul@chromium.org, zachr@google.com Subject: [PATCH hwc v2 2/6] drm_hwcomposer: Add support for IN_FENCE_FD property to DrmPlane Date: Wed, 27 Sep 2017 13:58:37 +0200 Message-Id: <20170927115841.29134-3-robert.foss@collabora.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170927115841.29134-1-robert.foss@collabora.com> References: <20170927115841.29134-1-robert.foss@collabora.com> Cc: Robert Foss 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 Add support for the IN_FENCE_FD property to DrmPlane. Signed-off-by: Robert Foss Reviewed-by: Sean Paul --- drmplane.cpp | 8 ++++++++ drmplane.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/drmplane.cpp b/drmplane.cpp index c4ea722..1f739ae 100644 --- a/drmplane.cpp +++ b/drmplane.cpp @@ -126,6 +126,10 @@ int DrmPlane::Init() { if (ret) ALOGI("Could not get alpha property"); + ret = drm_->GetPlaneProperty(*this, "IN_FENCE_FD", &in_fence_fd_property_); + if (ret) + ALOGI("Could not get IN_FENCE_FD property"); + return 0; } @@ -188,4 +192,8 @@ const DrmProperty &DrmPlane::rotation_property() const { const DrmProperty &DrmPlane::alpha_property() const { return alpha_property_; } + +const DrmProperty &DrmPlane::in_fence_fd_property() const { + return in_fence_fd_property_; +} } diff --git a/drmplane.h b/drmplane.h index 2e06986..5b73b08 100644 --- a/drmplane.h +++ b/drmplane.h @@ -54,6 +54,7 @@ class DrmPlane { const DrmProperty &src_h_property() const; const DrmProperty &rotation_property() const; const DrmProperty &alpha_property() const; + const DrmProperty &in_fence_fd_property() const; private: DrmResources *drm_; @@ -75,6 +76,7 @@ class DrmPlane { DrmProperty src_h_property_; DrmProperty rotation_property_; DrmProperty alpha_property_; + DrmProperty in_fence_fd_property_; }; }