[PATCH] drm/amdgpu/pm: fix the fan speed in fan1_input in manual mode for navi1x

Quan, Evan Evan.Quan at amd.com
Tue Oct 27 03:16:26 UTC 2020


[AMD Official Use Only - Internal Distribution Only]

Reviewed-by: Evan Quan <evan.quan at amd.com>

-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Tuesday, October 27, 2020 5:43 AM
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
Subject: [PATCH] drm/amdgpu/pm: fix the fan speed in fan1_input in manual mode for navi1x

It has been confirmed that the SMU metrics table should always reflect the current fan speed even in manual mode.

Fixes: 3033e9f1c2de ("drm/amdgpu/swsmu: handle manual fan readback on SMU11")
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c
index 9cf97744b67e..ef1a62e86a0e 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c
@@ -1361,14 +1361,9 @@ static int navi10_get_fan_speed_rpm(struct smu_context *smu,
 if (!speed)
 return -EINVAL;

-switch (smu_v11_0_get_fan_control_mode(smu)) {
-case AMD_FAN_CTRL_AUTO:
-return navi10_get_smu_metrics_data(smu,
-   METRICS_CURR_FANSPEED,
-   speed);
-default:
-return smu_v11_0_get_fan_speed_rpm(smu, speed);
-}
+return navi10_get_smu_metrics_data(smu,
+   METRICS_CURR_FANSPEED,
+   speed);
 }

 static int navi10_get_fan_parameters(struct smu_context *smu)
--
2.25.4

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cevan.quan%40amd.com%7C6856f65a142f4c8b933f08d879f83340%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637393454223805214%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=HR2B2wvNQAEBBcDLEC9C6PXJOswWjejQN4XeWEuksSY%3D&reserved=0


More information about the amd-gfx mailing list