diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-05-28 19:23:38 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-05-28 19:23:38 +0100 |
commit | 4458f1bf8a5cfbed0c4bbe9d968719c47ee0ea7d (patch) | |
tree | 6e8a79ed848554204fc3596821083494efad5e0b /src/sna/sna_display.c | |
parent | 46ffdf295d161a70459508ef0643d70af66ed990 (diff) |
sna: Restore TearFree operation after switching everything off
We give up on TearFree if we ever see an error whilst page flipping (in
the hope that we can keep displaying via direct use of the scanout).
With the advent of MST, this can happen simply by the user unplugging a
dock causing connectors to disappear and if we flip before we see the
uevent telling us which outputs are disabled, we get an error.
So, lets try and re-enable TearFree on the next opportunity, when all
the outputs are off and we can rebuild the shadow buffer.
Reported-by: Martin Jørgensen <mkj@gotu.dk>
References: https://bugs.freedesktop.org/show_bug.cgi?id=96180
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 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index ce58cc1e..9c1d8fda 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -7076,6 +7076,15 @@ sna_crtc_config_notify(ScreenPtr screen) probe_capabilities(sna); sna_present_update(sna); + /* Allow TearFree to come back on when everything is off */ + if (!sna->mode.front_active && sna->flags & SNA_WANT_TEAR_FREE) { + if ((sna->flags & SNA_TEAR_FREE) == 0) + DBG(("%s: enable TearFree next modeset\n", + __FUNCTION__)); + + sna->flags |= SNA_TEAR_FREE; + } + sna->mode.dirty = false; } |