aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2017-12-08 15:09:20 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-12-15 17:15:09 -0500
commita7ea6548a5d3e458cd0ad0c41cea04eee64f1fb8 (patch)
tree7fe05b6bb09feadf71379397b280230eb365e8a9
parent8854695add1eaaeafae728850c905c4727e56f35 (diff)
drm/amdgpu: setup the shared and private apertures on gfx9
Same as previous asics. This was not yet set for gfx9. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c17
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c8
2 files changed, 20 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index e9a668bae194..9f7be230734c 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -1529,11 +1529,18 @@ static void gfx_v9_0_gpu_init(struct amdgpu_device *adev)
1529 for (i = 0; i < 16; i++) { 1529 for (i = 0; i < 16; i++) {
1530 soc15_grbm_select(adev, 0, 0, 0, i); 1530 soc15_grbm_select(adev, 0, 0, 0, i);
1531 /* CP and shaders */ 1531 /* CP and shaders */
1532 tmp = 0; 1532 if (i == 0) {
1533 tmp = REG_SET_FIELD(tmp, SH_MEM_CONFIG, ALIGNMENT_MODE, 1533 tmp = REG_SET_FIELD(0, SH_MEM_CONFIG, ALIGNMENT_MODE,
1534 SH_MEM_ALIGNMENT_MODE_UNALIGNED); 1534 SH_MEM_ALIGNMENT_MODE_UNALIGNED);
1535 WREG32_SOC15(GC, 0, mmSH_MEM_CONFIG, tmp); 1535 WREG32_SOC15(GC, 0, mmSH_MEM_CONFIG, tmp);
1536 WREG32_SOC15(GC, 0, mmSH_MEM_BASES, 0); 1536 WREG32_SOC15(GC, 0, mmSH_MEM_BASES, 0);
1537 } else {
1538 tmp = REG_SET_FIELD(0, SH_MEM_CONFIG, ALIGNMENT_MODE,
1539 SH_MEM_ALIGNMENT_MODE_UNALIGNED);
1540 WREG32_SOC15(GC, 0, mmSH_MEM_CONFIG, tmp);
1541 tmp = adev->mc.shared_aperture_start >> 48;
1542 WREG32_SOC15(GC, 0, mmSH_MEM_BASES, tmp);
1543 }
1537 } 1544 }
1538 soc15_grbm_select(adev, 0, 0, 0, 0); 1545 soc15_grbm_select(adev, 0, 0, 0, 0);
1539 1546
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 1b5dfccfd5d5..5da2272bd313 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -499,6 +499,14 @@ static int gmc_v9_0_early_init(void *handle)
499 gmc_v9_0_set_gart_funcs(adev); 499 gmc_v9_0_set_gart_funcs(adev);
500 gmc_v9_0_set_irq_funcs(adev); 500 gmc_v9_0_set_irq_funcs(adev);
501 501
502 adev->mc.shared_aperture_start = 0x2000000000000000ULL;
503 adev->mc.shared_aperture_end =
504 adev->mc.shared_aperture_start + (4ULL << 30) - 1;
505 adev->mc.private_aperture_start =
506 adev->mc.shared_aperture_end + 1;
507 adev->mc.private_aperture_end =
508 adev->mc.private_aperture_start + (4ULL << 30) - 1;
509
502 return 0; 510 return 0;
503} 511}
504 512