[PATCH] drm/powerplay : send SMC message to set XGMI pstate

Quan, Evan Evan.Quan at amd.com
Tue Apr 16 01:11:55 UTC 2019


Reviewed-by: Evan Quan <evan.quan at amd.com>

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Liu,
> Shaoyun
> Sent: Monday, April 15, 2019 11:25 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Liu, Shaoyun <Shaoyun.Liu at amd.com>
> Subject: [PATCH] drm/powerplay : send SMC message to set XGMI pstate
> 
> Send message with parameter to SMC to set xgmi pstate
> 
> Change-Id: I5d90cffd63690f31f0df62c206b263d300f14234
> Signed-off-by: shaoyunl <shaoyun.liu at amd.com>
> ---
>  drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> index c478b38..92903a4 100644
> --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> @@ -1896,8 +1896,13 @@ static int smu_v11_0_set_fan_speed_rpm(struct
> smu_context *smu,  static int smu_v11_0_set_xgmi_pstate(struct
> smu_context *smu,
>  				     uint32_t pstate)
>  {
> -	/* send msg to SMU to set pstate */
> -	return 0;
> +	int ret = 0;
> +	mutex_lock(&(smu->mutex));
> +	ret = smu_send_smc_msg_with_param(smu,
> +					  SMU_MSG_SetXgmiMode,
> +					  pstate ? XGMI_STATE_D0 :
> XGMI_STATE_D3);
> +	mutex_unlock(&(smu->mutex));
> +	return ret;
>  }
> 
>  static const struct smu_funcs smu_v11_0_funcs = {
> --
> 2.7.4
> 
> _______________________________________________
> 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