[PATCH 05/11] drm/amdgpu: rename gart.robj into gart.bo

Huang Rui ray.huang at amd.com
Thu Aug 23 11:27:37 UTC 2018


On Wed, Aug 22, 2018 at 05:05:11PM +0200, Christian König wrote:
> sed -i "s/gart.robj/gart.bo/" drivers/gpu/drm/amd/amdgpu/*.c
> sed -i "s/gart.robj/gart.bo/" drivers/gpu/drm/amd/amdgpu/*.h
> 
> Just cleaning up radeon leftovers.
> 
> Signed-off-by: Christian König <christian.koenig at amd.com>

Yes, the 'bo' is the better name of gart table than 'robj'.

Reviewed-by: Huang Rui <ray.huang at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 32 ++++++++++++------------
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h |  2 +-
>  drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c    |  4 +--
>  drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c    |  4 +--
>  drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c    |  4 +--
>  drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c    |  4 +--
>  6 files changed, 25 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> index a54d5655a191..f5cb5e2856c1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> @@ -112,7 +112,7 @@ int amdgpu_gart_table_vram_alloc(struct amdgpu_device *adev)
>  {
>  	int r;
>  
> -	if (adev->gart.robj == NULL) {
> +	if (adev->gart.bo == NULL) {
>  		struct amdgpu_bo_param bp;
>  
>  		memset(&bp, 0, sizeof(bp));
> @@ -123,7 +123,7 @@ int amdgpu_gart_table_vram_alloc(struct amdgpu_device *adev)
>  			AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS;
>  		bp.type = ttm_bo_type_kernel;
>  		bp.resv = NULL;
> -		r = amdgpu_bo_create(adev, &bp, &adev->gart.robj);
> +		r = amdgpu_bo_create(adev, &bp, &adev->gart.bo);
>  		if (r) {
>  			return r;
>  		}
> @@ -145,19 +145,19 @@ int amdgpu_gart_table_vram_pin(struct amdgpu_device *adev)
>  {
>  	int r;
>  
> -	r = amdgpu_bo_reserve(adev->gart.robj, false);
> +	r = amdgpu_bo_reserve(adev->gart.bo, false);
>  	if (unlikely(r != 0))
>  		return r;
> -	r = amdgpu_bo_pin(adev->gart.robj, AMDGPU_GEM_DOMAIN_VRAM);
> +	r = amdgpu_bo_pin(adev->gart.bo, AMDGPU_GEM_DOMAIN_VRAM);
>  	if (r) {
> -		amdgpu_bo_unreserve(adev->gart.robj);
> +		amdgpu_bo_unreserve(adev->gart.bo);
>  		return r;
>  	}
> -	r = amdgpu_bo_kmap(adev->gart.robj, &adev->gart.ptr);
> +	r = amdgpu_bo_kmap(adev->gart.bo, &adev->gart.ptr);
>  	if (r)
> -		amdgpu_bo_unpin(adev->gart.robj);
> -	amdgpu_bo_unreserve(adev->gart.robj);
> -	adev->gart.table_addr = amdgpu_bo_gpu_offset(adev->gart.robj);
> +		amdgpu_bo_unpin(adev->gart.bo);
> +	amdgpu_bo_unreserve(adev->gart.bo);
> +	adev->gart.table_addr = amdgpu_bo_gpu_offset(adev->gart.bo);
>  	return r;
>  }
>  
> @@ -173,14 +173,14 @@ void amdgpu_gart_table_vram_unpin(struct amdgpu_device *adev)
>  {
>  	int r;
>  
> -	if (adev->gart.robj == NULL) {
> +	if (adev->gart.bo == NULL) {
>  		return;
>  	}
> -	r = amdgpu_bo_reserve(adev->gart.robj, true);
> +	r = amdgpu_bo_reserve(adev->gart.bo, true);
>  	if (likely(r == 0)) {
> -		amdgpu_bo_kunmap(adev->gart.robj);
> -		amdgpu_bo_unpin(adev->gart.robj);
> -		amdgpu_bo_unreserve(adev->gart.robj);
> +		amdgpu_bo_kunmap(adev->gart.bo);
> +		amdgpu_bo_unpin(adev->gart.bo);
> +		amdgpu_bo_unreserve(adev->gart.bo);
>  		adev->gart.ptr = NULL;
>  	}
>  }
> @@ -196,10 +196,10 @@ void amdgpu_gart_table_vram_unpin(struct amdgpu_device *adev)
>   */
>  void amdgpu_gart_table_vram_free(struct amdgpu_device *adev)
>  {
> -	if (adev->gart.robj == NULL) {
> +	if (adev->gart.bo == NULL) {
>  		return;
>  	}
> -	amdgpu_bo_unref(&adev->gart.robj);
> +	amdgpu_bo_unref(&adev->gart.bo);
>  }
>  
>  /*
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h
> index 9f9e9dc87da1..d7b7c2d408d5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h
> @@ -41,7 +41,7 @@ struct amdgpu_bo;
>  
>  struct amdgpu_gart {
>  	u64				table_addr;
> -	struct amdgpu_bo		*robj;
> +	struct amdgpu_bo		*bo;
>  	void				*ptr;
>  	unsigned			num_gpu_pages;
>  	unsigned			num_cpu_pages;
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> index c14cf1c5bf57..c50bd0c46508 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> @@ -497,7 +497,7 @@ static int gmc_v6_0_gart_enable(struct amdgpu_device *adev)
>  	int r, i;
>  	u32 field;
>  
> -	if (adev->gart.robj == NULL) {
> +	if (adev->gart.bo == NULL) {
>  		dev_err(adev->dev, "No VRAM object for PCIE GART.\n");
>  		return -EINVAL;
>  	}
> @@ -588,7 +588,7 @@ static int gmc_v6_0_gart_init(struct amdgpu_device *adev)
>  {
>  	int r;
>  
> -	if (adev->gart.robj) {
> +	if (adev->gart.bo) {
>  		dev_warn(adev->dev, "gmc_v6_0 PCIE GART already initialized\n");
>  		return 0;
>  	}
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
> index 0c3a1618c3b7..c7cbd9f06892 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
> @@ -607,7 +607,7 @@ static int gmc_v7_0_gart_enable(struct amdgpu_device *adev)
>  	int r, i;
>  	u32 tmp, field;
>  
> -	if (adev->gart.robj == NULL) {
> +	if (adev->gart.bo == NULL) {
>  		dev_err(adev->dev, "No VRAM object for PCIE GART.\n");
>  		return -EINVAL;
>  	}
> @@ -708,7 +708,7 @@ static int gmc_v7_0_gart_init(struct amdgpu_device *adev)
>  {
>  	int r;
>  
> -	if (adev->gart.robj) {
> +	if (adev->gart.bo) {
>  		WARN(1, "R600 PCIE GART already initialized\n");
>  		return 0;
>  	}
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
> index 274c9321d06c..21e3d9af370d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
> @@ -809,7 +809,7 @@ static int gmc_v8_0_gart_enable(struct amdgpu_device *adev)
>  	int r, i;
>  	u32 tmp, field;
>  
> -	if (adev->gart.robj == NULL) {
> +	if (adev->gart.bo == NULL) {
>  		dev_err(adev->dev, "No VRAM object for PCIE GART.\n");
>  		return -EINVAL;
>  	}
> @@ -927,7 +927,7 @@ static int gmc_v8_0_gart_init(struct amdgpu_device *adev)
>  {
>  	int r;
>  
> -	if (adev->gart.robj) {
> +	if (adev->gart.bo) {
>  		WARN(1, "R600 PCIE GART already initialized\n");
>  		return 0;
>  	}
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> index 25f614b91a9b..eb1936223748 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> @@ -843,7 +843,7 @@ static int gmc_v9_0_gart_init(struct amdgpu_device *adev)
>  {
>  	int r;
>  
> -	if (adev->gart.robj) {
> +	if (adev->gart.bo) {
>  		WARN(1, "VEGA10 PCIE GART already initialized\n");
>  		return 0;
>  	}
> @@ -1081,7 +1081,7 @@ static int gmc_v9_0_gart_enable(struct amdgpu_device *adev)
>  						golden_settings_vega10_hdp,
>  						ARRAY_SIZE(golden_settings_vega10_hdp));
>  
> -	if (adev->gart.robj == NULL) {
> +	if (adev->gart.bo == NULL) {
>  		dev_err(adev->dev, "No VRAM object for PCIE GART.\n");
>  		return -EINVAL;
>  	}
> -- 
> 2.17.1
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list