diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2017-12-14 16:33:36 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-18 10:59:28 -0500 |
commit | 2543e28a81b8d687880315475ba1203ca2f7496a (patch) | |
tree | 665d4ff4c37c730a2bf90f2ead856f010afbb6c5 /drivers/gpu/drm/amd/amdgpu | |
parent | 22cb0164378c6511423f79d429e0b2e4290934df (diff) |
drm/amdgpu: rename amdgpu_*_location functions
add device to the name for consistency.
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 4 |
6 files changed, 18 insertions, 14 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index b03f9242448c..ac21addcde7d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -1901,8 +1901,10 @@ void amdgpu_cs_report_moved_bytes(struct amdgpu_device *adev, u64 num_bytes, | |||
1901 | u64 num_vis_bytes); | 1901 | u64 num_vis_bytes); |
1902 | void amdgpu_ttm_placement_from_domain(struct amdgpu_bo *abo, u32 domain); | 1902 | void amdgpu_ttm_placement_from_domain(struct amdgpu_bo *abo, u32 domain); |
1903 | bool amdgpu_ttm_bo_is_amdgpu_bo(struct ttm_buffer_object *bo); | 1903 | bool amdgpu_ttm_bo_is_amdgpu_bo(struct ttm_buffer_object *bo); |
1904 | void amdgpu_vram_location(struct amdgpu_device *adev, struct amdgpu_mc *mc, u64 base); | 1904 | void amdgpu_device_vram_location(struct amdgpu_device *adev, |
1905 | void amdgpu_gart_location(struct amdgpu_device *adev, struct amdgpu_mc *mc); | 1905 | struct amdgpu_mc *mc, u64 base); |
1906 | void amdgpu_device_gart_location(struct amdgpu_device *adev, | ||
1907 | struct amdgpu_mc *mc); | ||
1906 | int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev); | 1908 | int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev); |
1907 | void amdgpu_ttm_set_active_vram_size(struct amdgpu_device *adev, u64 size); | 1909 | void amdgpu_ttm_set_active_vram_size(struct amdgpu_device *adev, u64 size); |
1908 | int amdgpu_ttm_init(struct amdgpu_device *adev); | 1910 | int amdgpu_ttm_init(struct amdgpu_device *adev); |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index ae9a3a0334d7..09ffa9fbcd92 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -535,7 +535,7 @@ void amdgpu_device_wb_free(struct amdgpu_device *adev, u32 wb) | |||
535 | } | 535 | } |
536 | 536 | ||
537 | /** | 537 | /** |
538 | * amdgpu_vram_location - try to find VRAM location | 538 | * amdgpu_device_vram_location - try to find VRAM location |
539 | * @adev: amdgpu device structure holding all necessary informations | 539 | * @adev: amdgpu device structure holding all necessary informations |
540 | * @mc: memory controller structure holding memory informations | 540 | * @mc: memory controller structure holding memory informations |
541 | * @base: base address at which to put VRAM | 541 | * @base: base address at which to put VRAM |
@@ -543,7 +543,8 @@ void amdgpu_device_wb_free(struct amdgpu_device *adev, u32 wb) | |||
543 | * Function will try to place VRAM at base address provided | 543 | * Function will try to place VRAM at base address provided |
544 | * as parameter. | 544 | * as parameter. |
545 | */ | 545 | */ |
546 | void amdgpu_vram_location(struct amdgpu_device *adev, struct amdgpu_mc *mc, u64 base) | 546 | void amdgpu_device_vram_location(struct amdgpu_device *adev, |
547 | struct amdgpu_mc *mc, u64 base) | ||
547 | { | 548 | { |
548 | uint64_t limit = (uint64_t)amdgpu_vram_limit << 20; | 549 | uint64_t limit = (uint64_t)amdgpu_vram_limit << 20; |
549 | 550 | ||
@@ -557,7 +558,7 @@ void amdgpu_vram_location(struct amdgpu_device *adev, struct amdgpu_mc *mc, u64 | |||
557 | } | 558 | } |
558 | 559 | ||
559 | /** | 560 | /** |
560 | * amdgpu_gart_location - try to find GTT location | 561 | * amdgpu_device_gart_location - try to find GTT location |
561 | * @adev: amdgpu device structure holding all necessary informations | 562 | * @adev: amdgpu device structure holding all necessary informations |
562 | * @mc: memory controller structure holding memory informations | 563 | * @mc: memory controller structure holding memory informations |
563 | * | 564 | * |
@@ -568,7 +569,8 @@ void amdgpu_vram_location(struct amdgpu_device *adev, struct amdgpu_mc *mc, u64 | |||
568 | * | 569 | * |
569 | * FIXME: when reducing GTT size align new size on power of 2. | 570 | * FIXME: when reducing GTT size align new size on power of 2. |
570 | */ | 571 | */ |
571 | void amdgpu_gart_location(struct amdgpu_device *adev, struct amdgpu_mc *mc) | 572 | void amdgpu_device_gart_location(struct amdgpu_device *adev, |
573 | struct amdgpu_mc *mc) | ||
572 | { | 574 | { |
573 | u64 size_af, size_bf; | 575 | u64 size_af, size_bf; |
574 | 576 | ||
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c index 279f43a2b1a4..e1a73c43f32d 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | |||
@@ -222,8 +222,8 @@ static void gmc_v6_0_vram_gtt_location(struct amdgpu_device *adev, | |||
222 | u64 base = RREG32(mmMC_VM_FB_LOCATION) & 0xFFFF; | 222 | u64 base = RREG32(mmMC_VM_FB_LOCATION) & 0xFFFF; |
223 | base <<= 24; | 223 | base <<= 24; |
224 | 224 | ||
225 | amdgpu_vram_location(adev, &adev->mc, base); | 225 | amdgpu_device_vram_location(adev, &adev->mc, base); |
226 | amdgpu_gart_location(adev, mc); | 226 | amdgpu_device_gart_location(adev, mc); |
227 | } | 227 | } |
228 | 228 | ||
229 | static void gmc_v6_0_mc_program(struct amdgpu_device *adev) | 229 | static void gmc_v6_0_mc_program(struct amdgpu_device *adev) |
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c index c4285395b5fe..356a9a71b8cf 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | |||
@@ -240,8 +240,8 @@ static void gmc_v7_0_vram_gtt_location(struct amdgpu_device *adev, | |||
240 | u64 base = RREG32(mmMC_VM_FB_LOCATION) & 0xFFFF; | 240 | u64 base = RREG32(mmMC_VM_FB_LOCATION) & 0xFFFF; |
241 | base <<= 24; | 241 | base <<= 24; |
242 | 242 | ||
243 | amdgpu_vram_location(adev, &adev->mc, base); | 243 | amdgpu_device_vram_location(adev, &adev->mc, base); |
244 | amdgpu_gart_location(adev, mc); | 244 | amdgpu_device_gart_location(adev, mc); |
245 | } | 245 | } |
246 | 246 | ||
247 | /** | 247 | /** |
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c index 6641276ecbdf..fce45578f5fd 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | |||
@@ -405,8 +405,8 @@ static void gmc_v8_0_vram_gtt_location(struct amdgpu_device *adev, | |||
405 | base = RREG32(mmMC_VM_FB_LOCATION) & 0xFFFF; | 405 | base = RREG32(mmMC_VM_FB_LOCATION) & 0xFFFF; |
406 | base <<= 24; | 406 | base <<= 24; |
407 | 407 | ||
408 | amdgpu_vram_location(adev, &adev->mc, base); | 408 | amdgpu_device_vram_location(adev, &adev->mc, base); |
409 | amdgpu_gart_location(adev, mc); | 409 | amdgpu_device_gart_location(adev, mc); |
410 | } | 410 | } |
411 | 411 | ||
412 | /** | 412 | /** |
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index 899ffe50cb50..3c84f82687f9 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | |||
@@ -638,8 +638,8 @@ static void gmc_v9_0_vram_gtt_location(struct amdgpu_device *adev, | |||
638 | u64 base = 0; | 638 | u64 base = 0; |
639 | if (!amdgpu_sriov_vf(adev)) | 639 | if (!amdgpu_sriov_vf(adev)) |
640 | base = mmhub_v1_0_get_fb_location(adev); | 640 | base = mmhub_v1_0_get_fb_location(adev); |
641 | amdgpu_vram_location(adev, &adev->mc, base); | 641 | amdgpu_device_vram_location(adev, &adev->mc, base); |
642 | amdgpu_gart_location(adev, mc); | 642 | amdgpu_device_gart_location(adev, mc); |
643 | /* base offset of vram pages */ | 643 | /* base offset of vram pages */ |
644 | if (adev->flags & AMD_IS_APU) | 644 | if (adev->flags & AMD_IS_APU) |
645 | adev->vm_manager.vram_base_offset = gfxhub_v1_0_get_mc_fb_offset(adev); | 645 | adev->vm_manager.vram_base_offset = gfxhub_v1_0_get_mc_fb_offset(adev); |