dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Foss <robert.foss@collabora.com>
To: dri-devel@lists.freedesktop.org, Sean Paul <seanpaul@chromium.org>
Cc: Robert Foss <robert.foss@collabora.com>
Subject: [PATCH hwc v1 5/6] drm_hwcomposer: Add GetCrtcCount function
Date: Tue, 26 Sep 2017 08:24:45 +0200	[thread overview]
Message-ID: <20170926062446.6412-6-robert.foss@collabora.com> (raw)
In-Reply-To: <20170926062446.6412-1-robert.foss@collabora.com>

This GetCrtrcCount helper functions enables convenient
fetching of the number of Crtcs from DrmResources.

Signed-off-by: Robert Foss <robert.foss@collabora.com>
---
 drmresources.cpp | 4 ++++
 drmresources.h   | 1 +
 2 files changed, 5 insertions(+)

diff --git a/drmresources.cpp b/drmresources.cpp
index 762f5ef..0578cc6 100644
--- a/drmresources.cpp
+++ b/drmresources.cpp
@@ -241,6 +241,10 @@ DrmPlane *DrmResources::GetPlane(uint32_t id) const {
   return NULL;
 }
 
+uint32_t DrmResources::GetCrtcCount() const {
+  return (uint32_t) crtcs_.size();
+}
+
 uint32_t DrmResources::next_mode_id() {
   return ++mode_id_;
 }
diff --git a/drmresources.h b/drmresources.h
index a2d8d16..0cc2456 100644
--- a/drmresources.h
+++ b/drmresources.h
@@ -66,6 +66,7 @@ class DrmResources {
   int GetConnectorProperty(const DrmConnector &connector, const char *prop_name,
                            DrmProperty *property);
 
+  uint32_t GetCrtcCount() const;
   uint32_t next_mode_id();
 
   int CreatePropertyBlob(void *data, size_t length, uint32_t *blob_id);
-- 
2.11.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2017-09-26  6:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-26  6:24 [PATCH hwc v1 0/6] Implement fencing Robert Foss
2017-09-26  6:24 ` [PATCH hwc v1 1/6] drm_hwcomposer: Remove threading Robert Foss
2017-09-26  6:24 ` [PATCH hwc v1 2/6] drm_hwcomposer: Add support for IN_FENCE_FD property to DrmPlane Robert Foss
2017-09-26  6:24 ` [PATCH hwc v1 3/6] drm_hwcomposer: Submit in-fence to DRM Robert Foss
2017-09-26  6:24 ` [PATCH hwc v1 4/6] drm_hwcomposer: Add FENCE_OUT_PTR property to DrmCrtc Robert Foss
2017-09-26  6:24 ` Robert Foss [this message]
2017-09-26  6:24 ` [PATCH hwc v1 6/6] drm_hwcomposer: Add out-fence support Robert Foss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170926062446.6412-6-robert.foss@collabora.com \
    --to=robert.foss@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=seanpaul@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox