summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-05-17 07:55:03 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-05-17 07:55:33 +0100
commita508b11bde9f3119b49b3e0f652587efb9e037af (patch)
tree739136d9a33dd9156cd207a4cd1c34c22fd94937
parent48569eb18d125e20aa817549506fc4c1609829c9 (diff)
sna: Don't skip migration-to-GPU for TearFree
In 46caee86db0f ("sna: Fix reporting of errno after setcrtc failure"), the intention was to avoid reporting a fail to migrate whilst wedged for a simple copy from the frontbuffer to TearFree's shadow buffer. However, by skipping the migration, we never flushed any dirt from the CPU buffer prior to doing the TearFree flip. References: https://bugs.freedesktop.org/show_bug.cgi?id=95401#c7 References: https://bugs.freedesktop.org/show_bug.cgi?id=95414#c4 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_display.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 79761712..16d03212 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -8519,11 +8519,9 @@ static bool move_crtc_to_gpu(struct sna *sna)
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(sna->scrn);
int i;
- if (sna->flags & SNA_TEAR_FREE)
- return true;
-
for (i = 0; i < sna->mode.num_real_crtc; i++) {
struct sna_crtc *crtc = to_sna_crtc(config->crtc[i]);
+ unsigned hint;
assert(crtc);
@@ -8539,10 +8537,13 @@ static bool move_crtc_to_gpu(struct sna *sna)
if (crtc->shadow_bo)
continue;
+ hint = MOVE_READ | MOVE_ASYNC_HINT | __MOVE_SCANOUT;
+ if (sna->flags & SNA_TEAR_FREE)
+ hint |= __MOVE_FORCE;
+
DBG(("%s: CRTC %d [pipe=%d] requires frontbuffer\n",
__FUNCTION__, __sna_crtc_id(crtc), __sna_crtc_pipe(crtc)));
- return sna_pixmap_move_to_gpu(sna->front,
- MOVE_READ | MOVE_ASYNC_HINT | __MOVE_SCANOUT);
+ return sna_pixmap_move_to_gpu(sna->front, hint);
}
return true;