summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 51cbdf3)
raw | patch | inline | side by side (from parent 1: 51cbdf3)
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Mon, 30 May 2016 10:51:49 +0000 (13:51 +0300) | ||
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Mon, 30 May 2016 10:52:34 +0000 (13:52 +0300) |
libkms++/atomicreq.cpp | patch | blob | history | |
libkms++/atomicreq.h | patch | blob | history |
diff --git a/libkms++/atomicreq.cpp b/libkms++/atomicreq.cpp
index 0d895daaecb7b5de7675d3af7fbae5f024ce58a1..3aa2ff638dd3d2090e1ec33fba048a9a49b291a0 100644 (file)
--- a/libkms++/atomicreq.cpp
+++ b/libkms++/atomicreq.cpp
add(ob, kvp.first, kvp.second);
}
-int AtomicReq::test()
+int AtomicReq::test(bool allow_modeset)
{
uint32_t flags = DRM_MODE_ATOMIC_TEST_ONLY;
+ if (allow_modeset)
+ flags |= DRM_MODE_ATOMIC_ALLOW_MODESET;
+
return drmModeAtomicCommit(m_card.fd(), m_req, flags, 0);
}
-int AtomicReq::commit(void* data)
+int AtomicReq::commit(void* data, bool allow_modeset)
{
uint32_t flags = DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_ATOMIC_NONBLOCK;
+ if (allow_modeset)
+ flags |= DRM_MODE_ATOMIC_ALLOW_MODESET;
+
return drmModeAtomicCommit(m_card.fd(), m_req, flags, data);
}
-int AtomicReq::commit_sync()
+int AtomicReq::commit_sync(bool allow_modeset)
{
uint32_t flags = 0;
+ if (allow_modeset)
+ flags |= DRM_MODE_ATOMIC_ALLOW_MODESET;
+
return drmModeAtomicCommit(m_card.fd(), m_req, flags, 0);
}
}
diff --git a/libkms++/atomicreq.h b/libkms++/atomicreq.h
index 77a9ddecb6b948f8aa36bad30ad4646ed4576b33..6ebdbf8add6bbdb5bc41d1b2effea0193ec8642e 100644 (file)
--- a/libkms++/atomicreq.h
+++ b/libkms++/atomicreq.h
void add(DrmObject *ob, const std::string& prop, uint64_t value);
void add(DrmObject *ob, const std::map<std::string, uint64_t>& values);
- int test();
- int commit(void* data);
- int commit_sync();
+ int test(bool allow_modeset = false);
+ int commit(void* data, bool allow_modeset = false);
+ int commit_sync(bool allow_modeset = false);
private:
Card& m_card;