[PATCH 3/3] drm/amdgpu: DROP redundant drm_prime_sg_to_dma_addr_array

Felix Kuehling felix.kuehling at amd.com
Wed Apr 5 20:29:08 UTC 2023


On 2023-04-05 11:31, Shane Xiao wrote:
> For DMA-MAP userptr on other GPUs, the dma address array
> will be populated in amdgpu_ttm_backend_bind.
>
> Remove the redundant call from the driver.
>
> v2:
>    update the comment

Thanks. You already have my R-b. :)


>
> Signed-off-by: Shane Xiao <shane.xiao at amd.com>
> Reviewed-by: Felix Kuehling <Felix.Kuehling at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 ---
>   1 file changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> index b181bb373783..74a1070f0be7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> @@ -503,9 +503,6 @@ kfd_mem_dmamap_userptr(struct kgd_mem *mem,
>   	if (unlikely(ret))
>   		goto release_sg;
>   
> -	drm_prime_sg_to_dma_addr_array(ttm->sg, ttm->dma_address,
> -				       ttm->num_pages);
> -
>   	amdgpu_bo_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_GTT);
>   	ret = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
>   	if (ret)


More information about the amd-gfx mailing list