summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-11 11:33:19 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-11 11:35:42 +0000
commit2add5991a7d186d8271cb79ae4f62dad7b4ca243 (patch)
tree51bf867d6ba5fb6945fd14a5ba9ab50f93138057
parentfec70985719eec75b7fa799bddc3115fb329ab86 (diff)
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>
-rw-r--r--src/sna/kgem.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 4f2d39a3..aa98ceac 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -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)) {