xserver/hw/xfree86
Sultan Alsawaf 53b02054f3 modesetting: Support accurate DRI presentation timing with TearFree
When using TearFree, DRI clients have no way of accurately knowing when
their copied pixmaps appear on the display without utilizing the kernel
driver's notification indicating that the TearFree flip containing their
pixmap is complete. This is because the target CRTC's MSC can change while
the predicted completion MSC is calculated and even while the page flip
IOCTL is sent to the kernel due to scheduling delays and/or unfortunate
timing. Even worse, a page flip isn't actually guaranteed to be finished
after one vblank; it may be several MSCs until a flip actually finishes
depending on delays and load in hardware.

As a result, DRI clients may be off by one or more MSCs when they naively
expect their pixmaps to be visible at MSC+1 with TearFree enabled. This,
for example, makes it impossible for DRI clients to achieve precise A/V
synchronization when TearFree is enabled.

This change therefore adds a way for DRI clients to receive a notification
straight from the TearFree flip-done handler to know exactly when their
pixmaps appear on the display. This is done by checking for a NULL pixmap
pointer to modesetting's DRI flip routine, which indicates that the DRI
client has copied its pixmap and wants TearFree to send a notification when
the copied pixmap appears on the display as part of a TearFree flip. The
existing PageFlip scaffolding is reused to achieve this with minimal churn.

The Present extension will be updated in an upcoming change to utilize this
new mechanism for DRI clients' presentations.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Acked-by: Martin Roukala <martin.roukala@mupuf.org>
2023-02-28 22:43:37 -08:00
..
common Disallow byte-swapped clients by default 2023-01-06 11:59:37 +10:00
ddc print_edid: Fix a format string error 2022-06-26 09:16:42 +00:00
dixmods Remove autotools support 2021-10-27 13:15:40 +03:00
doc Remove autotools support 2021-10-27 13:15:40 +03:00
dri Remove autotools support 2021-10-27 13:15:40 +03:00
dri2 Remove autotools support 2021-10-27 13:15:40 +03:00
drivers modesetting: Support accurate DRI presentation timing with TearFree 2023-02-28 22:43:37 -08:00
exa Remove autotools support 2021-10-27 13:15:40 +03:00
fbdevhw Remove autotools support 2021-10-27 13:15:40 +03:00
glamor_egl Remove autotools support 2021-10-27 13:15:40 +03:00
i2c Remove autotools support 2021-10-27 13:15:40 +03:00
int10 Remove autotools support 2021-10-27 13:15:40 +03:00
loader Remove autotools support 2021-10-27 13:15:40 +03:00
man Disallow byte-swapped clients by default 2023-01-06 11:59:37 +10:00
modes xfree86: make xf86RotateCrtcRedisplay public 2022-12-19 23:56:27 -08:00
os-support Remove "All rights reserved" from Oracle copyright notices 2023-02-25 09:40:41 -08:00
parser Remove autotools support 2021-10-27 13:15:40 +03:00
ramdac Replace "the the" with a single "the" in docs & comments 2022-03-31 13:27:57 -07:00
shadowfb Remove autotools support 2021-10-27 13:15:40 +03:00
utils Remove autotools support 2021-10-27 13:15:40 +03:00
vgahw Remove autotools support 2021-10-27 13:15:40 +03:00
x86emu x86emu: re-align breaks in ins() and outs() 2022-03-31 20:44:06 +00:00
xkb Remove autotools support 2021-10-27 13:15:40 +03:00
.gitignore Xorg: Add Xorg.wrap to hw/xfree86/.gitignore 2014-04-18 11:39:16 +02:00
Xorg.sh.in xfree86: rename Xorg.bin to Xorg 2015-01-05 09:53:58 +10:00
meson.build meson: Support building Xnest and Xorg on darwin 2022-06-26 09:16:42 +00:00
sdksyms.sh Consolidate fourcc.h 2020-09-15 11:43:16 +02:00
xorg-wrapper.c Fix various spelling errors 2019-10-01 17:05:28 +00:00
xorgconf.cpp Fix spelling/wording issues 2020-07-05 13:07:33 -07:00