提交 7ba0eb6d 编写于 作者: A Alex Deucher

drm/amdgpu/gfx8: clean up polaris11 PG enable

Fix the logic for enabling/disabling.
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 2c547165
...@@ -5390,12 +5390,20 @@ static int gfx_v8_0_set_powergating_state(void *handle, ...@@ -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); gfx_v8_0_enable_gfx_dynamic_mg_power_gating(adev, false);
break; break;
case CHIP_POLARIS11: case CHIP_POLARIS11:
if (adev->pg_flags & AMD_PG_SUPPORT_GFX_SMG) if ((adev->pg_flags & AMD_PG_SUPPORT_GFX_SMG) && enable)
gfx_v8_0_enable_gfx_static_mg_power_gating(adev, enable); gfx_v8_0_enable_gfx_static_mg_power_gating(adev, true);
else if (adev->pg_flags & AMD_PG_SUPPORT_GFX_DMG) else
gfx_v8_0_enable_gfx_dynamic_mg_power_gating(adev, enable); 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 else
polaris11_enable_gfx_quick_mg_power_gating(adev, enable); polaris11_enable_gfx_quick_mg_power_gating(adev, false);
break; break;
default: default:
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部