diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2016-04-08 01:01:18 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-05-04 20:21:59 -0400 |
commit | 3fde56b8dbed354c54651d0566c9719106d024f7 (patch) | |
tree | 09c93d3d54a2bcdcba9ae978fddb951af8d2d22f /drivers/gpu | |
parent | c90766cf4e78e4708111afe5011a00288e60c66e (diff) |
drm/amdgpu/gmc: add proper CG flags for fiji
We were already enabling these CG features, this uses
the standard interface for doing so.
Acked-by: Tom St Denis <tom.stdenis@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/vi.c | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c index 02deb3229405..1e85b8fc60a5 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | |||
@@ -1310,11 +1310,11 @@ static int gmc_v8_0_process_interrupt(struct amdgpu_device *adev, | |||
1310 | } | 1310 | } |
1311 | 1311 | ||
1312 | static void fiji_update_mc_medium_grain_clock_gating(struct amdgpu_device *adev, | 1312 | static void fiji_update_mc_medium_grain_clock_gating(struct amdgpu_device *adev, |
1313 | bool enable) | 1313 | bool enable) |
1314 | { | 1314 | { |
1315 | uint32_t data; | 1315 | uint32_t data; |
1316 | 1316 | ||
1317 | if (enable) { | 1317 | if (enable && (adev->cg_flags & AMD_CG_SUPPORT_MC_MGCG)) { |
1318 | data = RREG32(mmMC_HUB_MISC_HUB_CG); | 1318 | data = RREG32(mmMC_HUB_MISC_HUB_CG); |
1319 | data |= MC_HUB_MISC_HUB_CG__ENABLE_MASK; | 1319 | data |= MC_HUB_MISC_HUB_CG__ENABLE_MASK; |
1320 | WREG32(mmMC_HUB_MISC_HUB_CG, data); | 1320 | WREG32(mmMC_HUB_MISC_HUB_CG, data); |
@@ -1390,11 +1390,11 @@ static void fiji_update_mc_medium_grain_clock_gating(struct amdgpu_device *adev, | |||
1390 | } | 1390 | } |
1391 | 1391 | ||
1392 | static void fiji_update_mc_light_sleep(struct amdgpu_device *adev, | 1392 | static void fiji_update_mc_light_sleep(struct amdgpu_device *adev, |
1393 | bool enable) | 1393 | bool enable) |
1394 | { | 1394 | { |
1395 | uint32_t data; | 1395 | uint32_t data; |
1396 | 1396 | ||
1397 | if (enable) { | 1397 | if (enable && (adev->cg_flags & AMD_CG_SUPPORT_MC_LS)) { |
1398 | data = RREG32(mmMC_HUB_MISC_HUB_CG); | 1398 | data = RREG32(mmMC_HUB_MISC_HUB_CG); |
1399 | data |= MC_HUB_MISC_HUB_CG__MEM_LS_ENABLE_MASK; | 1399 | data |= MC_HUB_MISC_HUB_CG__MEM_LS_ENABLE_MASK; |
1400 | WREG32(mmMC_HUB_MISC_HUB_CG, data); | 1400 | WREG32(mmMC_HUB_MISC_HUB_CG, data); |
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c index ea9edf4e32ad..16b2a299f3a4 100644 --- a/drivers/gpu/drm/amd/amdgpu/vi.c +++ b/drivers/gpu/drm/amd/amdgpu/vi.c | |||
@@ -1089,7 +1089,9 @@ static int vi_common_early_init(void *handle) | |||
1089 | AMD_CG_SUPPORT_BIF_LS | | 1089 | AMD_CG_SUPPORT_BIF_LS | |
1090 | AMD_CG_SUPPORT_HDP_MGCG | | 1090 | AMD_CG_SUPPORT_HDP_MGCG | |
1091 | AMD_CG_SUPPORT_HDP_LS | | 1091 | AMD_CG_SUPPORT_HDP_LS | |
1092 | AMD_CG_SUPPORT_ROM_MGCG; | 1092 | AMD_CG_SUPPORT_ROM_MGCG | |
1093 | AMD_CG_SUPPORT_MC_MGCG | | ||
1094 | AMD_CG_SUPPORT_MC_LS; | ||
1093 | adev->pg_flags = 0; | 1095 | adev->pg_flags = 0; |
1094 | adev->external_rev_id = adev->rev_id + 0x3c; | 1096 | adev->external_rev_id = adev->rev_id + 0x3c; |
1095 | break; | 1097 | break; |