summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();