summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7eeef88)
raw | patch | inline | side by side (parent: 7eeef88)
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Mon, 4 Sep 2017 12:37:46 +0000 (15:37 +0300) | ||
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Mon, 4 Sep 2017 12:43:25 +0000 (15:43 +0300) |
DRM sends page flips for each crtc in a commit. kmstest expected to get
a single flip event for a single commit, which caused --sync not to work
with two displays.
Fix this by making kmstest skip the first flip event.
a single flip event for a single commit, which caused --sync not to work
with two displays.
Fix this by making kmstest skip the first flip event.
utils/kmstest.cpp | patch | blob | history |
diff --git a/utils/kmstest.cpp b/utils/kmstest.cpp
index f9486a4da4871320357f2711a996f1f2c05dbe0d..ba7d7906d7955d511a42838e00b612887168f91a 100644 (file)
--- a/utils/kmstest.cpp
+++ b/utils/kmstest.cpp
private:
void handle_page_flip(uint32_t frame, double time)
{
+ /*
+ * We get flip event for each crtc in this flipstate. We can commit the next frames
+ * only after we've gotten the flip event for all crtcs
+ */
+ if (++m_flip_count < m_outputs.size())
+ return;
+
m_frame_num++;
if (s_max_flips && m_frame_num >= s_max_flips)
max_flips_reached = true;
void queue_next()
{
+ m_flip_count = 0;
+
if (m_card.has_atomic()) {
AtomicReq req(m_card);
string m_name;
vector<const OutputInfo*> m_outputs;
unsigned m_frame_num;
+ unsigned m_flip_count;
chrono::steady_clock::time_point m_prev_print;
chrono::steady_clock::time_point m_prev_frame;