mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
modesetting: unflip before any setcrtc() calls
Make sure we're not scanning out any fbs with fancy modifiers when
we try to light up new displays. This is already the case in cases
where the screen gets resized, but in cases where that doesn't happen
it might be possible for the modeset(s) to fail due to watermark/etc.
constraints imposed by the fancy modifiers. We can avoid that by
making sure everything gets unflipped before the modeset.
v2: make poll timeout infinite
s/in_modeset/pending_modeset/
deal with tearfree fallout (goto no_flip)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
This commit is contained in:
committed by
Matt Turner
parent
0c1a93d319
commit
899c87af1f
@@ -191,6 +191,26 @@ present_screen_priv_init(ScreenPtr screen)
|
||||
return screen_priv;
|
||||
}
|
||||
|
||||
static int
|
||||
check_flip_visit(WindowPtr window, void *data)
|
||||
{
|
||||
ScreenPtr screen = window->drawable.pScreen;
|
||||
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
|
||||
|
||||
if (!screen_priv)
|
||||
return WT_DONTWALKCHILDREN;
|
||||
|
||||
screen_priv->check_flip_window(window);
|
||||
|
||||
return WT_WALKCHILDREN;
|
||||
}
|
||||
|
||||
void
|
||||
present_check_flips(WindowPtr window)
|
||||
{
|
||||
TraverseTree(window, check_flip_visit, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize a screen for use with present in default screen flip mode (scmd)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user