summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-02-13 16:32:18 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-02-13 16:32:18 +0000
commit4bf51ec7bcc7818fbee8643a88aebee0362691b2 (patch)
treeb4a88234a0f8c0798b2b4900adbc1d029fe1cfd6
parent9861423a76402c260724a752ada293a03ce1a79b (diff)
Revert "sna: Avoid promoting SHM CPU bo to GPU to maintain coherence with SHM clients"
This reverts commit f743cd5734ca502aa8bdb0e1327fe84d6ce82755.
-rw-r--r--src/sna/sna_render.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index 69ac21c3..d9affcbe 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -324,14 +324,6 @@ use_cpu_bo(struct sna *sna, PixmapPtr pixmap, const BoxRec *box, bool blt)
return NULL;
}
- if (priv->shm) {
- DBG(("%s: shm CPU bo, avoiding promotion to GPU\n",
- __FUNCTION__));
- assert(!priv->flush);
- sna_add_flush_pixmap(sna, priv, priv->cpu_bo);
- return priv->cpu_bo;
- }
-
if (priv->cpu_bo->snoop && priv->source_count > SOURCE_BIAS) {
DBG(("%s: promoting snooped CPU bo due to reuse\n",
__FUNCTION__));
@@ -400,6 +392,11 @@ use_cpu_bo(struct sna *sna, PixmapPtr pixmap, const BoxRec *box, bool blt)
}
}
+ if (priv->shm) {
+ assert(!priv->flush);
+ sna_add_flush_pixmap(sna, priv, priv->cpu_bo);
+ }
+
DBG(("%s for box=(%d, %d), (%d, %d)\n",
__FUNCTION__, box->x1, box->y1, box->x2, box->y2));
++priv->source_count;