Commit 3fde56b8 authored by Alex Deucher's avatar Alex Deucher

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: default avatarTom St Denis <tom.stdenis@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c90766cf
...@@ -1314,7 +1314,7 @@ static void fiji_update_mc_medium_grain_clock_gating(struct amdgpu_device *adev, ...@@ -1314,7 +1314,7 @@ static void fiji_update_mc_medium_grain_clock_gating(struct amdgpu_device *adev,
{ {
uint32_t data; uint32_t data;
if (enable) { if (enable && (adev->cg_flags & AMD_CG_SUPPORT_MC_MGCG)) {
data = RREG32(mmMC_HUB_MISC_HUB_CG); data = RREG32(mmMC_HUB_MISC_HUB_CG);
data |= MC_HUB_MISC_HUB_CG__ENABLE_MASK; data |= MC_HUB_MISC_HUB_CG__ENABLE_MASK;
WREG32(mmMC_HUB_MISC_HUB_CG, data); WREG32(mmMC_HUB_MISC_HUB_CG, data);
...@@ -1394,7 +1394,7 @@ static void fiji_update_mc_light_sleep(struct amdgpu_device *adev, ...@@ -1394,7 +1394,7 @@ static void fiji_update_mc_light_sleep(struct amdgpu_device *adev,
{ {
uint32_t data; uint32_t data;
if (enable) { if (enable && (adev->cg_flags & AMD_CG_SUPPORT_MC_LS)) {
data = RREG32(mmMC_HUB_MISC_HUB_CG); data = RREG32(mmMC_HUB_MISC_HUB_CG);
data |= MC_HUB_MISC_HUB_CG__MEM_LS_ENABLE_MASK; data |= MC_HUB_MISC_HUB_CG__MEM_LS_ENABLE_MASK;
WREG32(mmMC_HUB_MISC_HUB_CG, data); WREG32(mmMC_HUB_MISC_HUB_CG, data);
......
...@@ -1089,7 +1089,9 @@ static int vi_common_early_init(void *handle) ...@@ -1089,7 +1089,9 @@ static int vi_common_early_init(void *handle)
AMD_CG_SUPPORT_BIF_LS | AMD_CG_SUPPORT_BIF_LS |
AMD_CG_SUPPORT_HDP_MGCG | AMD_CG_SUPPORT_HDP_MGCG |
AMD_CG_SUPPORT_HDP_LS | AMD_CG_SUPPORT_HDP_LS |
AMD_CG_SUPPORT_ROM_MGCG; AMD_CG_SUPPORT_ROM_MGCG |
AMD_CG_SUPPORT_MC_MGCG |
AMD_CG_SUPPORT_MC_LS;
adev->pg_flags = 0; adev->pg_flags = 0;
adev->external_rev_id = adev->rev_id + 0x3c; adev->external_rev_id = adev->rev_id + 0x3c;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment