From patchwork Thu Sep 28 16:40:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foss X-Patchwork-Id: 9976385 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 ECC8A6034B for ; Thu, 28 Sep 2017 16:41:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF7A2296F0 for ; Thu, 28 Sep 2017 16:41:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDBE9296FD; Thu, 28 Sep 2017 16:41:12 +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 78168296F0 for ; Thu, 28 Sep 2017 16:41:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 505936E9B4; Thu, 28 Sep 2017 16:40:56 +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 [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0D5BE6E994 for ; Thu, 28 Sep 2017 16:40:42 +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 7892526D4E2; Thu, 28 Sep 2017 17:40:40 +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 v3 4/6] drm_hwcomposer: Add crtc() fetcher to DrmResources Date: Thu, 28 Sep 2017 18:40:29 +0200 Message-Id: <20170928164031.29720-5-robert.foss@collabora.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170928164031.29720-1-robert.foss@collabora.com> References: <20170928164031.29720-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 This is a fetcher for getting the vector of DrmCrtc objects in DrmResources. Signed-off-by: Robert Foss Reviewed-by: Sean Paul --- Changes since v2: Sean Paul: - Replaced GetCrtcCount() with crtr() - Added r-b drmresources.cpp | 4 ++++ drmresources.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drmresources.cpp b/drmresources.cpp index 6b8ed03..ea23cce 100644 --- a/drmresources.cpp +++ b/drmresources.cpp @@ -245,6 +245,10 @@ DrmPlane *DrmResources::GetPlane(uint32_t id) const { return NULL; } +const std::vector> & DrmResources::crtcs() const { + return crtcs_; +} + uint32_t DrmResources::next_mode_id() { return ++mode_id_; } diff --git a/drmresources.h b/drmresources.h index 011f87e..5cca11b 100644 --- a/drmresources.h +++ b/drmresources.h @@ -68,6 +68,7 @@ class DrmResources { int GetConnectorProperty(const DrmConnector &connector, const char *prop_name, DrmProperty *property); + const std::vector> &crtcs() const; uint32_t next_mode_id(); int SetDisplayActiveMode(int display, const DrmMode &mode); int SetDpmsMode(int display, uint64_t mode);