db: use atomic pageflip
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 28 Sep 2015 07:02:10 +0000 (10:02 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 28 Sep 2015 07:02:10 +0000 (10:02 +0300)
db/db.cpp
libkms++/atomicreq.cpp
libkms++/atomicreq.h

index d119078b6e5f6869b13b28e0b6d1f3cd42ef4828..4ef6ff96724bb50f130a241207e6756235c877a0 100644 (file)
--- a/db/db.cpp
+++ b/db/db.cpp
@@ -123,14 +123,12 @@ static void do_flip(Output* out)
 
                AtomicReq ctx(card);
 
-               // XXX
-               //ctx.add(plane, card.get_prop("CRTC_X"), 50);
-               //ctx.add(plane, card.get_prop("CRTC_Y"), 50);
+               ctx.add(crtc, card.get_prop("FB_ID"), fb->id());
 
                r = ctx.test();
                ASSERT(r == 0);
 
-               r = ctx.commit();
+               r = ctx.commit(out);
                ASSERT(r == 0);
        } else {
                int r = drmModePageFlip(card.fd(), crtc->id(), fb->id(), DRM_MODE_PAGE_FLIP_EVENT, out);
index 3346af9e53a808a232305143f5d02eca9fd1d702..236e5018876491a047651c393f2198be04ce510e 100644 (file)
@@ -54,10 +54,9 @@ int AtomicReq::test()
        return drmModeAtomicCommit(m_card.fd(), m_req, flags, 0);
 }
 
-int AtomicReq::commit()
+int AtomicReq::commit(void* data)
 {
        uint32_t flags = DRM_MODE_PAGE_FLIP_EVENT;
-       void* data = 0;
 
        return drmModeAtomicCommit(m_card.fd(), m_req, flags, data);
 }
index 9a8a7486180525039f449ef18460d75251a0666c..89797dfaedb3ed0906a4a1130e631ea7068e98f1 100644 (file)
@@ -21,7 +21,7 @@ public:
        void add(DrmObject *ob, Property *prop, uint64_t value);
 
        int test();
-       int commit();
+       int commit(void* data);
 
 private:
        Card& m_card;