<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 style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Kevin Wang <kevin1.wang@amd.com></div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Evan Quan <evan.quan@amd.com><br>
<b>Sent:</b> Thursday, November 14, 2019 5:07 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Quan, Evan <Evan.Quan@amd.com><br>
<b>Subject:</b> [PATCH] drm/amd/powerplay: correct fine grained dpm force level setting</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">For fine grained dpm, there is only two levels supported. However<br>
to reflect correctly the current clock frequency, there is an<br>
intermediate level faked. Thus on forcing level setting, we<br>
need to treat level 2 correctly as level 1.<br>
<br>
Change-Id: I32f936636f27eb8d8d9002bedd701f2bb0d3060a<br>
Signed-off-by: Evan Quan <evan.quan@amd.com><br>
---<br>
drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 6 ++++++<br>
1 file changed, 6 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c<br>
index c4f84627cfd9..0bbe3412d9b5 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c<br>
@@ -823,6 +823,12 @@ static int navi10_force_clk_levels(struct smu_context *smu,<br>
case SMU_UCLK:<br>
case SMU_DCEFCLK:<br>
case SMU_FCLK:<br>
+ /* There is only 2 levels for fine grained DPM */<br>
+ if (navi10_is_support_fine_grained_dpm(smu, clk_type)) {<br>
+ soft_max_level = (soft_max_level >= 1 ? 1 : 0);<br>
+ soft_min_level = (soft_min_level >= 1 ? 1 : 0);<br>
+ }<br>
+<br>
ret = smu_get_dpm_freq_by_index(smu, clk_type, soft_min_level, &min_freq);<br>
if (ret)<br>
return size;<br>
-- <br>
2.24.0<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></div>
</span></font></div>
</body>
</html>