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

drm/amdgpu/vi: fix mixed up state in smu clockgating setup

Use the PP_STATE_SUPPORT_* rather than AMD_CG_SUPPORT_*
when communicating with the SMU.
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent ec952131
...@@ -1363,11 +1363,11 @@ static int vi_common_set_clockgating_state_by_smu(void *handle, ...@@ -1363,11 +1363,11 @@ static int vi_common_set_clockgating_state_by_smu(void *handle,
if (adev->cg_flags & (AMD_CG_SUPPORT_MC_LS | AMD_CG_SUPPORT_MC_MGCG)) { if (adev->cg_flags & (AMD_CG_SUPPORT_MC_LS | AMD_CG_SUPPORT_MC_MGCG)) {
if (adev->cg_flags & AMD_CG_SUPPORT_MC_LS) { if (adev->cg_flags & AMD_CG_SUPPORT_MC_LS) {
pp_support_state = AMD_CG_SUPPORT_MC_LS; pp_support_state = PP_STATE_SUPPORT_LS;
pp_state = PP_STATE_LS; pp_state = PP_STATE_LS;
} }
if (adev->cg_flags & AMD_CG_SUPPORT_MC_MGCG) { if (adev->cg_flags & AMD_CG_SUPPORT_MC_MGCG) {
pp_support_state |= AMD_CG_SUPPORT_MC_MGCG; pp_support_state |= PP_STATE_SUPPORT_CG;
pp_state |= PP_STATE_CG; pp_state |= PP_STATE_CG;
} }
if (state == AMD_CG_STATE_UNGATE) if (state == AMD_CG_STATE_UNGATE)
...@@ -1382,11 +1382,11 @@ static int vi_common_set_clockgating_state_by_smu(void *handle, ...@@ -1382,11 +1382,11 @@ static int vi_common_set_clockgating_state_by_smu(void *handle,
if (adev->cg_flags & (AMD_CG_SUPPORT_SDMA_LS | AMD_CG_SUPPORT_SDMA_MGCG)) { if (adev->cg_flags & (AMD_CG_SUPPORT_SDMA_LS | AMD_CG_SUPPORT_SDMA_MGCG)) {
if (adev->cg_flags & AMD_CG_SUPPORT_SDMA_LS) { if (adev->cg_flags & AMD_CG_SUPPORT_SDMA_LS) {
pp_support_state = AMD_CG_SUPPORT_SDMA_LS; pp_support_state = PP_STATE_SUPPORT_LS;
pp_state = PP_STATE_LS; pp_state = PP_STATE_LS;
} }
if (adev->cg_flags & AMD_CG_SUPPORT_SDMA_MGCG) { if (adev->cg_flags & AMD_CG_SUPPORT_SDMA_MGCG) {
pp_support_state |= AMD_CG_SUPPORT_SDMA_MGCG; pp_support_state |= PP_STATE_SUPPORT_CG;
pp_state |= PP_STATE_CG; pp_state |= PP_STATE_CG;
} }
if (state == AMD_CG_STATE_UNGATE) if (state == AMD_CG_STATE_UNGATE)
...@@ -1401,11 +1401,11 @@ static int vi_common_set_clockgating_state_by_smu(void *handle, ...@@ -1401,11 +1401,11 @@ static int vi_common_set_clockgating_state_by_smu(void *handle,
if (adev->cg_flags & (AMD_CG_SUPPORT_HDP_LS | AMD_CG_SUPPORT_HDP_MGCG)) { if (adev->cg_flags & (AMD_CG_SUPPORT_HDP_LS | AMD_CG_SUPPORT_HDP_MGCG)) {
if (adev->cg_flags & AMD_CG_SUPPORT_HDP_LS) { if (adev->cg_flags & AMD_CG_SUPPORT_HDP_LS) {
pp_support_state = AMD_CG_SUPPORT_HDP_LS; pp_support_state = PP_STATE_SUPPORT_LS;
pp_state = PP_STATE_LS; pp_state = PP_STATE_LS;
} }
if (adev->cg_flags & AMD_CG_SUPPORT_HDP_MGCG) { if (adev->cg_flags & AMD_CG_SUPPORT_HDP_MGCG) {
pp_support_state |= AMD_CG_SUPPORT_HDP_MGCG; pp_support_state |= PP_STATE_SUPPORT_CG;
pp_state |= PP_STATE_CG; pp_state |= PP_STATE_CG;
} }
if (state == AMD_CG_STATE_UNGATE) if (state == AMD_CG_STATE_UNGATE)
......
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