xserver/present
Sultan Alsawaf d4bd39f1a5 present: Prevent double vblank enqueue on error when TearFree is used
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>
2023-02-28 22:43:37 -08:00
..
meson.build present: Move present_wnmd.c contents to hw/xwayland/xwayland-present.c 2021-07-09 16:11:22 +02:00
present.c present: fallback get_crtc to return crtc belonging to screen with present extension 2021-07-20 08:10:46 +02:00
present.h present: add awareness for drivers with TearFree 2022-12-19 23:56:27 -08:00
present_event.c present: Send a PresentConfigureNotify event for destroyed windows 2023-02-15 15:22:45 +01:00
present_execute.c present: Include dix-config.h instead of xorg-config.h 2020-09-15 11:41:34 +02:00
present_fake.c Don't hardcode fps for fake screen 2021-07-29 08:09:00 +00:00
present_fence.c present: Include dix-config.h instead of xorg-config.h 2020-09-15 11:41:34 +02:00
present_notify.c present: Include dix-config.h instead of xorg-config.h 2020-09-15 11:41:34 +02:00
present_priv.h present: Send a PresentConfigureNotify event for destroyed windows 2023-02-15 15:22:45 +01:00
present_request.c present: Include dix-config.h instead of xorg-config.h 2020-09-15 11:41:34 +02:00
present_scmd.c present: Prevent double vblank enqueue on error when TearFree is used 2023-02-28 22:43:37 -08:00
present_screen.c present: Send a PresentConfigureNotify event for destroyed windows 2023-02-15 15:22:45 +01:00
present_vblank.c present: Drop flip_idler member from present_vblank_rec 2021-07-09 16:20:56 +02:00
presentext.h present: Add Present extension 2013-10-31 16:59:18 -07:00