[PATCH 1/1] drm/amdkfd: Add missing NULL check in svm_range_map_to_gpu

Christian König ckoenig.leichtzumerken at gmail.com
Tue Apr 5 06:01:51 UTC 2022


Am 04.04.22 um 23:42 schrieb Philip Yang:
> bo_adev is NULL for system memory mapping to GPU.
>
> Fixes: 05fe8eeca92 (drm/amdgpu: fix TLB flushing during eviction)
> Signed-off-by: Philip Yang <Philip.Yang at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
> index 907b02045824..d3fb2d0b5a25 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
> @@ -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++)



More information about the amd-gfx mailing list