summaryrefslogtreecommitdiff
path: root/libkms++
diff options
context:
space:
mode:
authorJyri Sarha <jsarha@ti.com>2015-10-20 16:47:11 +0300
committerJyri Sarha <jsarha@ti.com>2015-10-20 19:18:32 +0300
commit18ba50b6b24b75bc23346cf232e01ec47b050f81 (patch)
treeafbf62513de258ba15c47f2ef4052f269ca7ed72 /libkms++
parent63d9b04d14677d09b6279566f0e43d00c252770e (diff)
libkms++/crtc: Add methods for getting details of the DRM object
Diffstat (limited to 'libkms++')
-rw-r--r--libkms++/crtc.cpp41
-rw-r--r--libkms++/crtc.h9
2 files changed, 50 insertions, 0 deletions
diff --git a/libkms++/crtc.cpp b/libkms++/crtc.cpp
index 9716c97..321670c 100644
--- a/libkms++/crtc.cpp
+++ b/libkms++/crtc.cpp
@@ -87,4 +87,45 @@ int Crtc::page_flip(Framebuffer& fb, void *data)
{
return drmModePageFlip(card().fd(), id(), fb.id(), DRM_MODE_PAGE_FLIP_EVENT, data);
}
+
+uint32_t Crtc::buffer_id() const
+{
+ return m_priv->drm_crtc->buffer_id;
+}
+
+uint32_t Crtc::x() const
+{
+ return m_priv->drm_crtc->x;
+}
+
+uint32_t Crtc::y() const
+{
+ return m_priv->drm_crtc->y;
+}
+
+uint32_t Crtc::width() const
+{
+ return m_priv->drm_crtc->width;
+}
+
+uint32_t Crtc::height() const
+{
+ return m_priv->drm_crtc->height;
+}
+
+int Crtc::mode_valid() const
+{
+ return m_priv->drm_crtc->mode_valid;
+}
+
+Videomode Crtc::mode() const
+{
+ return drm_mode_to_video_mode(m_priv->drm_crtc->mode);
+}
+
+int Crtc::gamma_size() const
+{
+ return m_priv->drm_crtc->gamma_size;
+}
+
}
diff --git a/libkms++/crtc.h b/libkms++/crtc.h
index 053c77d..7581302 100644
--- a/libkms++/crtc.h
+++ b/libkms++/crtc.h
@@ -26,6 +26,15 @@ public:
int page_flip(Framebuffer& fb, void *data);
int page_flip(Framebuffer& fb, PageFlipHandlerBase* data) { return page_flip(fb, (void*)data); }
+
+ uint32_t buffer_id() const;
+ uint32_t x() const;
+ uint32_t y() const;
+ uint32_t width() const;
+ uint32_t height() const;
+ int mode_valid() const;
+ Videomode mode() const;
+ int gamma_size() const;
private:
Crtc(Card& card, uint32_t id, uint32_t idx);
~Crtc();