xserver/hw/xfree86/drivers/modesetting
Sultan Alsawaf 2d272b705c modesetting: coalesce vblank events to avoid DRM event queue exhaustion
The DRM event queue in the kernel is quite small and can be easily
exhausted by DRI clients. When the event queue is full, that means nothing
can be queued onto it anymore, which can lead to incorrect presentation
times for DRI clients and failure when attempting to queue a page flip.

To make matters worse, once an event is placed onto the kernel's event
queue, there's no straightforward way to prematurely remove it from the
kernel's event queue in userspace, which means that aborting a sequence
number doesn't free up space in the event queue.

Since vblank events from DRI clients are the largest consumers of the
event queue, and since it's often easy to know the desired target MSC of
their vblank events without querying the kernel for a CRTC's current MSC,
we can coalesce vblank events occurring at the same MSC such that only one
of them is placed onto the kernel's event queue, instead of allowing
duplicate vblank events to pollute the event queue.

This is achieved by tracking the next kernel-queued event's MSC on a
per-CRTC basis and then running all of that CRTC's vblank event handlers
which have reached their target MSC when the queued MSC is signaled.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
2022-12-19 23:56:27 -08:00
..
dri2.c dri2: add crocus to the list of va_gl users 2021-11-11 06:49:18 +10:00
driver.c modesetting: Fix dirty updates for sw rotation 2021-09-15 20:31:23 +00:00
driver.h modesetting: coalesce vblank events to avoid DRM event queue exhaustion 2022-12-19 23:56:27 -08:00
drmmode_display.c modesetting: coalesce vblank events to avoid DRM event queue exhaustion 2022-12-19 23:56:27 -08:00
drmmode_display.h modesetting: coalesce vblank events to avoid DRM event queue exhaustion 2022-12-19 23:56:27 -08:00
dumb_bo.c modesetting: Include dix-config.h from dumb_bo.c 2015-05-12 08:02:11 -07:00
dumb_bo.h modesetting: Drop dumb_bo::map_count field and dead unmap code. 2014-12-11 11:26:19 -08:00
meson.build xfree86: Link fb statically 2019-07-23 14:24:00 -04:00
modesetting.man modesetting: Handle mixed VRR and non-VRR display setups better. 2021-10-08 09:24:00 +00:00
pageflip.c modesetting: make do_queue_flip_on_crtc generic 2022-12-19 23:56:27 -08:00
present.c modesetting: Add option for non-vsynced flips for "secondary" outputs. 2021-09-09 09:53:21 +00:00
vblank.c modesetting: coalesce vblank events to avoid DRM event queue exhaustion 2022-12-19 23:56:27 -08:00