summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-06-28 21:07:08 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-06-29 07:13:48 +0100
commit53ef9e762a6e7802b3d5f8fba9ac17ff95545c10 (patch)
tree682fe79e9b343fdffc8d2ab384c6681c7b045616
parent0955f12ae04011593b71817e3151b8fb7c228899 (diff)
sna: Only preferentially upload through the GTT for large transfers
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 3e5b036e..7a9610c9 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -4708,6 +4708,11 @@ try_upload__inplace(PixmapPtr pixmap, RegionRec *region,
break;
}
+ if (priv->gpu_damage == NULL && !box_inplace(pixmap, &region->extents)) {
+ DBG(("%s: no, too small to bother with using the GTT\n", __FUNCTION__));
+ return false;
+ }
+
if (!kgem_bo_can_map(&sna->kgem, priv->gpu_bo)) {
DBG(("%s: no, cannot map through the CPU\n", __FUNCTION__));
return false;