iris: Free the local cache bucket in bufmgr_destroy

Fixes: 55be94dcab ("iris/bufmgr: Add new set of buckets for local memory.")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14012>
(cherry picked from commit f93892c5d3)
This commit is contained in:
Nanley Chery 2021-12-07 16:25:20 -05:00 committed by Eric Engestrom
parent 41f9866120
commit d6f3d5f546
2 changed files with 11 additions and 1 deletions

View file

@ -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"
},

View file

@ -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);