summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-24 02:51:51 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-24 10:40:33 +0000
commit35239d207c38e1ae0cb843ed7a72621711cb001e (patch)
tree985e4bf1a1efe8a4c5b1f0f451910c8f4f5e4420 /src
parent11e0b456de93dae9f7ba4298d8a32b6b60edc503 (diff)
sna: Always call retire following a mmap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/kgem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 89caf96a..478367c2 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -746,6 +746,7 @@ bool kgem_retire(struct kgem *kgem)
if (!kgem->need_retire && kgem->ring)
kgem->ring = kgem->mode;
kgem->busy &= kgem->need_retire;
+ DBG(("%s -- busy=%d\n", __FUNCTION__, kgem->busy));
return retired;
}
@@ -1827,7 +1828,7 @@ void *kgem_bo_map(struct kgem *kgem, struct kgem_bo *bo, int prot)
return NULL;
bo->needs_flush = false;
- if (prot & PROT_WRITE && bo->gpu)
+ if (bo->gpu)
kgem_retire(kgem);
return ptr;