]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amdgpu: DROP redundant drm_prime_sg_to_dma_addr_array
authorShane Xiao <shane.xiao@amd.com>
Wed, 5 Apr 2023 15:09:14 +0000 (23:09 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 11 Apr 2023 22:03:44 +0000 (18:03 -0400)
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

Signed-off-by: Shane Xiao <shane.xiao@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c

index 82a8b435148c03f0977c8a7d84fec1f447b28078..83a83ced2439f5401bceb623476f57ee160580b4 100644 (file)
@@ -504,9 +504,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)