From 3174f3efd6768667e568a27ac98ca04d063a9071 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Mon, 19 Dec 2016 17:18:48 +0200 Subject: crtc: add disable_mode() Add crtc::disable_mode() for disabling the crtc. Signed-off-by: Tomi Valkeinen --- kms++/inc/kms++/crtc.h | 1 + kms++/src/crtc.cpp | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'kms++') diff --git a/kms++/inc/kms++/crtc.h b/kms++/inc/kms++/crtc.h index f3b525a..14860ba 100644 --- a/kms++/inc/kms++/crtc.h +++ b/kms++/inc/kms++/crtc.h @@ -21,6 +21,7 @@ public: int set_plane(Plane *plane, Framebuffer &fb, int32_t dst_x, int32_t dst_y, uint32_t dst_w, uint32_t dst_h, float src_x, float src_y, float src_w, float src_h); + int disable_mode(); int disable_plane(Plane* plane); diff --git a/kms++/src/crtc.cpp b/kms++/src/crtc.cpp index bad7d31..4c2f5ce 100644 --- a/kms++/src/crtc.cpp +++ b/kms++/src/crtc.cpp @@ -60,6 +60,11 @@ int Crtc::set_mode(Connector* conn, Framebuffer& fb, const Videomode& mode) conns, 1, &drmmode); } +int Crtc::disable_mode() +{ + return drmModeSetCrtc(card().fd(), id(), 0, 0, 0, 0, 0, 0); +} + static inline uint32_t conv(float x) { // XXX fix the conversion for fractional part -- cgit v1.2.3