v3dv/bo: reset bo and then call gem close
authorAlejandro Piñeiro <apinheiro@igalia.com>
Sat, 12 Nov 2022 00:51:00 +0000 (01:51 +0100)
committerEric Engestrom <eric@engestrom.ch>
Thu, 17 Nov 2022 14:05:04 +0000 (14:05 +0000)
commite51b0b1060c7a3a0304bdce9d8501bc4d7e8a1af
tree9c925cb57dbeaef45e2976cc65cd2994c00a6fa5
parentf100c77d0e24044c152153aa9e9b7dbf2bdb1cae
v3dv/bo: reset bo and then call gem close

After 'v3dv: fix debug dump on BO free' we changed the order, and this
lead to the following test
dEQP-VK.api.object_management.multithreaded_per_thread_resources.device_memory_small

v2: Expanded comment just before the reset, explaining that we need to
do the reset before we free the BO from the kernel (Iago)

Raising this assertion:
deqp-vk: ../src/broadcom/vulkan/v3dv_bo.c:281: v3dv_bo_alloc: Assertion `bo && bo->handle == 0' failed.

Fixes: 2c44597181e2 ('v3dv: fix debug dump on BO free')

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19693>
(cherry picked from commit ec1cdc13d5cf6026692bf3765be3aeceb511e6d6)
.pick_status.json
src/broadcom/vulkan/v3dv_bo.c