It's possible for present_execute_copy to enqueue a vblank even when TearFree is used, specifically when the present_queue_vblank in present_scmd_pixmap fails and the subsequent vblank enqueue in present_execute_copy somehow doesn't. This could happen if the DRM event queue is exhausted when present_queue_vblank is called, but is no longer exhausted by the time present_execute_copy is reached. This exceedingly unlikely chain of events can lead to a vblank getting enqueued a second time by the TearFree machinery in present_execute, which is not good. Although this scenario is very unlikely, prevent it by first checking that the vblank wasn't enqueued by present_execute_copy before attempting to enqueue it for TearFree. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com> Acked-by: Martin Roukala <martin.roukala@mupuf.org> |
||
|---|---|---|
| .. | ||
| meson.build | ||
| present.c | ||
| present.h | ||
| present_event.c | ||
| present_execute.c | ||
| present_fake.c | ||
| present_fence.c | ||
| present_notify.c | ||
| present_priv.h | ||
| present_request.c | ||
| present_scmd.c | ||
| present_screen.c | ||
| present_vblank.c | ||
| presentext.h | ||