Commit 1123b989 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: rename gart.robj into gart.bo

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: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Reviewed-by: default avatarJunwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent cbd52851
...@@ -112,7 +112,7 @@ int amdgpu_gart_table_vram_alloc(struct amdgpu_device *adev) ...@@ -112,7 +112,7 @@ int amdgpu_gart_table_vram_alloc(struct amdgpu_device *adev)
{ {
int r; int r;
if (adev->gart.robj == NULL) { if (adev->gart.bo == NULL) {
struct amdgpu_bo_param bp; struct amdgpu_bo_param bp;
memset(&bp, 0, sizeof(bp)); memset(&bp, 0, sizeof(bp));
...@@ -123,7 +123,7 @@ int amdgpu_gart_table_vram_alloc(struct amdgpu_device *adev) ...@@ -123,7 +123,7 @@ int amdgpu_gart_table_vram_alloc(struct amdgpu_device *adev)
AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS; AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS;
bp.type = ttm_bo_type_kernel; bp.type = ttm_bo_type_kernel;
bp.resv = NULL; bp.resv = NULL;
r = amdgpu_bo_create(adev, &bp, &adev->gart.robj); r = amdgpu_bo_create(adev, &bp, &adev->gart.bo);
if (r) { if (r) {
return r; return r;
} }
...@@ -145,19 +145,19 @@ int amdgpu_gart_table_vram_pin(struct amdgpu_device *adev) ...@@ -145,19 +145,19 @@ int amdgpu_gart_table_vram_pin(struct amdgpu_device *adev)
{ {
int r; int r;
r = amdgpu_bo_reserve(adev->gart.robj, false); r = amdgpu_bo_reserve(adev->gart.bo, false);
if (unlikely(r != 0)) if (unlikely(r != 0))
return r; 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) { if (r) {
amdgpu_bo_unreserve(adev->gart.robj); amdgpu_bo_unreserve(adev->gart.bo);
return r; return r;
} }
r = amdgpu_bo_kmap(adev->gart.robj, &adev->gart.ptr); r = amdgpu_bo_kmap(adev->gart.bo, &adev->gart.ptr);
if (r) if (r)
amdgpu_bo_unpin(adev->gart.robj); amdgpu_bo_unpin(adev->gart.bo);
amdgpu_bo_unreserve(adev->gart.robj); amdgpu_bo_unreserve(adev->gart.bo);
adev->gart.table_addr = amdgpu_bo_gpu_offset(adev->gart.robj); adev->gart.table_addr = amdgpu_bo_gpu_offset(adev->gart.bo);
return r; return r;
} }
...@@ -173,14 +173,14 @@ void amdgpu_gart_table_vram_unpin(struct amdgpu_device *adev) ...@@ -173,14 +173,14 @@ void amdgpu_gart_table_vram_unpin(struct amdgpu_device *adev)
{ {
int r; int r;
if (adev->gart.robj == NULL) { if (adev->gart.bo == NULL) {
return; return;
} }
r = amdgpu_bo_reserve(adev->gart.robj, true); r = amdgpu_bo_reserve(adev->gart.bo, true);
if (likely(r == 0)) { if (likely(r == 0)) {
amdgpu_bo_kunmap(adev->gart.robj); amdgpu_bo_kunmap(adev->gart.bo);
amdgpu_bo_unpin(adev->gart.robj); amdgpu_bo_unpin(adev->gart.bo);
amdgpu_bo_unreserve(adev->gart.robj); amdgpu_bo_unreserve(adev->gart.bo);
adev->gart.ptr = NULL; adev->gart.ptr = NULL;
} }
} }
...@@ -196,10 +196,10 @@ void amdgpu_gart_table_vram_unpin(struct amdgpu_device *adev) ...@@ -196,10 +196,10 @@ void amdgpu_gart_table_vram_unpin(struct amdgpu_device *adev)
*/ */
void amdgpu_gart_table_vram_free(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; return;
} }
amdgpu_bo_unref(&adev->gart.robj); amdgpu_bo_unref(&adev->gart.bo);
} }
/* /*
......
...@@ -41,7 +41,7 @@ struct amdgpu_bo; ...@@ -41,7 +41,7 @@ struct amdgpu_bo;
struct amdgpu_gart { struct amdgpu_gart {
u64 table_addr; u64 table_addr;
struct amdgpu_bo *robj; struct amdgpu_bo *bo;
void *ptr; void *ptr;
unsigned num_gpu_pages; unsigned num_gpu_pages;
unsigned num_cpu_pages; unsigned num_cpu_pages;
......
...@@ -497,7 +497,7 @@ static int gmc_v6_0_gart_enable(struct amdgpu_device *adev) ...@@ -497,7 +497,7 @@ static int gmc_v6_0_gart_enable(struct amdgpu_device *adev)
int r, i; int r, i;
u32 field; u32 field;
if (adev->gart.robj == NULL) { if (adev->gart.bo == NULL) {
dev_err(adev->dev, "No VRAM object for PCIE GART.\n"); dev_err(adev->dev, "No VRAM object for PCIE GART.\n");
return -EINVAL; return -EINVAL;
} }
...@@ -588,7 +588,7 @@ static int gmc_v6_0_gart_init(struct amdgpu_device *adev) ...@@ -588,7 +588,7 @@ static int gmc_v6_0_gart_init(struct amdgpu_device *adev)
{ {
int r; int r;
if (adev->gart.robj) { if (adev->gart.bo) {
dev_warn(adev->dev, "gmc_v6_0 PCIE GART already initialized\n"); dev_warn(adev->dev, "gmc_v6_0 PCIE GART already initialized\n");
return 0; return 0;
} }
......
...@@ -605,7 +605,7 @@ static int gmc_v7_0_gart_enable(struct amdgpu_device *adev) ...@@ -605,7 +605,7 @@ static int gmc_v7_0_gart_enable(struct amdgpu_device *adev)
int r, i; int r, i;
u32 tmp, field; u32 tmp, field;
if (adev->gart.robj == NULL) { if (adev->gart.bo == NULL) {
dev_err(adev->dev, "No VRAM object for PCIE GART.\n"); dev_err(adev->dev, "No VRAM object for PCIE GART.\n");
return -EINVAL; return -EINVAL;
} }
...@@ -706,7 +706,7 @@ static int gmc_v7_0_gart_init(struct amdgpu_device *adev) ...@@ -706,7 +706,7 @@ static int gmc_v7_0_gart_init(struct amdgpu_device *adev)
{ {
int r; int r;
if (adev->gart.robj) { if (adev->gart.bo) {
WARN(1, "R600 PCIE GART already initialized\n"); WARN(1, "R600 PCIE GART already initialized\n");
return 0; return 0;
} }
......
...@@ -810,7 +810,7 @@ static int gmc_v8_0_gart_enable(struct amdgpu_device *adev) ...@@ -810,7 +810,7 @@ static int gmc_v8_0_gart_enable(struct amdgpu_device *adev)
int r, i; int r, i;
u32 tmp, field; u32 tmp, field;
if (adev->gart.robj == NULL) { if (adev->gart.bo == NULL) {
dev_err(adev->dev, "No VRAM object for PCIE GART.\n"); dev_err(adev->dev, "No VRAM object for PCIE GART.\n");
return -EINVAL; return -EINVAL;
} }
...@@ -928,7 +928,7 @@ static int gmc_v8_0_gart_init(struct amdgpu_device *adev) ...@@ -928,7 +928,7 @@ static int gmc_v8_0_gart_init(struct amdgpu_device *adev)
{ {
int r; int r;
if (adev->gart.robj) { if (adev->gart.bo) {
WARN(1, "R600 PCIE GART already initialized\n"); WARN(1, "R600 PCIE GART already initialized\n");
return 0; return 0;
} }
......
...@@ -836,7 +836,7 @@ static int gmc_v9_0_gart_init(struct amdgpu_device *adev) ...@@ -836,7 +836,7 @@ static int gmc_v9_0_gart_init(struct amdgpu_device *adev)
{ {
int r; int r;
if (adev->gart.robj) { if (adev->gart.bo) {
WARN(1, "VEGA10 PCIE GART already initialized\n"); WARN(1, "VEGA10 PCIE GART already initialized\n");
return 0; return 0;
} }
...@@ -1062,7 +1062,7 @@ static int gmc_v9_0_gart_enable(struct amdgpu_device *adev) ...@@ -1062,7 +1062,7 @@ static int gmc_v9_0_gart_enable(struct amdgpu_device *adev)
golden_settings_vega10_hdp, golden_settings_vega10_hdp,
ARRAY_SIZE(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"); dev_err(adev->dev, "No VRAM object for PCIE GART.\n");
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment