[PATCH 3/3] drm/amdgpu: DROP redundant drm_prime_sg_to_dma_addr_array
Xiao, Shane
shane.xiao at amd.com
Tue Apr 4 14:46:39 UTC 2023
[AMD Official Use Only - General]
> -----Original Message-----
> From: Kuehling, Felix <Felix.Kuehling at amd.com>
> Sent: Tuesday, April 4, 2023 9:59 PM
> To: Xiao, Shane <shane.xiao at amd.com>; amd-gfx at lists.freedesktop.org;
> Koenig, Christian <Christian.Koenig at amd.com>
> Cc: Liu, Aaron <Aaron.Liu at amd.com>; Guo, Shikai <Shikai.Guo at amd.com>
> Subject: Re: [PATCH 3/3] drm/amdgpu: DROP redundant
> drm_prime_sg_to_dma_addr_array
>
> Am 2023-04-04 um 05:56 schrieb Shane Xiao:
> > For DMA-MAP userptr on other GPUs, the dma address array has been
> > populated in amdgpu_ttm_backend_bind.
>
> OK. I think "has been populated" should be "will be populated", because
> amdgpu_ttm_backend_bind happens as a callback from the ttm_bo_validate
> call below. With that fixed in the patch description, the patch is
Yes, I will fix the comment.
Best Regards,
Shane
>
> Reviewed-by: Felix Kuehling <Felix.Kuehling at amd.com>
>
>
> >
> > Remove the redundant call from the driver.
> >
> > Signed-off-by: Shane Xiao <shane.xiao 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 bcb0a7b32703..94ee8f638c12 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> > @@ -488,9 +488,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