drm/amdgpu: fix nullptr err of vm_handle_moved
[ Upstream commit 859958a7faefe5b7742b7b8cdbc170713d4bf158 ] If a amdgpu_bo_va is fpriv->prt_va, the bo of this one is always NULL. So, such kind of amdgpu_bo_va should be updated separately before amdgpu_vm_handle_moved. Signed-off-by: Heng Zhou <Heng.Zhou@amd.com> Reviewed-by: Kasiviswanathan, Harish <Harish.Kasiviswanathan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
de68849113
commit
273d1ea12e
@@ -2993,9 +2993,22 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, struct dma_fence __rcu *
|
||||
struct amdgpu_device *adev = amdgpu_ttm_adev(
|
||||
peer_vm->root.bo->tbo.bdev);
|
||||
|
||||
struct amdgpu_fpriv *fpriv =
|
||||
container_of(peer_vm, struct amdgpu_fpriv, vm);
|
||||
|
||||
ret = amdgpu_vm_bo_update(adev, fpriv->prt_va, false);
|
||||
if (ret) {
|
||||
dev_dbg(adev->dev,
|
||||
"Memory eviction: handle PRT moved failed, pid %8d. Try again.\n",
|
||||
pid_nr(process_info->pid));
|
||||
goto validate_map_fail;
|
||||
}
|
||||
|
||||
ret = amdgpu_vm_handle_moved(adev, peer_vm, &exec.ticket);
|
||||
if (ret) {
|
||||
pr_debug("Memory eviction: handle moved failed. Try again\n");
|
||||
dev_dbg(adev->dev,
|
||||
"Memory eviction: handle moved failed, pid %8d. Try again.\n",
|
||||
pid_nr(process_info->pid));
|
||||
goto validate_map_fail;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user