summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-08-16 21:58:29 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-08-16 22:03:25 +0100
commit18e274425d728baa62445dc091cae6b1eab94a89 (patch)
tree7f3f7e17a20594efff50dcf7e1d721ea8dd58dda
parent6692077aca2dcb7754b23b6404ff2db2f70228dc (diff)
downloadxf86-video-intel-18e274425d728baa62445dc091cae6b1eab94a89.tar.gz
xf86-video-intel-18e274425d728baa62445dc091cae6b1eab94a89.tar.bz2
xf86-video-intel-18e274425d728baa62445dc091cae6b1eab94a89.zip
sna: Make sure that external scanouts are immediately discarded
An issue with passthrough Xv buffers is that they end up in the scanout cache and potentially reused instead of being immediately discarded. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/kgem.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index e7de38c2a..56d32cb69 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1833,6 +1833,13 @@ static void kgem_bo_move_to_scanout(struct kgem *kgem, struct kgem_bo *bo)
assert(!bo->snoop);
assert(!bo->io);
+ if (bo->purged) {
+ DBG(("%s: discarding purged scanout - external name?\n",
+ __FUNCTION__));
+ kgem_bo_free(kgem, bo);
+ return;
+ }
+
DBG(("%s: moving %d [fb %d] to scanout cache, active? %d\n",
__FUNCTION__, bo->handle, bo->delta, bo->rq != NULL));
if (bo->rq)
@@ -3511,6 +3518,7 @@ struct kgem_bo *kgem_create_for_name(struct kgem *kgem, uint32_t name)
bo->reusable = false;
bo->flush = true;
+ bo->purged = true; /* no coherency guarrantees */
debug_alloc__bo(kgem, bo);
return bo;