tu/drm: avoid has_set_iova-specific util_vma_heap freeing in tu_bo_init

After the refactoring, tu_bo_init() is not allocating iova anymore so it
should also not free the util_vma_heap allocation for the has_set_iova
case.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Fixes: 93a80f4bb9 ("tu/drm: Split out iova allocation and BO allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37413>
This commit is contained in:
Zan Dobersek 2025-09-16 15:48:41 +02:00 committed by Marge Bot
parent f0d3d0ad21
commit 07a599ff3e

View file

@ -754,8 +754,6 @@ tu_bo_init(struct tu_device *dev,
result = tu_bo_add_to_bo_list(dev, gem_handle, flags, iova, &idx);
if (result != VK_SUCCESS) {
mtx_unlock(&dev->bo_mutex);
if (dev->physical_device->has_set_iova)
util_vma_heap_free(&dev->vma, iova, size);
tu_gem_close(dev, gem_handle);
return result;
}