diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-05-14 11:37:51 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-05-14 17:27:09 +0100 |
commit | 84d0790453089be5d1034037065df1ea37ad48fe (patch) | |
tree | f60e8da8d8adea878b236819a6809e4a27cf55f1 /src/sna/sna_display.c | |
parent | 68181f0b530934d74f48cb36022c17b29a76cb75 (diff) |
sna: After disabling the TearFree shadow, flush any pending flips
If we complete a flip after resizing and recreating the TearFree shadow,
we may process the flip completion events whilst the output is only
partially reconfigured.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_display.c')
-rw-r--r-- | src/sna/sna_display.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 5ac46f56..20b2f8e1 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -3240,6 +3240,14 @@ sna_mode_resize(ScrnInfoPtr scrn, int width, int height) scrn->virtualY = height; scrn->displayWidth = width; + /* Flush pending shadow updates */ + if (sna->mode.shadow_flip) { + DBG(("%s: waiting for %d outstanding TearFree flips\n", + __FUNCTION__, sna->mode.shadow_flip)); + while (sna->mode.shadow_flip && sna_mode_wait_for_event(sna)) + sna_mode_wakeup(sna); + } + /* Only update the CRTCs if we are in control */ if (!scrn->vtSema) return TRUE; |