In Vulkan, it is the application's responsibility to perform adequate synchronization before a sparse unmap, replace or BO destroy operation. This adds an option to AMDGPU_VA_OPs to disable redundant implicit sync that happens on sparse unmap or replace operations. This has seen a significant improvement in stutter in Forza Horizon 5 and Forza Horizon 4. (As games that had significant issues in sparse binding related stutter). This patchset also address a tangential issue that some changes were not being flushed immediately after the ioctls, but were deferred to be processed on the next CS submission, which also results in stalling. A refactor of state machine is included to achieve this. Compared to the previous series [1], this specifically targets the VM operations and keep everything else intact, including implicit sync on kernel-initiated moves. I've been able to pass a full Vulkan CTS run on Navi 10 with this. Userspace code for this is available at [2] and a branch for the kernel code is available at [3]. [1]: https://lore.kernel.org/all/20230821062005.109771-1-ishitatsuyuki@xxxxxxxxx/ [2]: https://gitlab.freedesktop.org/ishitatsuyuki/mesa/-/commits/vm-explicit-sync [3]: https://github.com/ishitatsuyuki/linux/tree/explicit-sync-drm-misc-next Tatsuyuki Ishi (6): drm/amdgpu: Don't implicit sync PRT maps. drm/amdgpu: Separate eviction from VM status. drm/amdgpu: Flush VM updates for split bindings eagerly. drm/amdgpu: Remove redundant state change after validation. drm/amdgpu: Add flag to disable implicit sync for GEM operations. drm/amdgpu: Bump amdgpu driver version. .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 32 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 7 +- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 6 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 185 ++++++++++-------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 27 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 18 +- include/uapi/drm/amdgpu_drm.h | 2 + 11 files changed, 165 insertions(+), 120 deletions(-) -- 2.42.0