[PATCH 2/5] present: Ignore event_id 0 from driver vblank notify
Keith Packard
keithp at keithp.com
Tue Nov 19 22:51:10 PST 2013
We use event_id 0 to mean 'no such event'; if a driver sends us that
event_id, make sure we don't accidentally match it.
Signed-off-by: Keith Packard <keithp at keithp.com>
---
present/present.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/present/present.c b/present/present.c
index 228d43a..bfafa92 100644
--- a/present/present.c
+++ b/present/present.c
@@ -374,6 +374,8 @@ present_event_notify(uint64_t event_id, uint64_t ust, uint64_t msc)
present_vblank_ptr vblank, tmp;
int s;
+ if (!event_id)
+ return;
DebugPresent(("\te %lld ust %lld msc %lld\n", event_id, ust, msc));
xorg_list_for_each_entry_safe(vblank, tmp, &present_exec_queue, event_queue) {
if (vblank->event_id == event_id) {
@@ -398,6 +400,7 @@ present_event_notify(uint64_t event_id, uint64_t ust, uint64_t msc)
DebugPresent(("\tun %lld\n", event_id));
screen_priv->unflip_event_id = 0;
present_flip_idle(screen);
+ return;
}
}
}
--
1.8.4.2
More information about the xorg-devel
mailing list