aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2018-01-12 08:52:22 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-02-19 14:17:43 -0500
commit770d13b19fdf365a99e559f1d47f1380910a947d (patch)
treed9c9e2f506facd092fb3c85663d6d08fb1bf50a7 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parentda320625de81f508bbe658d57bfa015ff8894de2 (diff)
drm/amdgpu: move struct amdgpu_mc into amdgpu_gmc.h
And rename it to amdgpu_gmc as well. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Samuel Li <Samuel.Li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 00a50cc5ec9a..a2204c770776 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -544,7 +544,7 @@ void amdgpu_device_wb_free(struct amdgpu_device *adev, u32 wb)
544 * as parameter. 544 * as parameter.
545 */ 545 */
546void amdgpu_device_vram_location(struct amdgpu_device *adev, 546void amdgpu_device_vram_location(struct amdgpu_device *adev,
547 struct amdgpu_mc *mc, u64 base) 547 struct amdgpu_gmc *mc, u64 base)
548{ 548{
549 uint64_t limit = (uint64_t)amdgpu_vram_limit << 20; 549 uint64_t limit = (uint64_t)amdgpu_vram_limit << 20;
550 550
@@ -570,11 +570,11 @@ void amdgpu_device_vram_location(struct amdgpu_device *adev,
570 * 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.
571 */ 571 */
572void amdgpu_device_gart_location(struct amdgpu_device *adev, 572void amdgpu_device_gart_location(struct amdgpu_device *adev,
573 struct amdgpu_mc *mc) 573 struct amdgpu_gmc *mc)
574{ 574{
575 u64 size_af, size_bf; 575 u64 size_af, size_bf;
576 576
577 size_af = adev->mc.mc_mask - mc->vram_end; 577 size_af = adev->gmc.mc_mask - mc->vram_end;
578 size_bf = mc->vram_start; 578 size_bf = mc->vram_start;
579 if (size_bf > size_af) { 579 if (size_bf > size_af) {
580 if (mc->gart_size > size_bf) { 580 if (mc->gart_size > size_bf) {
@@ -608,7 +608,7 @@ void amdgpu_device_gart_location(struct amdgpu_device *adev,
608 */ 608 */
609int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev) 609int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev)
610{ 610{
611 u64 space_needed = roundup_pow_of_two(adev->mc.real_vram_size); 611 u64 space_needed = roundup_pow_of_two(adev->gmc.real_vram_size);
612 u32 rbar_size = order_base_2(((space_needed >> 20) | 1)) - 1; 612 u32 rbar_size = order_base_2(((space_needed >> 20) | 1)) - 1;
613 struct pci_bus *root; 613 struct pci_bus *root;
614 struct resource *res; 614 struct resource *res;
@@ -1768,7 +1768,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
1768 adev->flags = flags; 1768 adev->flags = flags;
1769 adev->asic_type = flags & AMD_ASIC_MASK; 1769 adev->asic_type = flags & AMD_ASIC_MASK;
1770 adev->usec_timeout = AMDGPU_MAX_USEC_TIMEOUT; 1770 adev->usec_timeout = AMDGPU_MAX_USEC_TIMEOUT;
1771 adev->mc.gart_size = 512 * 1024 * 1024; 1771 adev->gmc.gart_size = 512 * 1024 * 1024;
1772 adev->accel_working = false; 1772 adev->accel_working = false;
1773 adev->num_rings = 0; 1773 adev->num_rings = 0;
1774 adev->mman.buffer_funcs = NULL; 1774 adev->mman.buffer_funcs = NULL;