diff mbox

[hwc,v3,4/6] drm_hwcomposer: Add crtc() fetcher to DrmResources

Message ID 20170928164031.29720-5-robert.foss@collabora.com (mailing list archive)
State New, archived
Headers show

Commit Message

Robert Foss Sept. 28, 2017, 4:40 p.m. UTC
This is a fetcher for getting the vector of DrmCrtc objects
in DrmResources.

Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
---

Changes since v2:
  Sean Paul:
   - Replaced GetCrtcCount() with crtr()
   - Added r-b

 drmresources.cpp | 4 ++++
 drmresources.h   | 1 +
 2 files changed, 5 insertions(+)
diff mbox

Patch

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<std::unique_ptr<DrmCrtc>> & 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<std::unique_ptr<DrmCrtc>> &crtcs() const;
   uint32_t next_mode_id();
   int SetDisplayActiveMode(int display, const DrmMode &mode);
   int SetDpmsMode(int display, uint64_t mode);