mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 08:40:11 +01:00
panfrost: take reference from pool used for allocation
Fixes bo leaks caused by wrong ref counting when
using temporary sampler views.
The leak was observed when playing videos using the
DRM_FORMAT_MOD_VENDOR_MTK tiling format
through gstreamer.
Fixes: 0795f3d7e4 ("panfrost: Add a pool to sampler_view")
Signed-off-by: Christian Meissl <meissl.christian@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37325>
This commit is contained in:
parent
3c32ff7fa9
commit
31a627bdc2
1 changed files with 2 additions and 2 deletions
|
|
@ -1746,7 +1746,7 @@ panfrost_create_sampler_view_bo(struct panfrost_sampler_view *so,
|
|||
return;
|
||||
}
|
||||
|
||||
so->state = panfrost_pool_take_ref(&ctx->descs, payload.gpu);
|
||||
so->state = panfrost_pool_take_ref(pool, payload.gpu);
|
||||
|
||||
void *tex = (PAN_ARCH >= 6) ? &so->bifrost_descriptor : payload.cpu;
|
||||
|
||||
|
|
@ -1811,7 +1811,7 @@ panfrost_create_sampler_view_bo(struct panfrost_sampler_view *so,
|
|||
return;
|
||||
}
|
||||
|
||||
so->state = panfrost_pool_take_ref(&ctx->descs, payload.gpu);
|
||||
so->state = panfrost_pool_take_ref(pool, payload.gpu);
|
||||
|
||||
void *tex = (PAN_ARCH >= 6) ? &so->bifrost_descriptor : payload.cpu;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue