summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-05 14:22:21 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-05 14:24:21 +0000
commitf9451aaa39e1d77b08d2201f5c4a44ab834f2237 (patch)
tree7a26f03292ae011d2e15d4ab8d7ffc3d282ded4d
parentce93c00a33a395986ffc0d33aae85d2c23aabc5d (diff)
sna: Mark the upload as having acquired the GTT mapping
In order for the entire PutImage to be performed inplace, we need to maintain the tendency to keep doing inplace operations. This hint is provided by tracking whether or not the last operation used the GTT mapping. However, that hint was not being provided by zpixmap_blt. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 396dd9c5..b14d2e96 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1901,6 +1901,14 @@ sna_put_zpixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region,
sna_damage_add(&priv->gpu_damage, region);
}
+ /* And mark as having a valid GTT mapping for future uploads */
+ pixmap->devPrivate.ptr =
+ kgem_bo_map(&sna->kgem, priv->gpu_bo, PROT_WRITE);
+ if (pixmap->devPrivate.ptr) {
+ priv->mapped = 1;
+ pixmap->devKind = priv->gpu_bo->pitch;
+ }
+
return true;
}