aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-07-06 16:26:05 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-07-14 11:06:29 -0400
commited21c047e9753ed5c7abe437ec25222b7d538a89 (patch)
treea63603a3442260b4d91a275fb87ff4c0f48b7fd0
parent3490bdb537fbf94a7a57f6c353a39e6306a9cfbd (diff)
drm/amdgpu: remove gtt_base_align handling
Not used any more. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h1
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c6
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c1
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c1
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c1
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c1
6 files changed, 3 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 9c1146228421..590798f0c245 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -564,7 +564,6 @@ struct amdgpu_mc {
564 unsigned vram_width; 564 unsigned vram_width;
565 u64 real_vram_size; 565 u64 real_vram_size;
566 int vram_mtrr; 566 int vram_mtrr;
567 u64 gtt_base_align;
568 u64 mc_mask; 567 u64 mc_mask;
569 const struct firmware *fw; /* MC firmware */ 568 const struct firmware *fw; /* MC firmware */
570 uint32_t fw_version; 569 uint32_t fw_version;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index d92ac5c1af54..c635abdac96f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -696,8 +696,8 @@ void amdgpu_gtt_location(struct amdgpu_device *adev, struct amdgpu_mc *mc)
696{ 696{
697 u64 size_af, size_bf; 697 u64 size_af, size_bf;
698 698
699 size_af = ((adev->mc.mc_mask - mc->vram_end) + mc->gtt_base_align) & ~mc->gtt_base_align; 699 size_af = adev->mc.mc_mask - mc->vram_end;
700 size_bf = mc->vram_start & ~mc->gtt_base_align; 700 size_bf = mc->vram_start;
701 if (size_bf > size_af) { 701 if (size_bf > size_af) {
702 if (mc->gtt_size > size_bf) { 702 if (mc->gtt_size > size_bf) {
703 dev_warn(adev->dev, "limiting GTT\n"); 703 dev_warn(adev->dev, "limiting GTT\n");
@@ -709,7 +709,7 @@ void amdgpu_gtt_location(struct amdgpu_device *adev, struct amdgpu_mc *mc)
709 dev_warn(adev->dev, "limiting GTT\n"); 709 dev_warn(adev->dev, "limiting GTT\n");
710 mc->gtt_size = size_af; 710 mc->gtt_size = size_af;
711 } 711 }
712 mc->gtt_start = (mc->vram_end + 1 + mc->gtt_base_align) & ~mc->gtt_base_align; 712 mc->gtt_start = mc->vram_end + 1;
713 } 713 }
714 mc->gtt_end = mc->gtt_start + mc->gtt_size - 1; 714 mc->gtt_end = mc->gtt_start + mc->gtt_size - 1;
715 dev_info(adev->dev, "GTT: %lluM 0x%016llX - 0x%016llX\n", 715 dev_info(adev->dev, "GTT: %lluM 0x%016llX - 0x%016llX\n",
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
index 5f7750c6497e..810d5734ce1e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
@@ -228,7 +228,6 @@ static void gmc_v6_0_vram_gtt_location(struct amdgpu_device *adev,
228 mc->mc_vram_size = 0xFFC0000000ULL; 228 mc->mc_vram_size = 0xFFC0000000ULL;
229 } 229 }
230 amdgpu_vram_location(adev, &adev->mc, base); 230 amdgpu_vram_location(adev, &adev->mc, base);
231 adev->mc.gtt_base_align = 0;
232 amdgpu_gtt_location(adev, mc); 231 amdgpu_gtt_location(adev, mc);
233} 232}
234 233
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
index 388b52febc8b..066f00ad4152 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
@@ -244,7 +244,6 @@ static void gmc_v7_0_vram_gtt_location(struct amdgpu_device *adev,
244 mc->mc_vram_size = 0xFFC0000000ULL; 244 mc->mc_vram_size = 0xFFC0000000ULL;
245 } 245 }
246 amdgpu_vram_location(adev, &adev->mc, base); 246 amdgpu_vram_location(adev, &adev->mc, base);
247 adev->mc.gtt_base_align = 0;
248 amdgpu_gtt_location(adev, mc); 247 amdgpu_gtt_location(adev, mc);
249} 248}
250 249
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
index d148d1c585b3..f30c39c72bca 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
@@ -406,7 +406,6 @@ static void gmc_v8_0_vram_gtt_location(struct amdgpu_device *adev,
406 mc->mc_vram_size = 0xFFC0000000ULL; 406 mc->mc_vram_size = 0xFFC0000000ULL;
407 } 407 }
408 amdgpu_vram_location(adev, &adev->mc, base); 408 amdgpu_vram_location(adev, &adev->mc, base);
409 adev->mc.gtt_base_align = 0;
410 amdgpu_gtt_location(adev, mc); 409 amdgpu_gtt_location(adev, mc);
411} 410}
412 411
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 8ec148727149..dd2756ec11b8 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -420,7 +420,6 @@ static void gmc_v9_0_vram_gtt_location(struct amdgpu_device *adev,
420 if (!amdgpu_sriov_vf(adev)) 420 if (!amdgpu_sriov_vf(adev))
421 base = mmhub_v1_0_get_fb_location(adev); 421 base = mmhub_v1_0_get_fb_location(adev);
422 amdgpu_vram_location(adev, &adev->mc, base); 422 amdgpu_vram_location(adev, &adev->mc, base);
423 adev->mc.gtt_base_align = 0;
424 amdgpu_gtt_location(adev, mc); 423 amdgpu_gtt_location(adev, mc);
425 /* base offset of vram pages */ 424 /* base offset of vram pages */
426 if (adev->flags & AMD_IS_APU) 425 if (adev->flags & AMD_IS_APU)