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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a fetcher for getting the vector of DrmCrtc objects
in DrmResources.

Signed-off-by: Robert Foss <robert.foss@xxxxxxxxxxxxx>
Reviewed-by: Sean Paul <seanpaul@xxxxxxxxxxxx>
---

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<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);
-- 
2.11.0

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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux