summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-06-16 10:30:58 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-06-16 10:30:58 +0100
commit3c02110052ecf69d43577ed8537a8850227da560 (patch)
tree2d32eb79019df37c57192229ca174730fb053e05
parent881f961a1c78e554e566ef624d6edcf28fee8fdf (diff)
sna/dri: Add some comments to explain the choice of flags upon the bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_dri.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index f4ecbeca..7516fe98 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -144,12 +144,22 @@ static struct kgem_bo *sna_pixmap_set_dri(struct sna *sna,
if (priv->cpu_damage)
list_add(&priv->list, &sna->dirty_pixmaps);
+ /* The bo is outside of our control, so presume it is written to */
+ priv->gpu_bo->need_flush = 1;
+
+ /* We need to submit any modifications to and reads from this
+ * buffer before we send any reply to the Client.
+ *
+ * As we don't track which Client, we flush for all.
+ */
priv->flush = 1;
priv->gpu_bo->flush = 1;
if (priv->gpu_bo->exec)
sna->kgem.flush = 1;
+ /* Don't allow this named buffer to be replaced */
priv->pinned = 1;
+
return priv->gpu_bo;
}