Mesa (staging/21.3): iris: Free the local cache bucket in bufmgr_destroy
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Dec 17 19:44:18 UTC 2021
Module: Mesa
Branch: staging/21.3
Commit: a3f7e281ff86bd51e5b5b115b7e1d4eb5d4a78d1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a3f7e281ff86bd51e5b5b115b7e1d4eb5d4a78d1
Author: Nanley Chery <nanley.g.chery at intel.com>
Date: Tue Dec 7 16:25:20 2021 -0500
iris: Free the local cache bucket in bufmgr_destroy
Fixes: 55be94dcab4 ("iris/bufmgr: Add new set of buckets for local memory.")
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14012>
(cherry picked from commit f93892c5d3300127faabb5ba8cbf986d11cc38a4)
---
.pick_status.json | 2 +-
src/gallium/drivers/iris/iris_bufmgr.c | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index 9ef1aae6133..c78cf543268 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1390,7 +1390,7 @@
"description": "iris: Free the local cache bucket in bufmgr_destroy",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "55be94dcab4eebd10ae11c3f982c4c91b67fb3a7"
},
diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c
index 7a9d1a4820d..6dbf1629c38 100644
--- a/src/gallium/drivers/iris/iris_bufmgr.c
+++ b/src/gallium/drivers/iris/iris_bufmgr.c
@@ -1664,6 +1664,16 @@ iris_bufmgr_destroy(struct iris_bufmgr *bufmgr)
}
}
+ for (int i = 0; i < bufmgr->num_local_buckets; i++) {
+ struct bo_cache_bucket *bucket = &bufmgr->local_cache_bucket[i];
+
+ list_for_each_entry_safe(struct iris_bo, bo, &bucket->head, head) {
+ list_del(&bo->head);
+
+ bo_free(bo);
+ }
+ }
+
/* Close any buffer objects on the dead list. */
list_for_each_entry_safe(struct iris_bo, bo, &bufmgr->zombie_list, head) {
list_del(&bo->head);
More information about the mesa-commit
mailing list