<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#008000;margin:15pt;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
We the current behavior (0 for clock) already crashes the tool, so I don't think we can really make things worse.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Alex</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<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> Quan, Evan <Evan.Quan@amd.com><br>
<b>Sent:</b> Thursday, October 14, 2021 10:25 PM<br>
<b>To:</b> Lazar, Lijo <Lijo.Lazar@amd.com>; Tuikov, Luben <Luben.Tuikov@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Russell, Kent <Kent.Russell@amd.com><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com><br>
<b>Subject:</b> RE: [PATCH 0/5] 0 MHz is not a valid current frequency</font>
<div> </div>
</div>
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:DengXian}
@font-face
        {font-family:Calibri}
@font-face
        {}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
a:link, span.x_MsoHyperlink
        {color:#0563C1;
        text-decoration:underline}
span.x_EmailStyle18
        {font-family:"Calibri",sans-serif;
        color:windowtext}
p.x_msipheadera4477989, li.x_msipheadera4477989, div.x_msipheadera4477989
        {margin-right:0in;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
.x_MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
div.x_WordSection1
        {}
-->
</style>
<div lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="x_WordSection1">
<p class="x_msipheadera4477989" style="margin:0in"><span style="font-size:10.0pt; font-family:"Arial",sans-serif; color:blue">[AMD Official Use Only]</span></p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">+Kent who maintains the Rocm tool</p>
<p class="x_MsoNormal"> </p>
<div style="border:none; border-left:solid blue 1.5pt; padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org>
<b>On Behalf Of </b>Lazar, Lijo<br>
<b>Sent:</b> Thursday, October 14, 2021 1:07 AM<br>
<b>To:</b> Tuikov, Luben <Luben.Tuikov@amd.com>; amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com><br>
<b>Subject:</b> Re: [PATCH 0/5] 0 MHz is not a valid current frequency</p>
</div>
</div>
<p class="x_MsoNormal"> </p>
<p style="margin:5.0pt"><span style="font-size:10.0pt; font-family:"Arial",sans-serif; color:blue">[AMD Official Use Only]</span></p>
<p class="x_MsoNormal"> </p>
<div>
<p style="margin:5.0pt"><span style="font-size:10.0pt; font-family:"Arial",sans-serif; color:blue">[AMD Official Use Only]</span></p>
<p class="x_MsoNormal"> </p>
<div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="color:#212121">></span><span style="color:#212121">Or maybe just a list without default hint, i.e. no asterisk?</span><span style="color:#212121"></span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="color:#212121"> </span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="color:#212121">I think this is also fine meaning we are having trouble in determining the current frequency or DPM level. Evan/Alex? Don't know if this will crash the tools.</span><span style="color:#212121"></span></p>
</div>
<div id="x_ms-outlook-mobile-signature">
<div>
<p class="x_MsoNormal"> </p>
</div>
<p class="x_MsoNormal">Thanks,<br>
Lijo</p>
</div>
<div class="x_MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="x_divRplyFwdMsg">
<p class="x_MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Tuikov, Luben <<a href="mailto:Luben.Tuikov@amd.com">Luben.Tuikov@amd.com</a>><br>
<b>Sent:</b> Wednesday, October 13, 2021 9:52:09 PM<br>
<b>To:</b> Lazar, Lijo <<a href="mailto:Lijo.Lazar@amd.com">Lijo.Lazar@amd.com</a>>;
<a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a> <<a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a>><br>
<b>Cc:</b> Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com">Alexander.Deucher@amd.com</a>><br>
<b>Subject:</b> Re: [PATCH 0/5] 0 MHz is not a valid current frequency</span> </p>
<div>
<p class="x_MsoNormal"> </p>
</div>
</div>
<div>
<div>
<p class="x_MsoNormal" style="margin-bottom:12.0pt">On 2021-10-13 00:14, Lazar, Lijo wrote:<br>
><br>
> On 10/13/2021 8:40 AM, Luben Tuikov wrote:<br>
>> Some ASIC support low-power functionality for the whole ASIC or just<br>
>> an IP block. When in such low-power mode, some sysfs interfaces would<br>
>> report a frequency of 0, e.g.,<br>
>><br>
>> $cat /sys/class/drm/card0/device/pp_dpm_sclk<br>
>> 0: 500Mhz<br>
>> 1: 0Mhz *<br>
>> 2: 2200Mhz<br>
>> $_<br>
>><br>
>> An operating frequency of 0 MHz doesn't make sense, and this interface<br>
>> is designed to report only operating clock frequencies, i.e. non-zero,<br>
>> and possibly the current one.<br>
>><br>
>> When in this low-power state, round to the smallest<br>
>> operating frequency, for this interface, as follows,<br>
>><br>
> Would rather avoid this -<br>
><br>
> 1) It is manipulating FW reported value. If at all there is an uncaught <br>
> issue in FW reporting of frequency values, that is masked here.<br>
> 2) Otherwise, if 0MHz is described as GFX power gated case, this <br>
> provides a convenient interface to check if GFX is power gated.<br>
><br>
> If seeing a '0' is not pleasing, consider changing to something like<br>
>        "NA" - not available (frequency cannot be fetched at the moment).<br>
<br>
There's a ROCm tool which literally asserts if the values are not ordered in increasing order. Now since 0 < 550, but 0 is listed as the second entry, the tool simply asserts and crashes.<br>
<br>
It is not clear what you'd rather see here:<br>
<br>
$cat /sys/class/drm/card0/device/pp_dpm_sclk<br>
0: 550Mhz<br>
1: N/A *<br>
2: 2200MHz<br>
$_<br>
<br>
Is this what you want to see? (That'll crash other tools which expect %uMhz.)<br>
<br>
Or maybe just a list without default hint, i.e. no asterisk?<br>
<br>
$cat /sys/class/drm/card0/device/pp_dpm_sclk<br>
0: 550Mhz<br>
1: 2200MHz<br>
$_<br>
<br>
What should the output be?<br>
<br>
We want to avoid showing 0, but still show numbers.<br>
<br>
Regards,<br>
Luben<br>
<br>
><br>
> Thanks,<br>
> Lijo<br>
><br>
>> $cat /sys/class/drm/card0/device/pp_dpm_sclk<br>
>> 0: 500Mhz *<br>
>> 1: 2200Mhz<br>
>> $_<br>
>><br>
>> Luben Tuikov (5):<br>
>>    drm/amd/pm: Slight function rename<br>
>>    drm/amd/pm: Rename cur_value to curr_value<br>
>>    drm/amd/pm: Rename freq_values --> freq_value<br>
>>    dpm/amd/pm: Sienna: 0 MHz is not a current clock frequency<br>
>>    dpm/amd/pm: Navi10: 0 MHz is not a current clock frequency<br>
>><br>
>>   .../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c   | 60 +++++++++------<br>
>>   .../amd/pm/swsmu/smu11/sienna_cichlid_ppt.c   | 73 ++++++++++++-------<br>
>>   2 files changed, 86 insertions(+), 47 deletions(-)<br>
>></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>