]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amdkfd: make sure VM is ready for updating operations
authorLang Yu <Lang.Yu@amd.com>
Sun, 7 Apr 2024 04:36:00 +0000 (12:36 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 19 Apr 2024 03:54:49 +0000 (23:54 -0400)
commit81bf14519a8ca17af4f057a125d87fabbae90af3
treecff9368ed7e9faa315070fab8d6b740cf68074be
parente53a1713de314204f66cc186a74115ea62407876
drm/amdkfd: make sure VM is ready for updating operations

When page table BOs were evicted but not validated before
updating page tables, VM is still in evicting state,
amdgpu_vm_update_range returns -EBUSY and
restore_process_worker runs into a dead loop.

v2: Split the BO validation and page table update into two
separate loops in amdgpu_amdkfd_restore_process_bos. (Felix)
  1.Validate BOs
  2.Validate VM (and DMABuf attachments)
  3.Update page tables for the BOs validated above

Fixes: 50661eb1a2c8 ("drm/amdgpu: Auto-validate DMABuf imports in compute VMs")
Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c