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>
This commit is contained in:
Chris Wilson 2012-02-23 00:33:16 +00:00
parent 510767e213
commit 57c19b10db
1 changed files with 1 additions and 1 deletions

View File

@ -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);