summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2015-09-28 10:02:10 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2015-09-28 10:02:10 +0300
commit02c3df2efcd209afa1f55de2b652e501dfd7b865 (patch)
treec5906ef89bfc02792a516ecbac8c67064e508a67
parent162b3772ad3ce4e100eab476315e25720777de1d (diff)
db: use atomic pageflip
-rw-r--r--db/db.cpp6
-rw-r--r--libkms++/atomicreq.cpp3
-rw-r--r--libkms++/atomicreq.h2
3 files changed, 4 insertions, 7 deletions
diff --git a/db/db.cpp b/db/db.cpp
index d119078..4ef6ff9 100644
--- 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);
diff --git a/libkms++/atomicreq.cpp b/libkms++/atomicreq.cpp
index 3346af9..236e501 100644
--- a/libkms++/atomicreq.cpp
+++ b/libkms++/atomicreq.cpp
@@ -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);
}
diff --git a/libkms++/atomicreq.h b/libkms++/atomicreq.h
index 9a8a748..89797df 100644
--- a/libkms++/atomicreq.h
+++ b/libkms++/atomicreq.h
@@ -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;