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 a54d565..f5cb5e2 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 9f9e9dc..d7b7c2d 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 0a0a4dc..b4302aa 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 93ea194..b41b851 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 24dd867..d2fc97a 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 57db523..c9550b1 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;
        }