From de94d989406e2ccf3858c29927d705a28e848b80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Mon, 5 Feb 2024 10:27:12 -0800 Subject: [PATCH] iris: Set BO_ALLOC_NO_SUBALLOC when allocating bo for slab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without setting BO_ALLOC_NO_SUBALLOC iris_bo_alloc() will attempt to get bo from slabs again. Signed-off-by: José Roberto de Souza Reviewed-by: Paulo Zanoni Part-of: --- src/gallium/drivers/iris/iris_bufmgr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c index acda436d341..936486ae85c 100644 --- a/src/gallium/drivers/iris/iris_bufmgr.c +++ b/src/gallium/drivers/iris/iris_bufmgr.c @@ -723,7 +723,7 @@ iris_slab_alloc(void *priv, { struct iris_bufmgr *bufmgr = priv; struct iris_slab *slab = calloc(1, sizeof(struct iris_slab)); - uint32_t flags; + uint32_t flags = BO_ALLOC_NO_SUBALLOC; unsigned slab_size = 0; /* We only support slab allocation for IRIS_MEMZONE_OTHER */ enum iris_memory_zone memzone = IRIS_MEMZONE_OTHER; @@ -777,13 +777,13 @@ iris_slab_alloc(void *priv, if (heap == IRIS_HEAP_SYSTEM_MEMORY_CACHED_COHERENT || heap == IRIS_HEAP_SYSTEM_MEMORY_UNCACHED) - flags = BO_ALLOC_SMEM; + flags |= BO_ALLOC_SMEM; else if (heap == IRIS_HEAP_DEVICE_LOCAL) - flags = BO_ALLOC_LMEM; + flags |= BO_ALLOC_LMEM; else if (heap == IRIS_HEAP_DEVICE_LOCAL_CPU_VISIBLE_SMALL_BAR) - flags = BO_ALLOC_LMEM | BO_ALLOC_CPU_VISIBLE; + flags |= BO_ALLOC_LMEM | BO_ALLOC_CPU_VISIBLE; else - flags = BO_ALLOC_PLAIN; + flags |= BO_ALLOC_PLAIN; slab->bo = iris_bo_alloc(bufmgr, "slab", slab_size, slab_size, memzone, flags);