summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-08-28 08:33:00 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-08-28 08:33:00 +0100
commitb5c8efe4309248e62d94d80b37a70775284ae985 (patch)
tree0b2cfbcb37e08dbd0bff7cfc5b6d16b1d2da0723
parent96a921487ef00db03a12bec7b0821410d6b74c31 (diff)
sna: Make sure we reset the domain tracking when exporting DRI bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/kgem.c2
-rw-r--r--src/sna/sna_dri.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index cd16ffee..520f0b24 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3905,6 +3905,8 @@ uint32_t kgem_bo_flink(struct kgem *kgem, struct kgem_bo *bo)
/* The bo is outside of our control, so presume it is written to */
bo->needs_flush = true;
+ if (bo->domain != DOMAIN_GPU)
+ bo->domain = DOMAIN_NONE;
/* Henceforth, we need to broadcast all updates to clients and
* flush our rendering before doing so.
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index 8967ed9a..06a940b2 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -426,6 +426,8 @@ static void set_bo(PixmapPtr pixmap, struct kgem_bo *bo)
kgem_bo_destroy(&sna->kgem, priv->gpu_bo);
priv->gpu_bo = ref(bo);
+ if (bo->domain != DOMAIN_GPU)
+ bo->domain = DOMAIN_NONE;
/* Post damage on the new front buffer so that listeners, such
* as DisplayLink know take a copy and shove it over the USB.