<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<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:11pt;color:#0078D7;margin:5pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
We should try and the behavior as consistent as possible. <br>
</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);">
Thanks!<br>
</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> Wang, Kevin(Yang) <Kevin1.Wang@amd.com><br>
<b>Sent:</b> Tuesday, February 9, 2021 12:27 AM<br>
<b>To:</b> Huang, Ray <Ray.Huang@amd.com>; Du, Xiaojian <Xiaojian.Du@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com><br>
<b>Cc:</b> Quan, Evan <Evan.Quan@amd.com>; Lazar, Lijo <Lijo.Lazar@amd.com><br>
<b>Subject:</b> Re: [PATCH] drm/amd/pm: make the error log more clear for fine grain tuning function</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<p align="Left" style="font-family:Arial; font-size:11pt; color:#0078D7; margin:5pt">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
</div>
<div>If it is not in manual mode, we should give the user a hint.</div>
<div>if possible, we should move this check into amdgpu_pm.c , it is also can be used swsmu backend.</div>
<div><br>
</div>
<div>the patch is </div>
<div>Acked-by: Kevin Wang <kevin1.wang@amd.com></div>
<div><br>
</div>
<div>Best Regards,<br>
Kevin</div>
<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> Huang, Ray <Ray.Huang@amd.com><br>
<b>Sent:</b> Tuesday, February 9, 2021 12:10 PM<br>
<b>To:</b> Wang, Kevin(Yang) <Kevin1.Wang@amd.com>; Du, Xiaojian <Xiaojian.Du@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com><br>
<b>Cc:</b> Quan, Evan <Evan.Quan@amd.com>; Lazar, Lijo <Lijo.Lazar@amd.com><br>
<b>Subject:</b> RE: [PATCH] drm/amd/pm: make the error log more clear for fine grain tuning function</font>
<div> </div>
</div>
<div lang="EN-US" style="word-wrap:break-word">
<p align="Left" style="font-family:Arial; font-size:11pt; color:#0078D7; margin:5pt">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div class="x_x_WordSection1">
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
+ Alex</p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
</p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
Hi all,</p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
</p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
Recently, many users reported the issue to us that fine grain not enabled. Actually, most of them are just caused by not switching to “manual” mode.</p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
</p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
if (!(smu_dpm_ctx->dpm_level == AMD_DPM_FORCED_LEVEL_MANUAL)) {<br>
- dev_warn(smu->adev->dev, "Fine grain is not enabled!\n");<br>
+ dev_warn(smu->adev->dev,<br>
+ "pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n");</p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
</p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
We have to need reminder in the warning message to tell the user where they are. </p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
</p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
Any objection for this patch? I found Navi series actually didn’t need this operation to update max/min clock levels. Would you clarify whether dGPU still needs this before we move the prints into amdgpu_pm.c?</p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
</p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
However, in APU fine grain design, patch looks good for me.</p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
Acked-by: Huang Rui <<a href="mailto:ray.huang@amd.com">ray.huang@amd.com</a>></p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
</p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
Thanks,</p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
Ray</p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
</p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
<b>From:</b> Wang, Kevin(Yang) <Kevin1.Wang@amd.com> <br>
<b>Sent:</b> Wednesday, January 20, 2021 12:10 PM<br>
<b>To:</b> Du, Xiaojian <Xiaojian.Du@amd.com>; amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Huang, Ray <Ray.Huang@amd.com>; Quan, Evan <Evan.Quan@amd.com>; Lazar, Lijo <Lijo.Lazar@amd.com><br>
<b>Subject:</b> Re: [PATCH] drm/amd/pm: make the error log more clear for fine grain tuning function</p>
</div>
</div>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
</p>
<p style="margin:5.0pt"><span style="font-family:"Arial",sans-serif; color:#0078D7">[AMD Official Use Only - Internal Distribution Only]</span></p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
</p>
<div>
<div>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
<span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div class="x_x_MsoNormal" align="center" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif; text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="x_x_divRplyFwdMsg">
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
<b><span style="color:black">From:</span></b><span style="color:black"> Du, Xiaojian <<a href="mailto:Xiaojian.Du@amd.com">Xiaojian.Du@amd.com</a>><br>
<b>Sent:</b> Wednesday, January 20, 2021 11:48 AM<br>
<b>To:</b> <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> Huang, Ray <<a href="mailto:Ray.Huang@amd.com">Ray.Huang@amd.com</a>>; Quan, Evan <<a href="mailto:Evan.Quan@amd.com">Evan.Quan@amd.com</a>>; Wang, Kevin(Yang) <<a href="mailto:Kevin1.Wang@amd.com">Kevin1.Wang@amd.com</a>>; Lazar, Lijo <<a href="mailto:Lijo.Lazar@amd.com">Lijo.Lazar@amd.com</a>>;
Du, Xiaojian <<a href="mailto:Xiaojian.Du@amd.com">Xiaojian.Du@amd.com</a>>; Du, Xiaojian <<a href="mailto:Xiaojian.Du@amd.com">Xiaojian.Du@amd.com</a>><br>
<b>Subject:</b> [PATCH] drm/amd/pm: make the error log more clear for fine grain tuning function</span>
</p>
<div>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
</p>
</div>
</div>
<div>
<div>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
From: Xiaojian Du <<a href="mailto:xiaojian.du@amd.com">xiaojian.du@amd.com</a>><br>
<br>
From: Xiaojian Du <<a href="mailto:Xiaojian.Du@amd.com">Xiaojian.Du@amd.com</a>><br>
<br>
This patch is to make the error log more clear for fine grian tuning<br>
function, it covers Raven/Raven2/Picasso/Renoir/Vangogh.<br>
The fine grain tuning function uses the sysfs file -- pp_od_clk_voltage,<br>
but only when another sysfs file -- power_dpm_force_performance_level is<br>
switched to "manual" mode, it is allowd to access "pp_od_clk_voltage".<br>
<br>
Signed-off-by: Xiaojian Du <<a href="mailto:Xiaojian.Du@amd.com">Xiaojian.Du@amd.com</a>><br>
---<br>
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 2 +-<br>
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 3 ++-<br>
drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 3 ++-<br>
3 files changed, 5 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c<br>
index 88322781e447..ed05a30d1139 100644<br>
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c<br>
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c<br>
@@ -1487,7 +1487,7 @@ static int smu10_set_fine_grain_clk_vol(struct pp_hwmgr *hwmgr,<br>
}<br>
<br>
if (!smu10_data->fine_grain_enabled) {<br>
- pr_err("Fine grain not started\n");<br>
+ pr_err("pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n");</p>
</div>
<div>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
[kevin]:</p>
</div>
<div>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
for above codes, the old one looks better for me, i prefer to keep current design.</p>
</div>
<div>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
</p>
</div>
<div>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
Best Regards,</p>
</div>
<div>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
Kevin<br>
return -EINVAL;<br>
}<br>
<br>
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c<br>
index 6d3c556dbe6b..a847fa66797e 100644<br>
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c<br>
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c<br>
@@ -1452,7 +1452,8 @@ static int vangogh_od_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_TAB<br>
struct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);<br>
<br>
if (!(smu_dpm_ctx->dpm_level == AMD_DPM_FORCED_LEVEL_MANUAL)) {<br>
- dev_warn(smu->adev->dev, "Fine grain is not enabled!\n");<br>
+ dev_warn(smu->adev->dev,<br>
+ "pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n");<br>
return -EINVAL;<br>
}<br>
<br>
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c<br>
index ab15570305f7..4ce8fb1d5ce9 100644<br>
--- a/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c<br>
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c<br>
@@ -350,7 +350,8 @@ static int renoir_od_edit_dpm_table(struct smu_context *smu,<br>
struct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);<br>
<br>
if (!(smu_dpm_ctx->dpm_level == AMD_DPM_FORCED_LEVEL_MANUAL)) {<br>
- dev_warn(smu->adev->dev, "Fine grain is not enabled!\n");<br>
+ dev_warn(smu->adev->dev,<br>
+ "pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n");<br>
return -EINVAL;</p>
</div>
<div>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
<span style="font-family:"Segoe UI",sans-serif; color:#323130">[Kevin]:</span></p>
</div>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
<span style="font-family:"Segoe UI",sans-serif; color:#323130">Just tell the User what's going on, not why.</span></p>
</div>
<div>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif; text-align:justify">
<span style="font-family:"Segoe UI",sans-serif">and we'd better make a function to check manual mode , the<span style="color:#323130">n embed it t</span>o every sysfs node in amdgpu_pm.c</span></p>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif; text-align:justify">
using a unify interface to return result to user.</p>
<div>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
</p>
</div>
<div>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif">
Best Regards,</p>
</div>
<div>
<p class="x_x_MsoNormal" style="margin:0in; font-size:11pt; font-family:Calibri,sans-serif; margin-bottom:12.0pt">
Kevin<br>
}<br>
<br>
-- <br>
2.17.1</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>