diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-10-20 11:32:40 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-10-20 11:32:40 +0300 |
commit | 32255b811edae510304389de4e30fe3e4aaa9ab7 (patch) | |
tree | 5a4ee2862e2d1bdefc16c151b0b63ea1305e83fd /kms++ | |
parent | 34a3e4916fc076d4a687d96ac4ad4484ad046d6d (diff) |
Card: add disable_all()
Diffstat (limited to 'kms++')
-rw-r--r-- | kms++/inc/kms++/card.h | 2 | ||||
-rw-r--r-- | kms++/src/card.cpp | 20 |
2 files changed, 22 insertions, 0 deletions
diff --git a/kms++/inc/kms++/card.h b/kms++/inc/kms++/card.h index 90ad1f6..c86278d 100644 --- a/kms++/inc/kms++/card.h +++ b/kms++/inc/kms++/card.h @@ -49,6 +49,8 @@ public: void call_page_flip_handlers(); + int disable_all(); + private: void restore_modes(); 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); +} + } |