From 35239d207c38e1ae0cb843ed7a72621711cb001e Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 24 Nov 2011 02:51:51 +0000 Subject: sna: Always call retire following a mmap Signed-off-by: Chris Wilson --- src/sna/kgem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3