diff options
author | Keith Packard <keithp@keithp.com> | 2014-09-10 14:01:59 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-09-18 15:32:56 -0700 |
commit | ea7357de90792cbceca6d8d9fdc144e7df8a0fba (patch) | |
tree | 975fcc621ef615e7ffd2a8b199bb4384d6b63876 /present | |
parent | 2051514652481a83bd7cf22e57cb0fcd40333f33 (diff) |
present: Clear pending flip pixmaps at CloseScreen
If a flip is active at server reset time, the associated window will
get destroyed which will queue an unflip operation. If that isn't
synchronous, then it won't have finished by the time CloseScreen is
called.
Calling present_flip_idle will signal the fence and remove the
reference to the fence and pixmap, freeing these in the X server and
allowing a DRM client to clean up as well.
This also rewords other comments in present_flip_destroy, removing
scary words about needing synchronous operation (everything in this
function is synchronous now) and describing what effect we actually
need from present_set_abort_flip.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'present')
-rw-r--r-- | present/present.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/present/present.c b/present/present.c index 9be690ce6..e838da792 100644 --- a/present/present.c +++ b/present/present.c @@ -938,11 +938,12 @@ present_flip_destroy(ScreenPtr screen) { present_screen_priv_ptr screen_priv = present_screen_priv(screen); - /* XXX this needs to be synchronous for server reset */ - - /* Do the actual cleanup once the flip has been performed by the hardware */ + /* Reset window pixmaps back to the screen pixmap */ if (screen_priv->flip_pending) present_set_abort_flip(screen); + + /* Drop reference to any pending flip or unflip pixmaps. */ + present_flip_idle(screen); } void |