From 1690c1e041aff0b3a98461381d821f6bc70ce405 Mon Sep 17 00:00:00 2001 From: Italo Nicola Date: Thu, 16 Feb 2023 22:12:04 +0000 Subject: [PATCH] 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 Reviewed-by: Alyssa Rosenzweig Tested-by: Chris Healy healych@amazon.com Part-of: (cherry picked from commit e787ddf2981b224bcf22c310f6bcb116aa1dff81) --- .pick_status.json | 2 +- src/panfrost/lib/pan_props.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 778325bdc6b..4f4d3796ffd 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -544,7 +544,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 }, diff --git a/src/panfrost/lib/pan_props.c b/src/panfrost/lib/pan_props.c index 7b698dec8e8..32644df7142 100644 --- a/src/panfrost/lib/pan_props.c +++ b/src/panfrost/lib/pan_props.c @@ -334,6 +334,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);