From 4bf51ec7bcc7818fbee8643a88aebee0362691b2 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 13 Feb 2013 16:32:18 +0000 Subject: [PATCH] Revert "sna: Avoid promoting SHM CPU bo to GPU to maintain coherence with SHM clients" This reverts commit f743cd5734ca502aa8bdb0e1327fe84d6ce82755. --- src/sna/sna_render.c | 13 +++++-------- 1 file 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;