summaryrefslogtreecommitdiff
path: root/kms++/src
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2017-10-20 11:32:40 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-10-20 11:32:40 +0300
commit32255b811edae510304389de4e30fe3e4aaa9ab7 (patch)
tree5a4ee2862e2d1bdefc16c151b0b63ea1305e83fd /kms++/src
parent34a3e4916fc076d4a687d96ac4ad4484ad046d6d (diff)
Card: add disable_all()
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);
+}
+
}