From 57c19b10db2b512c52a593fad98b5ac5db4f1497 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 23 Feb 2012 00:33:16 +0000 Subject: [PATCH] sna: Use a CPU mapping if the bo is already in the CPU domain The heuristic of using the mapping only before the first use in an execbuffer was suboptimal and broken by the change in bo initialisation. Signed-off-by: Chris Wilson --- src/sna/kgem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 5ded9041..007dc045 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -2893,7 +2893,7 @@ void *kgem_bo_map(struct kgem *kgem, struct kgem_bo *bo) assert(list_is_empty(&bo->list)); if (bo->tiling == I915_TILING_NONE && - (kgem->has_llc || bo->domain == bo->presumed_offset)) { + (kgem->has_llc || bo->domain == DOMAIN_CPU)) { DBG(("%s: converting request for GTT map into CPU map\n", __FUNCTION__)); ptr = kgem_bo_map__cpu(kgem, bo);