summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-08 01:46:24 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-08 01:48:20 +0000
commit0229841c0d705138d6317a22ba80f4fa10d26acc (patch)
treeb536745ee1e3c09d8782329f6a6596de2b4459c2
parent42eb9b7c4b55b620d9652ad3a54c8ab0a76fd7c2 (diff)
sna: Do not upload an untiled GPU bo if we already have a CPU bo
Continuing the tuning for sna_copy_boxes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 4bd8f7a1..4e42c6db 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2446,6 +2446,10 @@ move_to_gpu(PixmapPtr pixmap, struct sna_pixmap *priv,
if (pixmap->usage_hint)
return FALSE;
+ if (priv->cpu_bo->size <= 4096 ||
+ sna_pixmap_choose_tiling(pixmap) == I915_TILING_NONE)
+ return FALSE;
+
return (priv->source_count++-SOURCE_BIAS) * w*h >=
(int)pixmap->drawable.width * pixmap->drawable.height;
}