sna: Prevent creating a GPU bo for an inplace read
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 4 Jul 2014 08:48:53 +0000 (09:48 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 4 Jul 2014 08:48:53 +0000 (09:48 +0100)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/sna/sna_accel.c

index e317e65..c58f177 100644 (file)
@@ -2054,7 +2054,7 @@ static inline bool operate_inplace(struct sna_pixmap *priv, unsigned flags)
                return false;
        }
 
-       if (priv->cpu_damage && flags & MOVE_READ) {
+       if ((priv->gpu_damage == NULL || priv->cpu_damage) && flags & MOVE_READ) {
                DBG(("%s: no, has CPU damage and requires readback\n", __FUNCTION__));
                return false;
        }