<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
Yes. <br>
<br>
Best Regards<br>
Rex
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Huang, JinHuiEric<br>
<b>Sent:</b> Thursday, January 25, 2018 4:47:23 AM<br>
<b>To:</b> Zhu, Rex; amd-gfx@lists.freedesktop.org<br>
<b>Subject:</b> Re: [PATCH 4/4] drm/amd/pp: Implement set_power_profile_mode on smu7</font>
<div> </div>
</div>
<div style="background-color:#FFFFFF">
<p>Hi Rex,</p>
<p>So you intend to separate previous one integrated profile parameters into two sets implemented by two/three sysfs entries.<br>
</p>
Regards,<br>
Eric<br>
<br>
<div class="x_moz-cite-prefix">On 2018-01-24 03:13 PM, Zhu, Rex wrote:<br>
</div>
<blockquote type="cite">Hi Eric,<br>
<br>
We have sysfs pp-dpm-sclk/mclk to set min dpm level<br>
<br>
Best Regards<br>
Rex
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> amd-gfx
<a class="x_moz-txt-link-rfc2396E" href="mailto:amd-gfx-bounces@lists.freedesktop.org">
<amd-gfx-bounces@lists.freedesktop.org></a> on behalf of Eric Huang <a class="x_moz-txt-link-rfc2396E" href="mailto:jinhuieric.huang@amd.com">
<jinhuieric.huang@amd.com></a><br>
<b>Sent:</b> Thursday, January 25, 2018 12:04:55 AM<br>
<b>To:</b> <a class="x_moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">
amd-gfx@lists.freedesktop.org</a><br>
<b>Subject:</b> Re: [PATCH 4/4] drm/amd/pp: Implement set_power_profile_mode on smu7</font>
<div> </div>
</div>
<div class="x_BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="x_PlainText">We have min_sclk and min_mclk in previous power profile parameters for
<br>
VI, which are similar with min_active_level for Vega10. How to implement <br>
these parameters?<br>
<br>
Regards,<br>
Eric<br>
<br>
On 2018-01-24 04:37 AM, Rex Zhu wrote:<br>
> User can set smu7 profile pamameters through sysfs<br>
><br>
> echo "0/1/2/3/4">pp_power_profile_mode<br>
> to select 3D_FULL_SCREEN/POWER_SAVING/VIDEO/VR/COMPUTE<br>
> mode.<br>
> echo "5 * * * * * * * *">pp_power_profile_mode<br>
> to config custom mode.<br>
> "5 * * * * * * * *" mean "CUSTOM enable_sclk SCLK_UP_HYST<br>
> SCLK_DOWN_HYST SCLK_ACTIVE_LEVEL enable_mclk MCLK_UP_HYST<br>
> MCLK_DOWN_HYST MCLK_ACTIVE_LEVEL"<br>
><br>
> Change-Id: Ic6d6f37363bc81ab17051285f6ace847edf725de<br>
> Signed-off-by: Rex Zhu <a class="x_moz-txt-link-rfc2396E" href="mailto:Rex.Zhu@amd.com">
<Rex.Zhu@amd.com></a><br>
> ---<br>
>   drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 49 +++++++++++++++++++++++-<br>
>   1 file changed, 48 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c<br>
> index 9f6afd5..13db75c 100644<br>
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c<br>
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c<br>
> @@ -5036,7 +5036,54 @@ static int smu7_get_power_profile_mode(struct pp_hwmgr *hwmgr, char *buf)<br>
>   <br>
>   static int smu7_set_power_profile_mode(struct pp_hwmgr *hwmgr, long *input, uint32_t size)<br>
>   {<br>
> -     /* To Do */<br>
> +     struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);<br>
> +     struct profile_mode_setting tmp;<br>
> +<br>
> +     hwmgr->power_profile_mode = input[size];<br>
> +<br>
> +     switch (hwmgr->power_profile_mode) {<br>
> +     case PP_SMC_POWER_PROFILE_CUSTOM:<br>
> +             if (size < 8)<br>
> +                     return -EINVAL;<br>
> +<br>
> +             data->custom_profile_setting.bupdate_sclk = input[0];<br>
> +             data->custom_profile_setting.sclk_up_hyst = input[1];<br>
> +             data->custom_profile_setting.sclk_down_hyst = input[2];<br>
> +             data->custom_profile_setting.sclk_activity =  input[3];<br>
> +             data->custom_profile_setting.bupdate_mclk = input[4];<br>
> +             data->custom_profile_setting.mclk_up_hyst = input[5];<br>
> +             data->custom_profile_setting.mclk_down_hyst = input[6];<br>
> +             data->custom_profile_setting.mclk_activity =  input[7];<br>
> +             if (!smum_update_dpm_settings(hwmgr, &data->custom_profile_setting))<br>
> +                     memcpy(&data->current_profile_setting, &data->custom_profile_setting, sizeof(struct profile_mode_setting));<br>
> +             break;<br>
> +     case PP_SMC_POWER_PROFILE_FULLSCREEN3D:<br>
> +     case PP_SMC_POWER_PROFILE_POWERSAVING:<br>
> +     case PP_SMC_POWER_PROFILE_VIDEO:<br>
> +     case PP_SMC_POWER_PROFILE_VR:<br>
> +     case PP_SMC_POWER_PROFILE_COMPUTE:<br>
> +             memcpy(&tmp, &smu7_profiling[hwmgr->power_profile_mode], sizeof(struct profile_mode_setting));<br>
> +             if (!smum_update_dpm_settings(hwmgr, &tmp)) {<br>
> +                     if (tmp.bupdate_sclk) {<br>
> +                             data->current_profile_setting.bupdate_sclk = tmp.bupdate_sclk;<br>
> +                             data->current_profile_setting.sclk_up_hyst = tmp.sclk_up_hyst;<br>
> +                             data->current_profile_setting.sclk_down_hyst = tmp.sclk_down_hyst;<br>
> +                             data->current_profile_setting.sclk_activity = tmp.sclk_activity;<br>
> +                     }<br>
> +                     if (tmp.bupdate_mclk) {<br>
> +                             data->current_profile_setting.bupdate_mclk = tmp.bupdate_mclk;<br>
> +                             data->current_profile_setting.mclk_up_hyst = tmp.mclk_up_hyst;<br>
> +                             data->current_profile_setting.mclk_down_hyst = tmp.mclk_down_hyst;<br>
> +                             data->current_profile_setting.mclk_activity = tmp.mclk_activity;<br>
> +                     }<br>
> +             }<br>
> +             break;<br>
> +     case PP_SMC_POWER_PROFILE_AUTO: /* TO DO auto wattman feature not implement */<br>
> +             return 0;<br>
> +     default:<br>
> +             return -EINVAL;<br>
> +     }<br>
> +<br>
>        return 0;<br>
>   }<br>
>   <br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
<a class="x_moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</blockquote>
<br>
</div>
</body>
</html>