tu: Disable userspace iova allocations

If BO is freed while kernel considers it busy, our VMA state gets
desynchronized from kernel's VMA state because kernel waits
until BO stops being busy. And whether BO is busy kernel decides at
submission granularity.

On the other hand in Vulkan we may free resource as soon as we know
it won't be used.

Not completely reverting the changes in hope that proper resolution
would be found soon.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7106

Fixes: e23c4fbd9b
("tu: Switch to userspace iova allocations if kernel supports it")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18201>
This commit is contained in:
Danylo Piliaiev 2022-08-23 01:19:48 +03:00 committed by Marge Bot
parent 013b022924
commit c9d9155787

View file

@ -817,8 +817,18 @@ tu_drm_device_init(struct tu_physical_device *device,
goto fail;
}
device->has_set_iova = !tu_drm_get_va_prop(device, &device->va_start,
&device->va_size);
/*
* device->has_set_iova = !tu_drm_get_va_prop(device, &device->va_start,
* &device->va_size);
*
* If BO is freed while kernel considers it busy, our VMA state gets
* desynchronized from kernel's VMA state, because kernel waits
* until BO stops being busy. And whether BO is busy decided at
* submission granularity.
*
* Disable this capability until solution is found.
*/
device->has_set_iova = false;
struct stat st;