This patch series enables better integration of KFD memory management with the DRM GEM ioctl API. It allow managing virtual address mappings in compute VMs with the GEM_VA ioctl after importing DMABufs exported from KFD into libdrm. This will enable more flexible virtual address management for ROCm user mode, better interoperability between compute and graphics, as well as sharing of memory between processes using DMABufs. Felix Kuehling (11): drm/amdgpu: Fix possible null pointer dereference drm/amdgpu: Reserve fences for VM update drm/amdkfd: Improve amdgpu_vm_handle_moved drm/amdgpu: Attach eviction fence on alloc drm/amdgpu: update mappings not managed by KFD drm/amdkfd: Move TLB flushing logic into amdgpu drm/amdgpu: New VM state for evicted user BOs drm/amdgpu: Auto-validate DMABuf imports in compute VMs drm/amdkfd: Export DMABufs from KFD using GEM handles drm/amdkfd: Import DMABufs for interop through DRM drm/amdkfd: Bump KFD ioctl version drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 40 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 22 +- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 207 ++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 22 +- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 11 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 26 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 198 ++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 17 +- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 19 +- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 10 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 31 --- include/uapi/linux/kfd_ioctl.h | 3 +- 12 files changed, 424 insertions(+), 182 deletions(-) -- 2.34.1