summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-23 00:33:16 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-23 09:49:49 +0000
commit57c19b10db2b512c52a593fad98b5ac5db4f1497 (patch)
tree4a0e782286e50f6fa27388f817388b9b9c7d11db
parent510767e213c2f44563f5c438ad1234113567be90 (diff)
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 <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/kgem.c2
1 files changed, 1 insertions, 1 deletions
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);