drm/amdgpu: rename gart.robj into gart.bo
authorChristian König <christian.koenig@amd.com>
Tue, 21 Aug 2018 15:07:47 +0000 (17:07 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Aug 2018 16:11:18 +0000 (11:11 -0500)
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@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

index a54d5655a191abac380e58c7d175cd08f055fa5b..f5cb5e2856c171656fce7c76c8d8964f7d12b1f1 100644 (file)
@@ -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);
 }
 
 /*
index 9f9e9dc87da11c42b2e414fbe88a0251bcf9897d..d7b7c2d408d5911c6594ef72a310c774c79761eb 100644 (file)
@@ -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;
index 0a0a4dcbea2c1a0488a044b333b6808996a9db36..b4302aaa1c14f3126c4bd9c6ca161854348aa2ec 100644 (file)
@@ -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;
        }
index 93ea19456e91c8959893338edd6782a0e80f4fe3..b41b8515670dd13bce392a401d4598c811fe29ba 100644 (file)
@@ -605,7 +605,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;
        }
@@ -706,7 +706,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;
        }
index 24dd86725b6e733a0f128591b2c0193b83d643bc..d2fc97a2ab0094f58f72f004bc1471679cbfb25f 100644 (file)
@@ -810,7 +810,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;
        }
@@ -928,7 +928,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;
        }
index 57db52388a8bbc07724be004158de626284de383..c9550b11e19a216c2f585ef01743e3866d8a697f 100644 (file)
@@ -836,7 +836,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;
        }
@@ -1062,7 +1062,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;
        }