From: Kenneth Graunke Date: Sun, 26 May 2019 20:03:20 +0000 (-0700) Subject: iris: Use the BO cache even for coherent buffers on non-LLC. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=43d835cb0f030f2ba8edc9c8dbe09038b6481e6a;p=mesa.git iris: Use the BO cache even for coherent buffers on non-LLC. We mark snooped BOs as non-reusable, so we never return them to the cache. This means that we'd need to call I915_GEM_SET_CACHING to make any BO we find in the cache snooped. But then again, any BO we freshly allocate from the kernel will also be non-snooped, so it has the same issue. There's really no reason to skip the cache - we may as well use it to avoid the I915_GEM_CREATE overhead. Reviewed-by: Caio Marcelo de Oliveira Filho --- diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c index 1845e9898a0..daf67101be3 100644 --- a/src/gallium/drivers/iris/iris_bufmgr.c +++ b/src/gallium/drivers/iris/iris_bufmgr.c @@ -383,9 +383,6 @@ bo_alloc_internal(struct iris_bufmgr *bufmgr, /* Round the allocated size up to a power of two number of pages. */ bucket = bucket_for_size(bufmgr, size); - if ((flags & BO_ALLOC_COHERENT) && !bufmgr->has_llc) - bucket = NULL; - /* If we don't have caching at this size, don't actually round the * allocation up. */