summaryrefslogtreecommitdiff
path: root/kms++/src
diff options
context:
space:
mode:
Diffstat (limited to 'kms++/src')
-rw-r--r--kms++/src/card.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/kms++/src/card.cpp b/kms++/src/card.cpp
index d8d89b2..f7f1a5a 100644
--- a/kms++/src/card.cpp
+++ b/kms++/src/card.cpp
@@ -224,4 +224,24 @@ void Card::call_page_flip_handlers()
drmHandleEvent(fd(), &ev);
}
+int Card::disable_all()
+{
+ AtomicReq req(*this);
+
+ for (Crtc* c : m_crtcs) {
+ req.add(c, {
+ { "ACTIVE", 0 },
+ });
+ }
+
+ for (Plane* p : m_planes) {
+ req.add(p, {
+ { "FB_ID", 0 },
+ { "CRTC_ID", 0 },
+ });
+ }
+
+ return req.commit_sync(true);
+}
+
}