<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="moz-cite-prefix">I think Kent is already seen these
patches as he did comment on 1/5 patch.<br>
<br>
The v3 version of the patch, posted last week, removes the
asterisk to report the lowest frequency as the current frequency,
when the current frequency is 0, i.e. when the block is in low
power state. Does the tool rely on the asterisk? If this
information is necessary could it not use amdgpu_pm_info?<br>
<br>
Regards,<br>
Luben<br>
<br>
On 2021-10-18 16:19, Deucher, Alexander wrote:<br>
</div>
<blockquote type="cite" cite="mid:BL1PR12MB51443E4EA64480401839E135F7BC9@BL1PR12MB5144.namprd12.prod.outlook.com">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<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>
<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>
Quan, Evan <a class="moz-txt-link-rfc2396E" href="mailto:Evan.Quan@amd.com"><Evan.Quan@amd.com></a><br>
<b>Sent:</b> Thursday, October 14, 2021 10:25 PM<br>
<b>To:</b> Lazar, Lijo <a class="moz-txt-link-rfc2396E" href="mailto:Lijo.Lazar@amd.com"><Lijo.Lazar@amd.com></a>; Tuikov,
Luben <a class="moz-txt-link-rfc2396E" href="mailto:Luben.Tuikov@amd.com"><Luben.Tuikov@amd.com></a>;
<a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a>
<a class="moz-txt-link-rfc2396E" href="mailto:amd-gfx@lists.freedesktop.org"><amd-gfx@lists.freedesktop.org></a>; Russell, Kent
<a class="moz-txt-link-rfc2396E" href="mailto:Kent.Russell@amd.com"><Kent.Russell@amd.com></a><br>
<b>Cc:</b> Deucher, Alexander
<a class="moz-txt-link-rfc2396E" 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</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}div.x_WordSection1
{}</style>
<div link="#0563C1" vlink="#954F72" style="word-wrap:break-word" lang="EN-US">
<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
<a class="moz-txt-link-rfc2396E" href="mailto:amd-gfx-bounces@lists.freedesktop.org"><amd-gfx-bounces@lists.freedesktop.org></a>
<b>On Behalf Of </b>Lazar, Lijo<br>
<b>Sent:</b> Thursday, October 14, 2021 1:07 AM<br>
<b>To:</b> Tuikov, Luben
<a class="moz-txt-link-rfc2396E" href="mailto:Luben.Tuikov@amd.com"><Luben.Tuikov@amd.com></a>;
<a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
<b>Cc:</b> Deucher, Alexander
<a class="moz-txt-link-rfc2396E" 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</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" style="text-align:center" align="center">
<hr width="98%" size="2" 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" moz-do-not-send="true" class="moz-txt-link-freetext">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" moz-do-not-send="true" class="moz-txt-link-freetext">Lijo.Lazar@amd.com</a>>;
<a href="mailto:amd-gfx@lists.freedesktop.org" moz-do-not-send="true" class="moz-txt-link-freetext">amd-gfx@lists.freedesktop.org</a>
<<a href="mailto:amd-gfx@lists.freedesktop.org" moz-do-not-send="true" class="moz-txt-link-freetext">amd-gfx@lists.freedesktop.org</a>><br>
<b>Cc:</b> Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com" moz-do-not-send="true" class="moz-txt-link-freetext">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>
</blockquote>
<br>
</body>
</html>