From 6d70ec449ff3c6a3216a56c7e88fbbee3bda2291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Mon, 14 Apr 2025 09:47:25 +0300 Subject: [PATCH] iris: make sure to not mix compressed vs non-compressed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit implements the following requirement: "Keep any UMD-recycling of compression-enabled/disabled memory separate." As additional info there are 2 related wa's for the issue: Wa_14018443005 Wa_18038669374 Cc: mesa-stable Signed-off-by: Tapani Pälli Reviewed-by: José Roberto de Souza Part-of: --- src/gallium/drivers/iris/iris_bufmgr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c index 3f320b0192e..4681557c24a 100644 --- a/src/gallium/drivers/iris/iris_bufmgr.c +++ b/src/gallium/drivers/iris/iris_bufmgr.c @@ -1038,6 +1038,12 @@ alloc_bo_from_cache(struct iris_bufmgr *bufmgr, if (cur->real.capture != !!(flags & BO_ALLOC_CAPTURE)) continue; + /* Make sure we don't recycle compressed vs non-compressed. */ + if ((iris_heap_is_compressed(flags_to_heap(bufmgr, flags))) != + iris_heap_is_compressed(cur->real.heap)) { + continue; + } + /* If the last BO in the cache is busy, there are no idle BOs. Bail, * either falling back to a non-matching memzone, or if that fails, * allocating a fresh buffer.