sna: Mark the bo as no longer in the GPU domain after clearing needs_flush

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-01-11 11:33:19 +00:00
parent fec7098571
commit 2add5991a7
1 changed files with 11 additions and 7 deletions

View File

@ -916,13 +916,17 @@ static void __kgem_bo_destroy(struct kgem *kgem, struct kgem_bo *bo)
assert(bo->exec == NULL);
assert(list_is_empty(&bo->request));
if (bo->needs_flush &&
(bo->needs_flush = kgem_busy(kgem, bo->handle))) {
DBG(("%s: handle=%d -> flushing\n", __FUNCTION__, bo->handle));
list_add(&bo->request, &kgem->flushing);
list_add(&bo->list, &kgem->active[bo->bucket]);
bo->rq = &_kgem_static_request;
return;
if (bo->needs_flush) {
if ((bo->needs_flush = kgem_busy(kgem, bo->handle))) {
DBG(("%s: handle=%d -> flushing\n",
__FUNCTION__, bo->handle));
list_add(&bo->request, &kgem->flushing);
list_add(&bo->list, &kgem->active[bo->bucket]);
bo->rq = &_kgem_static_request;
return;
}
bo->domain = DOMAIN_NONE;
}
if (!IS_CPU_MAP(bo->map)) {