Commit e08d53cb authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu/sdma: 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 14698b6c
...@@ -1464,7 +1464,7 @@ static void fiji_update_sdma_medium_grain_clock_gating( ...@@ -1464,7 +1464,7 @@ static void fiji_update_sdma_medium_grain_clock_gating(
{ {
uint32_t temp, data; uint32_t temp, data;
if (enable) { if (enable && (adev->cg_flags & AMD_CG_SUPPORT_SDMA_MGCG)) {
temp = data = RREG32(mmSDMA0_CLK_CTRL); temp = data = RREG32(mmSDMA0_CLK_CTRL);
data &= ~(SDMA0_CLK_CTRL__SOFT_OVERRIDE7_MASK | data &= ~(SDMA0_CLK_CTRL__SOFT_OVERRIDE7_MASK |
SDMA0_CLK_CTRL__SOFT_OVERRIDE6_MASK | SDMA0_CLK_CTRL__SOFT_OVERRIDE6_MASK |
...@@ -1524,7 +1524,7 @@ static void fiji_update_sdma_medium_grain_light_sleep( ...@@ -1524,7 +1524,7 @@ static void fiji_update_sdma_medium_grain_light_sleep(
{ {
uint32_t temp, data; uint32_t temp, data;
if (enable) { if (enable && (adev->cg_flags & AMD_CG_SUPPORT_SDMA_LS)) {
temp = data = RREG32(mmSDMA0_POWER_CNTL); temp = data = RREG32(mmSDMA0_POWER_CNTL);
data |= SDMA0_POWER_CNTL__MEM_POWER_OVERRIDE_MASK; data |= SDMA0_POWER_CNTL__MEM_POWER_OVERRIDE_MASK;
......
...@@ -1083,7 +1083,9 @@ static int vi_common_early_init(void *handle) ...@@ -1083,7 +1083,9 @@ static int vi_common_early_init(void *handle)
AMD_CG_SUPPORT_GFX_CGTS | AMD_CG_SUPPORT_GFX_CGTS |
AMD_CG_SUPPORT_GFX_CGTS_LS | AMD_CG_SUPPORT_GFX_CGTS_LS |
AMD_CG_SUPPORT_GFX_CGCG | AMD_CG_SUPPORT_GFX_CGCG |
AMD_CG_SUPPORT_GFX_CGLS; AMD_CG_SUPPORT_GFX_CGLS |
AMD_CG_SUPPORT_SDMA_MGCG |
AMD_CG_SUPPORT_SDMA_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