mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 01:34:11 +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
@@ -157,6 +157,9 @@ present_event_notify(uint64_t event_id, uint64_t ust, uint64_t msc);
|
||||
extern _X_EXPORT Bool
|
||||
present_screen_init(ScreenPtr screen, present_screen_info_ptr info);
|
||||
|
||||
extern _X_EXPORT void
|
||||
present_check_flips(WindowPtr window);
|
||||
|
||||
typedef void (*present_complete_notify_proc)(WindowPtr window,
|
||||
CARD8 kind,
|
||||
CARD8 mode,
|
||||
|
||||
@@ -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