From 139fc76260ebeb4f4cc04c56b9ebf7f70bed660d Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 29 Jan 2014 13:42:50 +0000 Subject: [PATCH] sna: Always clear the domain even only a potential sync It helps to keep the domain-tracking bookkeeping consistent. Signed-off-by: Chris Wilson --- src/sna/kgem.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/sna/kgem.c b/src/sna/kgem.c index ac21d2ad..b3d3c4b0 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -562,10 +562,9 @@ retry: } DBG(("%s: flush=%d, domain=%d\n", __FUNCTION__, bo->flush, bo->domain)); - if (bo->exec == NULL) { + if (bo->exec == NULL) kgem_bo_maybe_retire(kgem, bo); - bo->domain = DOMAIN_NONE; - } + bo->domain = DOMAIN_NONE; bo->gtt_dirty = true; return true; } @@ -5735,10 +5734,9 @@ void kgem_bo_sync__cpu_full(struct kgem *kgem, struct kgem_bo *bo, bool write) kgem_bo_retire(kgem, bo); bo->domain = DOMAIN_CPU; } else { - if (bo->exec == NULL) { + if (bo->exec == NULL) kgem_bo_maybe_retire(kgem, bo); - bo->domain = DOMAIN_NONE; - } + bo->domain = DOMAIN_NONE; } } }