sna: Defer purging a target buffer

This is to keep the sanity checks upon the caches happy by keeping a
potential flush out of the inactive cache.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-11-10 10:55:13 +00:00
parent 9083f7edcb
commit bddac63de2
1 changed files with 1 additions and 1 deletions

View File

@ -602,7 +602,7 @@ static void __kgem_bo_destroy(struct kgem *kgem, struct kgem_bo *bo)
if(!bo->reusable)
goto destroy;
if (bo->purgeable && !bo->rq) {
if (bo->purgeable && !bo->rq && !bo->needs_flush) {
assert(!bo->purged);
if (!gem_madvise(kgem->fd, bo->handle, I915_MADV_DONTNEED)) {