Commit 96621ca5 authored by Philip Yang's avatar Philip Yang Committed by Alex Deucher

drm/amdkfd: Add missing NULL check in svm_range_map_to_gpu

bo_adev is NULL for system memory mapping to GPU.

Fixes: 30671b44 ("drm/amdgpu: fix TLB flushing during eviction")
Signed-off-by: default avatarPhilip Yang <Philip.Yang@amd.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 78174f47
...@@ -1281,7 +1281,7 @@ svm_range_map_to_gpu(struct kfd_process_device *pdd, struct svm_range *prange, ...@@ -1281,7 +1281,7 @@ svm_range_map_to_gpu(struct kfd_process_device *pdd, struct svm_range *prange,
last_start, prange->start + i, last_start, prange->start + i,
pte_flags, pte_flags,
last_start - prange->start, 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); NULL, dma_addr, &vm->last_update);
for (j = last_start - prange->start; j <= i; j++) for (j = last_start - prange->start; j <= i; j++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment