sna: Do not force creation of CPU maps on !llc
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
77fa8ab08b
commit
3f33abee37
|
|
@ -3848,8 +3848,13 @@ large_inactive:
|
|||
} while (!list_is_empty(cache) &&
|
||||
__kgem_throttle_retire(kgem, flags));
|
||||
|
||||
if (flags & CREATE_CPU_MAP && !kgem->has_llc)
|
||||
if (flags & CREATE_CPU_MAP && !kgem->has_llc) {
|
||||
if (list_is_empty(&kgem->active[bucket][tiling]) &&
|
||||
list_is_empty(&kgem->inactive[bucket]))
|
||||
flags &= ~CREATE_CACHED;
|
||||
|
||||
goto create;
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & CREATE_INACTIVE)
|
||||
|
|
@ -4083,6 +4088,9 @@ search_inactive:
|
|||
}
|
||||
|
||||
create:
|
||||
if (flags & CREATE_CACHED)
|
||||
return NULL;
|
||||
|
||||
if (bucket >= NUM_CACHE_BUCKETS)
|
||||
size = ALIGN(size, 1024);
|
||||
handle = gem_create(kgem->fd, size);
|
||||
|
|
|
|||
|
|
@ -3901,7 +3901,7 @@ create_upload_tiled_x(struct kgem *kgem,
|
|||
{
|
||||
unsigned create, tiling;
|
||||
|
||||
if (priv->shm)
|
||||
if (priv->shm || priv->cpu)
|
||||
return false;
|
||||
|
||||
if ((priv->create & KGEM_CAN_CREATE_GPU) == 0)
|
||||
|
|
@ -3917,6 +3917,8 @@ create_upload_tiled_x(struct kgem *kgem,
|
|||
create = CREATE_CPU_MAP | CREATE_INACTIVE | CREATE_EXACT;
|
||||
if (pixmap->usage_hint == SNA_CREATE_FB)
|
||||
create |= CREATE_SCANOUT;
|
||||
if (!kgem->has_llc)
|
||||
create |= CREATE_CACHED;
|
||||
|
||||
priv->gpu_bo =
|
||||
kgem_create_2d(kgem,
|
||||
|
|
|
|||
Loading…
Reference in New Issue