tu: Re-enable bufferDeviceAddressCaptureReplay
authorDanylo Piliaiev <dpiliaiev@igalia.com>
Thu, 25 Aug 2022 15:25:30 +0000 (18:25 +0300)
committerMarge Bot <emma+marge@anholt.net>
Wed, 10 May 2023 20:57:03 +0000 (20:57 +0000)
commit63904240f21b192a5fb1e79046a2c351fbd98ace
tree15ad321c7aead7052baa665de562defca507b0fd
parentd2f9346d9d5e5733b010b15129ae71dffe8d9367
tu: Re-enable bufferDeviceAddressCaptureReplay

We cannot immidiately free VMA range when BO is freed, we have to
wait until kernel stops considered BO as busy and frees its internal
VMA range. Otherwise userspace and kernel VMA will get desynchronized.

To fix this and re-enable replaying of BDA we place BO's information
into a queue. The queue is drained:
- On BO allocation;
- When we cannot allocate an iova passed from the client.

For more information about this see:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/7106

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18254>
src/freedreno/vulkan/tu_device.cc
src/freedreno/vulkan/tu_device.h
src/freedreno/vulkan/tu_knl.h
src/freedreno/vulkan/tu_knl_drm_msm.cc
src/freedreno/vulkan/tu_knl_kgsl.cc