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

Huang Rui ray.huang at amd.com
Wed Jul 11 08:39:04 UTC 2018


On Tue, Jul 10, 2018 at 04:53:39PM -0500, Alex Deucher wrote:
> Use the PP_STATE_SUPPORT_* rather than AMD_CG_SUPPORT_*
> when communicating with the SMU.
> 
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

Reviewed-by: Huang Rui <ray.huang at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/vi.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
> index 4ac1288ab7df..42c8ad105b05 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vi.c
> @@ -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) {
> -			pp_support_state = AMD_CG_SUPPORT_MC_LS;
> +			pp_support_state = PP_STATE_SUPPORT_LS;
>  			pp_state = PP_STATE_LS;
>  		}
>  		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;
>  		}
>  		if (state == AMD_CG_STATE_UNGATE)
> @@ -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) {
> -			pp_support_state = AMD_CG_SUPPORT_SDMA_LS;
> +			pp_support_state = PP_STATE_SUPPORT_LS;
>  			pp_state = PP_STATE_LS;
>  		}
>  		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;
>  		}
>  		if (state == AMD_CG_STATE_UNGATE)
> @@ -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) {
> -			pp_support_state = AMD_CG_SUPPORT_HDP_LS;
> +			pp_support_state = PP_STATE_SUPPORT_LS;
>  			pp_state = PP_STATE_LS;
>  		}
>  		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;
>  		}
>  		if (state == AMD_CG_STATE_UNGATE)
> -- 
> 2.13.6
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list