panfrost: fix tiny sample_positions BO memory leak

Fixes a 4KB memory leak that happens once per-device creation.

Cc: mesa-stable
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Chris Healy healych@amazon.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21372>
(cherry picked from commit e787ddf298)
This commit is contained in:
Italo Nicola 2023-02-16 22:12:04 +00:00 committed by Eric Engestrom
parent 70e53f2dff
commit 83fc369ad6
2 changed files with 2 additions and 1 deletions

View file

@ -2254,7 +2254,7 @@
"description": "panfrost: fix tiny sample_positions BO memory leak",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -341,6 +341,7 @@ panfrost_close_device(struct panfrost_device *dev)
if (dev->model) {
pthread_mutex_destroy(&dev->submit_lock);
panfrost_bo_unreference(dev->tiler_heap);
panfrost_bo_unreference(dev->sample_positions);
panfrost_bo_cache_evict_all(dev);
pthread_mutex_destroy(&dev->bo_cache.lock);
util_sparse_array_finish(&dev->bo_map);