Skip to content

modesetting: Don't recursively force present to unflip#2123

Merged
metux merged 1 commit intoX11Libre:masterfrom
stefan11111:xorg-1793
Mar 19, 2026
Merged

modesetting: Don't recursively force present to unflip#2123
metux merged 1 commit intoX11Libre:masterfrom
stefan11111:xorg-1793

Conversation

@stefan11111
Copy link
Copy Markdown
Contributor

Present calls drmmode_set_mode_major() as part of ms_present_unflip(), which leads to a crash due to the recursive attempt to force present to unflip when it already is.

Fix it by simply skipping the forced present unflip when present itself is unflipping. This also speeds up drmmmode_prepare_modeset() when present isn't even flipping to begin with.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1791

Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/commit/899c87af1fc26fd8b8dbc539ec7b93066df2ad37 ("modesetting: unflip before any setcrtc() calls")

Part-of: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1793

Present calls drmmode_set_mode_major() as part of ms_present_unflip(),
which leads to a crash due to the recursive attempt to force present to
unflip when it already is.

Fix it by simply skipping the forced present unflip when present itself is
unflipping. This also speeds up drmmmode_prepare_modeset() when present
isn't even flipping to begin with.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1791

Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/commit/899c87af1fc26fd8b8dbc539ec7b93066df2ad37 ("modesetting: unflip before any setcrtc() calls")
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1793>
@metux metux merged commit 7f7753d into X11Libre:master Mar 19, 2026
@stefan11111 stefan11111 deleted the xorg-1793 branch March 19, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants