mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
panvk: Initialize device virtual address space after the VM creation
Make sure we're not lacking a lock/heap destroy when we fail to create the VM. Fixes:53fb1d99ca("panvk: Transition to explicit VA assignment on v10+") Reported-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33471> (cherry picked from commit4ae12cc6ff)
This commit is contained in:
parent
015835fc59
commit
35063c7764
2 changed files with 5 additions and 5 deletions
|
|
@ -314,7 +314,7 @@
|
|||
"description": "panvk: Initialize device virtual address space after the VM creation",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "53fb1d99cac9ab318c251aa3e448d26e0c94641c",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -286,10 +286,6 @@ panvk_per_arch(create_device)(struct panvk_physical_device *physical_device,
|
|||
panfrost_clamp_to_usable_va_range(device->kmod.dev, 1ull << 32);
|
||||
uint32_t vm_flags = PAN_ARCH <= 7 ? PAN_KMOD_VM_FLAG_AUTO_VA : 0;
|
||||
|
||||
simple_mtx_init(&device->as.lock, mtx_plain);
|
||||
util_vma_heap_init(&device->as.heap, user_va_start,
|
||||
user_va_end - user_va_start);
|
||||
|
||||
device->kmod.vm =
|
||||
pan_kmod_vm_create(device->kmod.dev, vm_flags,
|
||||
user_va_start, user_va_end - user_va_start);
|
||||
|
|
@ -299,6 +295,10 @@ panvk_per_arch(create_device)(struct panvk_physical_device *physical_device,
|
|||
goto err_destroy_kdev;
|
||||
}
|
||||
|
||||
simple_mtx_init(&device->as.lock, mtx_plain);
|
||||
util_vma_heap_init(&device->as.heap, user_va_start,
|
||||
user_va_end - user_va_start);
|
||||
|
||||
panvk_device_init_mempools(device);
|
||||
|
||||
#if PAN_ARCH <= 9
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue