From a65b23cd352b02e2a07e59fbdaa2131931fb2d23 Mon Sep 17 00:00:00 2001 From: "Lin, Shenghua" Date: Fri, 5 Jul 2024 03:03:31 +0000 Subject: [PATCH] Revert "INTERNAL: Revert 530ae32c:iris:Fix to release BO immediately if not busy" This reverts commit de912b61e0648d6435dddf220e48ed4856524a57. This can avoid CTS incorrectly report "memory leak" if release BO immediately Tracked-On: OAM-122043 Signed-off-by: Lin, Shenghua --- src/gallium/drivers/iris/iris_bufmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c index 18297b4abde..088f34f1e28 100755 --- a/src/gallium/drivers/iris/iris_bufmgr.c +++ b/src/gallium/drivers/iris/iris_bufmgr.c @@ -1514,7 +1514,7 @@ bo_free(struct iris_bo *bo) if (!bo->real.userptr && bo->real.map) bo_unmap(bo); - if (bo->idle) { + if (bo->idle || !iris_bo_busy(bo)) { bo_close(bo); } else { /* Defer closing the GEM BO and returning the VMA for reuse until the