diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-22 13:33:06 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-22 17:57:58 +0100 |
commit | 1c282afb212d1d387d318256f4627385d12e1921 (patch) | |
tree | 5d2dd26395cafd9cad265544250e60c2809a47c2 /src | |
parent | 247ebf86a32b518536a11c2f866b2c885bd55d38 (diff) |
sna: Make sure CPU damage is flushed to the TearFree shadow
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna_accel.c | 3 | ||||
-rw-r--r-- | src/sna/sna_display.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index c72dbb73..fc99a7d2 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -3709,7 +3709,8 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags) assert_pixmap_damage(pixmap); - if (priv->move_to_gpu && !priv->move_to_gpu(sna, priv, flags)) { + if (priv->move_to_gpu && + !priv->move_to_gpu(sna, priv, flags | (priv->cpu_damage ? MOVE_WRITE : 0))) { DBG(("%s: move-to-gpu override failed\n", __FUNCTION__)); return NULL; } diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 652b8a15..37307c55 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -4423,7 +4423,6 @@ void sna_mode_redisplay(struct sna *sna) if (sna->mode.shadow_flip) return; - assert(sna_pixmap(sna->front)->move_to_gpu == NULL); if (wedged(sna) || !sna_pixmap_move_to_gpu(sna->front, MOVE_READ)) { if (!sna_pixmap_move_to_cpu(sna->front, MOVE_READ)) return; @@ -4451,6 +4450,8 @@ void sna_mode_redisplay(struct sna *sna) return; } + assert(sna_pixmap(sna->front)->move_to_gpu == NULL); + for (i = 0; i < config->num_crtc; i++) { xf86CrtcPtr crtc = config->crtc[i]; struct sna_crtc *sna_crtc = to_sna_crtc(crtc); |