<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">The changes to the pp_dpm_files are purely informational with this patch (you can't actually interact with the stable pstate) so I think they should be dropped and exposed some other way.  Setting the profile modes via
 force_performance_level forces the clocks and disables clock and power gating.  That is the interface you should use to interact with it.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Alex<br>
</p>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Russell, Kent <Kent.Russell@amd.com><br>
<b>Sent:</b> Monday, January 8, 2018 3:22 PM<br>
<b>To:</b> Alex Deucher; Kuehling, Felix<br>
<b>Cc:</b> amd-gfx list<br>
<b>Subject:</b> RE: [PATCH 2/2] drm/amd/pp: Add stable Pstate clk display when print_clock_levels</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Sorry, I just re-read and saw that this will be in sclk and mclk, not just mclk. So will this have a direct impact on any other functionality, or will it just disable clock/power gating and prevent the clocks from changing?<br>
<br>
 Kent<br>
<br>
-----Original Message-----<br>
From: Russell, Kent <br>
Sent: Monday, January 08, 2018 2:52 PM<br>
To: 'Alex Deucher'; Kuehling, Felix<br>
Cc: amd-gfx list<br>
Subject: RE: [PATCH 2/2] drm/amd/pp: Add stable Pstate clk display when print_clock_levels<br>
<br>
And yes, it will confuse the SMI in a couple functions, but thankfully it's nice enough that I can fix it with a couple lines.
<br>
<br>
So just to make sure that I understand this correctly, if a user were to echo P to the pp_dpm_mclk file, it would disable clockgating and powergating and keep the memory clocks at a stable level (likely level 0)? And this would have no impact on the SCLK or
 Power Profile or anything else, just the mclk? Just asking so I know how to implement it in the SMI. Thanks!<br>
<br>
 Kent<br>
<br>
-----Original Message-----<br>
From: Alex Deucher [<a href="mailto:alexdeucher@gmail.com">mailto:alexdeucher@gmail.com</a>]<br>
Sent: Monday, January 08, 2018 2:35 PM<br>
To: Kuehling, Felix<br>
Cc: amd-gfx list; Russell, Kent<br>
Subject: Re: [PATCH 2/2] drm/amd/pp: Add stable Pstate clk display when print_clock_levels<br>
<br>
On Mon, Jan 8, 2018 at 2:20 PM, Felix Kuehling <felix.kuehling@amd.com> wrote:<br>
> [+Kent]       <br>
><br>
> What does stable pstate mean? What is it used for?<br>
<br>
This is used for the profiling stuff in force_performance_level.  It disables clock and power gating and sets stable clock levels for doing performance profiling.<br>
<br>
Alex<br>
<br>
><br>
> Hi Kent,<br>
><br>
> Is this going to confuse rocm_smi?<br>
><br>
> Regards,<br>
>   Felix<br>
><br>
><br>
> On 2018-01-08 04:57 AM, Rex Zhu wrote:<br>
>> The additional output are at the end of sclk/mclk info as cat <br>
>> pp_dpm_mclk<br>
>> 0: 300Mhz *<br>
>> 1: 1650Mhz<br>
>> P: 300Mhz<br>
>><br>
>> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com><br>
>><br>
>> Change-Id: Idf8eeedb5d399d9ffb7de7a2fb2976c7fa7c01a8<br>
>> ---<br>
>>  drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c     | 2 ++<br>
>>  drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c     | 2 ++<br>
>>  drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c   | 2 ++<br>
>>  drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 ++<br>
>>  4 files changed, 8 insertions(+)<br>
>><br>
>> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c<br>
>> b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c<br>
>> index f68dd08..03dfba0 100644<br>
>> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c<br>
>> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c<br>
>> @@ -1601,6 +1601,7 @@ static int cz_print_clock_levels(struct pp_hwmgr *hwmgr,<br>
>>                       size += sprintf(buf + size, "%d: %uMhz %s\n",<br>
>>                                       i, sclk_table->entries[i].clk / 100,<br>
>>                                       (i == now) ? "*" : "");<br>
>> +             size += sprintf(buf + size, "P: %uMhz\n",<br>
>> + hwmgr->pstate_sclk/100);<br>
>>               break;<br>
>>       case PP_MCLK:<br>
>>               now =<br>
>> PHM_GET_FIELD(cgs_read_ind_register(hwmgr->device,<br>
>> @@ -1613,6 +1614,7 @@ static int cz_print_clock_levels(struct pp_hwmgr *hwmgr,<br>
>>                       size += sprintf(buf + size, "%d: %uMhz %s\n",<br>
>>                                       CZ_NUM_NBPMEMORYCLOCK-i, data->sys_info.nbp_memory_clock[i-1] / 100,<br>
>>                                       (CZ_NUM_NBPMEMORYCLOCK-i ==<br>
>> now) ? "*" : "");<br>
>> +             size += sprintf(buf + size, "P: %uMhz\n",<br>
>> + hwmgr->pstate_mclk/100);<br>
>>               break;<br>
>>       default:<br>
>>               break;<br>
>> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c<br>
>> b/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c<br>
>> index 409a56b..88c6ad8 100644<br>
>> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c<br>
>> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c<br>
>> @@ -756,6 +756,7 @@ static int rv_print_clock_levels(struct pp_hwmgr *hwmgr,<br>
>>                               data->gfx_max_freq_limit / 100,<br>
>>                               ((data->gfx_max_freq_limit / 100)<br>
>>                                == now) ? "*" : "");<br>
>> +             size += sprintf(buf + size, "P: %uMhz\n",<br>
>> + hwmgr->pstate_sclk/100);<br>
>>               break;<br>
>>       case PP_MCLK:<br>
>>               PP_ASSERT_WITH_CODE(!smum_send_msg_to_smc(hwmgr,<br>
>> @@ -773,6 +774,7 @@ static int rv_print_clock_levels(struct pp_hwmgr *hwmgr,<br>
>>                                       mclk_table->entries[i].clk / 100,<br>
>>                                       ((mclk_table->entries[i].clk / 100)<br>
>>                                        == now) ? "*" : "");<br>
>> +             size += sprintf(buf + size, "P: %uMhz\n",<br>
>> + hwmgr->pstate_mclk/100);<br>
>>               break;<br>
>>       default:<br>
>>               break;<br>
>> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c<br>
>> b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c<br>
>> index 72031bd..1bdcd86 100644<br>
>> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c<br>
>> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c<br>
>> @@ -4372,6 +4372,7 @@ static int smu7_print_clock_levels(struct pp_hwmgr *hwmgr,<br>
>>                       size += sprintf(buf + size, "%d: %uMhz %s\n",<br>
>>                                       i, sclk_table->dpm_levels[i].value / 100,<br>
>>                                       (i == now) ? "*" : "");<br>
>> +             size += sprintf(buf + size, "P: %uMhz\n",<br>
>> + hwmgr->pstate_sclk/100);<br>
>>               break;<br>
>>       case PP_MCLK:<br>
>>               smum_send_msg_to_smc(hwmgr, <br>
>> PPSMC_MSG_API_GetMclkFrequency); @@ -4388,6 +4389,7 @@ static int smu7_print_clock_levels(struct pp_hwmgr *hwmgr,<br>
>>                       size += sprintf(buf + size, "%d: %uMhz %s\n",<br>
>>                                       i, mclk_table->dpm_levels[i].value / 100,<br>
>>                                       (i == now) ? "*" : "");<br>
>> +             size += sprintf(buf + size, "P: %uMhz\n",<br>
>> + hwmgr->pstate_mclk/100);<br>
>>               break;<br>
>>       case PP_PCIE:<br>
>>               pcie_speed = smu7_get_current_pcie_speed(hwmgr);<br>
>> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c<br>
>> b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c<br>
>> index cb35f4f..cab50fc 100644<br>
>> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c<br>
>> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c<br>
>> @@ -4565,6 +4565,7 @@ static int vega10_print_clock_levels(struct pp_hwmgr *hwmgr,<br>
>>                       size += sprintf(buf + size, "%d: %uMhz %s\n",<br>
>>                                       i, sclk_table->dpm_levels[i].value / 100,<br>
>>                                       (i == now) ? "*" : "");<br>
>> +             size += sprintf(buf + size, "P: %uMhz\n",<br>
>> + hwmgr->pstate_sclk/100);<br>
>>               break;<br>
>>       case PP_MCLK:<br>
>>               if (data->registry_data.mclk_dpm_key_disabled)<br>
>> @@ -4583,6 +4584,7 @@ static int vega10_print_clock_levels(struct pp_hwmgr *hwmgr,<br>
>>                       size += sprintf(buf + size, "%d: %uMhz %s\n",<br>
>>                                       i, mclk_table->dpm_levels[i].value / 100,<br>
>>                                       (i == now) ? "*" : "");<br>
>> +             size += sprintf(buf + size, "P: %uMhz\n",<br>
>> + hwmgr->pstate_mclk/100);<br>
>>               break;<br>
>>       case PP_PCIE:<br>
>>               PP_ASSERT_WITH_CODE(!smum_send_msg_to_smc(hwmgr,<br>
><br>
> _______________________________________________<br>
> amd-gfx mailing list<br>
> amd-gfx@lists.freedesktop.org<br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<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>
</div>
</div>
</body>
</html>