diff options
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/sna.h | 5 | ||||
-rw-r--r-- | src/sna/sna_display.c | 9 | ||||
-rw-r--r-- | src/sna/sna_driver.c | 2 |
3 files changed, 13 insertions, 3 deletions
diff --git a/src/sna/sna.h b/src/sna/sna.h index 664308f2..fdfefe17 100644 --- a/src/sna/sna.h +++ b/src/sna/sna.h @@ -259,8 +259,9 @@ struct sna { #define SNA_NO_VSYNC 0x40 #define SNA_TRIPLE_BUFFER 0x80 #define SNA_TEAR_FREE 0x100 -#define SNA_FORCE_SHADOW 0x200 -#define SNA_FLUSH_GTT 0x400 +#define SNA_WANT_TEAR_FREE 0x200 +#define SNA_FORCE_SHADOW 0x400 +#define SNA_FLUSH_GTT 0x800 #define SNA_PERFORMANCE 0x1000 #define SNA_POWERSAVE 0x2000 #define SNA_HAS_FLIP 0x10000 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; } diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index b2455941..fce64bad 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -481,7 +481,7 @@ static bool setup_tear_free(struct sna *sna) from = X_CONFIG; if (enable) - sna->flags |= SNA_TEAR_FREE; + sna->flags |= SNA_WANT_TEAR_FREE | SNA_TEAR_FREE; done: xf86DrvMsg(sna->scrn->scrnIndex, from, "TearFree %sabled\n", |