diff options
author | Keith Packard <keithp@keithp.com> | 2013-11-09 12:33:02 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-11-20 13:12:25 -0800 |
commit | a5bcc4f7b9499caf8993f0a6ef96088553399ca3 (patch) | |
tree | 7200cef1fcf7a10a9cff24cb06d11d4f84e5c877 /present | |
parent | 4f3c37a1f17ffcfbbff71d217e1caad3d0148c90 (diff) |
present: Ignore event_id 0 from driver vblank notify
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@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'present')
-rw-r--r-- | present/present.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/present/present.c b/present/present.c index 228d43a20..bfafa928e 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; } } } |