panvk: Fix allocation of BOs bigger than the slab size
authorBoris Brezillon <boris.brezillon@collabora.com>
Fri, 1 Oct 2021 07:11:42 +0000 (09:11 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 4 Oct 2021 12:17:07 +0000 (12:17 +0000)
commit8acc8f6a0e1eb3d02f08403ccdb01af833845dd2
tree80b779cb764d3ad2d04f115ce057d2985a47d3c7
parent4e58d30d981b6b781e1a827eb2a0c98d3f4df840
panvk: Fix allocation of BOs bigger than the slab size

We can pick a BO from the pool if the BO size exceeds the pool size. In
that case, allocate a BO and save it in a separate array so we can free
it when the memory pool is reset or released.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13136>
src/panfrost/vulkan/panvk_mempool.c
src/panfrost/vulkan/panvk_mempool.h