xf86-video-intel: src/sna/sna_accel.c

Chris Wilson ickle at kemper.freedesktop.org
Thu Dec 5 08:22:26 PST 2013


 src/sna/sna_accel.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 46256fa5a0ca4230ae7c226781c78c525e2648c6
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Dec 5 16:12:22 2013 +0000

    sna: Pass MOVE_READ for partial TearFree move-to-gpu
    
    When fixing up a pending shadow pageflip for TearFree, we must tell it
    that it needs to flush the damage for a partial move-to-gpu. Even though
    the current area does not read from the destination, the move-to-gpu
    callback is a global pass, and we need to assume the worst for the
    region outside of the target.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72343
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 6fd77ad..c11e2cc 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1937,7 +1937,7 @@ _sna_pixmap_move_to_cpu(PixmapPtr pixmap, unsigned int flags)
 		return false;
 	}
 
-	if (USE_INPLACE && (flags & MOVE_READ) == 0 && !priv->cow) {
+	if (USE_INPLACE && (flags & MOVE_READ) == 0 && !(priv->cow || priv->move_to_gpu)) {
 		assert(flags & MOVE_WRITE);
 		DBG(("%s: no readbck, discarding gpu damage [%d], pending clear[%d]\n",
 		     __FUNCTION__, priv->gpu_damage != NULL, priv->clear));
@@ -3014,7 +3014,8 @@ sna_pixmap_move_area_to_gpu(PixmapPtr pixmap, const BoxRec *box, unsigned int fl
 	assert_pixmap_contains_box(pixmap, box);
 	assert(priv->gpu_damage == NULL || priv->gpu_bo);
 
-	if (priv->move_to_gpu && !priv->move_to_gpu(sna, priv, flags | (priv->cpu_damage ? MOVE_WRITE : 0))) {
+	if (priv->move_to_gpu &&
+	    !priv->move_to_gpu(sna, priv, flags | MOVE_READ | (priv->cpu_damage ? MOVE_WRITE : 0))) {
 		DBG(("%s: move-to-gpu override failed\n", __FUNCTION__));
 		return NULL;
 	}


More information about the xorg-commit mailing list