aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-05-04 10:13:35 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-07-07 14:50:46 -0400
commit7ba0eb6df96ab8e57d791ccd1215339c31538e5d (patch)
tree368021a3b3549ef00c71e4bb9bd805d32cace9e9 /drivers/gpu/drm/amd/amdgpu
parent2c54716563222b79ca8fd09787b2a32fafa693b5 (diff)
drm/amdgpu/gfx8: clean up polaris11 PG enable
Fix the logic for enabling/disabling. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 1ee616cae939..7cfeac1c134d 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -5390,12 +5390,20 @@ static int gfx_v8_0_set_powergating_state(void *handle,
gfx_v8_0_enable_gfx_dynamic_mg_power_gating(adev, false);
break;
case CHIP_POLARIS11:
- if (adev->pg_flags & AMD_PG_SUPPORT_GFX_SMG)
- gfx_v8_0_enable_gfx_static_mg_power_gating(adev, enable);
- else if (adev->pg_flags & AMD_PG_SUPPORT_GFX_DMG)
- gfx_v8_0_enable_gfx_dynamic_mg_power_gating(adev, enable);
+ if ((adev->pg_flags & AMD_PG_SUPPORT_GFX_SMG) && enable)
+ gfx_v8_0_enable_gfx_static_mg_power_gating(adev, true);
+ else
+ gfx_v8_0_enable_gfx_static_mg_power_gating(adev, false);
+
+ if ((adev->pg_flags & AMD_PG_SUPPORT_GFX_DMG) && enable)
+ gfx_v8_0_enable_gfx_dynamic_mg_power_gating(adev, true);
+ else
+ gfx_v8_0_enable_gfx_dynamic_mg_power_gating(adev, false);
+
+ if ((adev->pg_flags & AMD_PG_SUPPORT_GFX_QUICK_MG) && enable)
+ polaris11_enable_gfx_quick_mg_power_gating(adev, true);
else
- polaris11_enable_gfx_quick_mg_power_gating(adev, enable);
+ polaris11_enable_gfx_quick_mg_power_gating(adev, false);
break;
default:
break;