sna: Always call retire following a mmap

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-11-24 02:51:51 +00:00
parent 11e0b456de
commit 35239d207c
1 changed files with 2 additions and 1 deletions

View File

@ -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;