summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-17 12:58:03 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-17 12:58:03 +0000
commit9d631e26d758eb4c2032a502604f07c5403b25ff (patch)
tree94d39c49dc8fff9dc21ccea53890cec0d066146e
parentdfbf02b8778719b86e0f5d78ee833a19436d43a0 (diff)
sna: Mark the freshly allocated CPU bo as in the CPU domain
As we immediately use it after creation, we need to inform GEM of the domain transfer. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index f9c152d7..80c21dd2 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -223,8 +223,10 @@ sna_pixmap_alloc_cpu(struct sna *sna,
if (priv->ptr == NULL) {
kgem_bo_destroy(&sna->kgem, priv->cpu_bo);
priv->cpu_bo = NULL;
- } else
+ } else {
+ kgem_bo_sync__cpu(&sna->kgem, priv->cpu_bo);
priv->stride = priv->cpu_bo->pitch;
+ }
}
}