<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: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);">
Acked-by: Alex Deucher <alexander.deucher@amd.com><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> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Kent Russell <kent.russell@amd.com><br>
<b>Sent:</b> Thursday, November 5, 2020 10:20 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Russell, Kent <Kent.Russell@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu: Fix Arcturus fan speed reporting</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Arcturus doesn't have a fan. The assumption of "if the manual fan<br>
control bit isn't set, it's on automatic mode" does not hold true if the<br>
fan is missing, and results in exposing an invalid value for fan speed.<br>
<br>
The SMU metrics table accurately reflects the lack of fan and will<br>
return 0 for the fan speed. Trying to use the<br>
smu_v11_0_get_fan_speed_rpm function will return invalid data, so just<br>
stick with the SMU metrics for Arcturus<br>
<br>
Signed-off-by: Kent Russell <kent.russell@amd.com><br>
---<br>
 drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 11 +++--------<br>
 1 file changed, 3 insertions(+), 8 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c<br>
index d96048e98237..4fd850e58004 100644<br>
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c<br>
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c<br>
@@ -1139,14 +1139,9 @@ static int arcturus_get_fan_speed_rpm(struct smu_context *smu,<br>
         if (!speed)<br>
                 return -EINVAL;<br>
 <br>
-       switch (smu_v11_0_get_fan_control_mode(smu)) {<br>
-       case AMD_FAN_CTRL_AUTO:<br>
-               return arcturus_get_smu_metrics_data(smu,<br>
-                                                    METRICS_CURR_FANSPEED,<br>
-                                                    speed);<br>
-       default:<br>
-               return smu_v11_0_get_fan_speed_rpm(smu, speed);<br>
-       }<br>
+       return arcturus_get_smu_metrics_data(smu,<br>
+                                            METRICS_CURR_FANSPEED,<br>
+                                            speed);<br>
 }<br>
 <br>
 static int arcturus_get_fan_parameters(struct smu_context *smu)<br>
-- <br>
2.17.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Calexander.deucher%40amd.com%7Cc266d21dcb5e4d84073808d8819e9820%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637401865460755885%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=O8kmXHVEGi01B7S0gk5MPafIEiuBC9v7catH%2FASo6iQ%3D&amp;reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Calexander.deucher%40amd.com%7Cc266d21dcb5e4d84073808d8819e9820%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637401865460755885%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=O8kmXHVEGi01B7S0gk5MPafIEiuBC9v7catH%2FASo6iQ%3D&amp;reserved=0</a><br>
</div>
</span></font></div>
</div>
</body>
</html>