summaryrefslogtreecommitdiff
path: root/libkms++/crtc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkms++/crtc.cpp')
-rw-r--r--libkms++/crtc.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/libkms++/crtc.cpp b/libkms++/crtc.cpp
index b0a962e..9716c97 100644
--- a/libkms++/crtc.cpp
+++ b/libkms++/crtc.cpp
@@ -39,6 +39,17 @@ void Crtc::setup()
}
}
+void Crtc::restore_mode(Connector* conn)
+{
+ auto c = m_priv->drm_crtc;
+
+ uint32_t conns[] = { conn->id() };
+
+ drmModeSetCrtc(card().fd(), id(), c->buffer_id,
+ c->x, c->y,
+ conns, 1, &c->mode);
+}
+
void Crtc::print_short() const
{
auto c = m_priv->drm_crtc;