drm/amdkfd: Add missing NULL check in svm_range_map_to_gpu

bo_adev is NULL for system memory mapping to GPU.

Fixes: 30671b44aa ("drm/amdgpu: fix TLB flushing during eviction")
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Philip Yang 2022-04-04 17:25:23 -04:00 committed by Alex Deucher
parent 78174f4770
commit 96621ca578

View File

@ -1281,7 +1281,7 @@ svm_range_map_to_gpu(struct kfd_process_device *pdd, struct svm_range *prange,
last_start, prange->start + i,
pte_flags,
last_start - prange->start,
bo_adev->vm_manager.vram_base_offset,
bo_adev ? bo_adev->vm_manager.vram_base_offset : 0,
NULL, dma_addr, &vm->last_update);
for (j = last_start - prange->start; j <= i; j++)