[PATCH 3/5] drm/amdgpu: rename amdgpu_ttm_bind to amdgpu_ttm_alloc_gart

Zhou, David(ChunMing) David1.Zhou at amd.com
Thu Nov 2 12:36:59 UTC 2017


I'm not sue if it's properly, and have no strong opinion, Alex or others can have a look.


发自坚果 Pro

Christian K鰊ig <ckoenig.leichtzumerken at gmail.com> 于 2017年11月2日 下午8:19写道:

Ping? Any objects or can I push this?

Asking because the next patch is desperately needed upstream.

Christian.

Am 27.10.2017 um 16:43 schrieb Christian König:
> From: Christian König <christian.koenig at amd.com>
>
> We actually don't bind here, but rather allocate GART space if necessary.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c     | 4 ++--
>   drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c    | 4 ++--
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h    | 2 +-
>   4 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> index 67fb15f..354c874 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> @@ -681,7 +681,7 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
>        if (!r && p->uf_entry.robj) {
>                struct amdgpu_bo *uf = p->uf_entry.robj;
>
> -             r = amdgpu_ttm_bind(&uf->tbo);
> +             r = amdgpu_ttm_alloc_gart(&uf->tbo);
>                p->job->uf_addr += amdgpu_bo_gpu_offset(uf);
>        }
>
> @@ -1596,5 +1596,5 @@ int amdgpu_cs_find_mapping(struct amdgpu_cs_parser *parser,
>                        return r;
>        }
>
> -     return amdgpu_ttm_bind(&(*bo)->tbo);
> +     return amdgpu_ttm_alloc_gart(&(*bo)->tbo);
>   }
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index e44b880..7d03398 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -688,7 +688,7 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,
>                goto error;
>        }
>
> -     r = amdgpu_ttm_bind(&bo->tbo);
> +     r = amdgpu_ttm_alloc_gart(&bo->tbo);
>        if (unlikely(r)) {
>                dev_err(adev->dev, "%p bind failed\n", bo);
>                goto error;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index c7ccd6f..eead348 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -875,7 +875,7 @@ static int amdgpu_ttm_backend_bind(struct ttm_tt *ttm,
>        return r;
>   }
>
> -int amdgpu_ttm_bind(struct ttm_buffer_object *bo)
> +int amdgpu_ttm_alloc_gart(struct ttm_buffer_object *bo)
>   {
>        struct amdgpu_device *adev = amdgpu_ttm_adev(bo->bdev);
>        struct ttm_mem_reg tmp;
> @@ -1605,7 +1605,7 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo,
>        }
>
>        if (bo->tbo.mem.mem_type == TTM_PL_TT) {
> -             r = amdgpu_ttm_bind(&bo->tbo);
> +             r = amdgpu_ttm_alloc_gart(&bo->tbo);
>                if (r)
>                        return r;
>        }
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
> index d2985de..4f9433e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
> @@ -91,7 +91,7 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo,
>                        struct dma_fence **fence);
>
>   int amdgpu_mmap(struct file *filp, struct vm_area_struct *vma);
> -int amdgpu_ttm_bind(struct ttm_buffer_object *bo);
> +int amdgpu_ttm_alloc_gart(struct ttm_buffer_object *bo);
>   int amdgpu_ttm_recover_gart(struct ttm_buffer_object *tbo);
>
>   int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages);


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20171102/df6dfe1a/attachment.html>


More information about the amd-gfx mailing list