summaryrefslogtreecommitdiff
path: root/libkms++
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2015-11-06 21:54:15 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2015-11-06 21:59:36 +0200
commit1857c46e0967adbf276d8a9afaf5dac9afa355e4 (patch)
treeb9fe440bea067d5c5aab80705826159a83826b0e /libkms++
parent887fb3bf2bf6496687fcb53f95092690dae90855 (diff)
card: add get_crtcs()
Diffstat (limited to 'libkms++')
-rw-r--r--libkms++/card.cpp11
-rw-r--r--libkms++/card.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/libkms++/card.cpp b/libkms++/card.cpp
index 63a068a..34dbc32 100644
--- a/libkms++/card.cpp
+++ b/libkms++/card.cpp
@@ -182,6 +182,17 @@ vector<Connector*> Card::get_connectors() const
return v;
}
+vector<Crtc*> Card::get_crtcs() const
+{
+ vector<Crtc*> v;
+ for(auto pair : m_obmap) {
+ auto p = dynamic_cast<Crtc*>(pair.second);
+ if (p)
+ v.push_back(p);
+ }
+ return v;
+}
+
vector<Plane*> Card::get_planes() const
{
vector<Plane*> v;
diff --git a/libkms++/card.h b/libkms++/card.h
index f35ba60..dc97703 100644
--- a/libkms++/card.h
+++ b/libkms++/card.h
@@ -37,6 +37,7 @@ public:
void print_short() const;
std::vector<Connector*> get_connectors() const;
+ std::vector<Crtc*> get_crtcs() const;
std::vector<DrmObject*> get_objects() const;
std::vector<Plane*> get_planes() const;