From 2f1fd84e4d82269e8aa5ab1ac0b5ba92982a74d4 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: (cherry picked from commit 6d70ec449ff3c6a3216a56c7e88fbbee3bda2291) --- .pick_status.json | 2 +- src/gallium/drivers/iris/iris_bufmgr.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index eab60a9fdad..dc8fc22c97e 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1894,7 +1894,7 @@ "description": "iris: make sure to not mix compressed vs non-compressed", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c index 419ba98a7b9..2f4c2765276 100644 --- a/src/gallium/drivers/iris/iris_bufmgr.c +++ b/src/gallium/drivers/iris/iris_bufmgr.c @@ -1036,6 +1036,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.