modesetting: don't advertise TearFree for an unchecked pixmap

ms_present_check_flip() bails out early when the window and pixmap
don't match exactly, landing in no_flip before ms_present_check_unflip()
ever runs. At that point the pixmap is unverified, so present_execute()
shouldn't be told a TearFree flip is about to start for it: if the fake
flip fails to register, it falls back to guessing completion_msc, and
two presentations guessing the same MSC collide and stall.

Assisted-by: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Kiyoshi Spreclerg <kiyoshi_pip@protonmail.com>
This commit is contained in:
Kiyoshi Spreclerg 2026-09-21 09:01:57 -03:00
commit 3b3d26f1a7

View file

@ -348,7 +348,11 @@ ms_present_check_flip(RRCrtcPtr crtc,
window->drawable.x != pixmap->screen_x || window->drawable.y != pixmap->screen_y ||
window->drawable.width != pixmap->drawable.width ||
window->drawable.height != pixmap->drawable.height) {
goto no_flip;
/*
* This skips ms_present_check_unflip(), so the pixmap itself is
* unverified: don't claim a TearFree flip for it below
*/
return FALSE;
}
if (!ms_present_check_unflip(crtc, window, pixmap, sync_flip, reason)) {