drm/amd/pm: fix the wrong fan speed in fan1_input
Subsystems (3)
Kenneth Feng
maintainerPATCH 1/1 drm/amd/pm: fix the wrong fan speed in fan1_input
fix the wrong fan speed in fan1_input when the fan control mode is manual. the fan speed value is not correct when we set manual mode to fan1_enalbe - 1. since the fan speed in the metrics table always reflects the real fan speed,we can fetch the fan speed for both auto and manual mode.
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +3 -8
@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data (smu, -METRICS_CURR_FANSPEED , - speed); -default : -return smu_v11_0_get_fan_speed_rpm (smu, speed); - } +return sienna_cichlid_get_smu_metrics_data (smu, +METRICS_CURR_FANSPEED , + speed); }static int sienna_cichlid_get_fan_parameters (struct smu_context *smu)
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Regards,
Likun
-----Original Message-----
From: Kenneth Feng <[email protected]>
Sent: Wednesday, October 21, 2020 2:45 PM
To: [email protected]
Cc: Gao, Likun <[email protected]>; Feng, Kenneth <[email protected]>
Subject: [PATCH] drm/amd/pm: fix the wrong fan speed in fan1_input
fix the wrong fan speed in fan1_input when the fan control mode is manual.
the fan speed value is not correct when we set manual mode to fan1_enalbe - 1.
since the fan speed in the metrics table always reflects the real fan speed,we can fetch the fan speed for both auto and manual mode.
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +3 -8
@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data (smu, -METRICS_CURR_FANSPEED , - speed); -default : -return smu_v11_0_get_fan_speed_rpm (smu, speed); - } +return sienna_cichlid_get_smu_metrics_data (smu, +METRICS_CURR_FANSPEED , + speed); }static int sienna_cichlid_get_fan_parameters (struct smu_context *smu)
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 7 lines · Kenneth Feng
fix the wrong fan speed in
fan1_inputwhen the fan control mode is manual. the fan speed value is not correct when we set manual mode tofan1_enalbe- 1. since the fan speed in the metrics table always reflects the real fan speed,we can fetch the fan speed for both auto and manual mode.Signed-off-by Kenneth Feng <[email protected]>
NACK. At least on the navi boards I have, the metrics table fan speed reads back 0 when the fan is in manual mode. That's why I changed this in the first place.
Alex
Quoted 29 lines
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +3
-9@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data (smu, -METRICS_CURR_FANSPEED , - speed); -default : -return smu_v11_0_get_fan_speed_rpm (smu, speed); - } +return sienna_cichlid_get_smu_metrics_data (smu, +METRICS_CURR_FANSPEED , + speed); }static int sienna_cichlid_get_fan_parameters (struct smu_context *smu) --2.17.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 8 lines · Alex Deucher
Quoted 6 lines · Kenneth Feng
fix the wrong fan speed in
fan1_inputwhen the fan control mode is manual. the fan speed value is not correct when we set manual mode tofan1_enalbe- 1. since the fan speed in the metrics table always reflects the real fan speed,we can fetch the fan speed for both auto and manual mode.
Quoted 5 lines
Quoted 1 line
Signed-off-by Kenneth Feng <[email protected]>NACK. At least on the navi boards I have, the metrics table fan speed reads back 0 when the fan is in manual mode. That's why I changed this in the first place.
Nevermind, I was thinking about navi1x. If this is working correctly on sienna cichlid, please ignore me.
Alex
Quoted 29 lines
Alex
Quoted 25 lines
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +3
-8@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data (smu, -METRICS_CURR_FANSPEED , - speed); -default : -return smu_v11_0_get_fan_speed_rpm (smu, speed); - } +return sienna_cichlid_get_smu_metrics_data (smu, +METRICS_CURR_FANSPEED , + speed); }
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +0
-1static int sienna_cichlid_get_fan_parameters (struct smu_context *smu) --2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 10 lines · Alex Deucher
Quoted 8 lines · Alex Deucher
Quoted 6 lines · Kenneth Feng
fix the wrong fan speed in
fan1_inputwhen the fan control mode is manual. the fan speed value is not correct when we set manual mode tofan1_enalbe- 1. since the fan speed in the metrics table always reflects the real fan speed,we can fetch the fan speed for both auto and manual mode.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Kenneth Feng <[email protected]>NACK. At least on the navi boards I have, the metrics table fan speed reads back 0 when the fan is in manual mode. That's why I changed this in the first place.
Nevermind, I was thinking about navi1x. If this is working correctly on sienna cichlid, please ignore me.
That said, I don't see why the current code should not work. Maybe a bug elsewhere? Is smu_v11_0_get_fan_speed_rpm() incorrect for sienna cichlid?
Alex
Quoted 33 lines
Alex
Quoted 29 lines
Alex
Quoted 25 lines
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +3
-8@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data (smu, -METRICS_CURR_FANSPEED , - speed); -default : -return smu_v11_0_get_fan_speed_rpm (smu, speed); - } +return sienna_cichlid_get_smu_metrics_data (smu, +METRICS_CURR_FANSPEED , + speed); }
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +0
-1static int sienna_cichlid_get_fan_parameters (struct smu_context *smu) --2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Feng, Kenneth
maintainer[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Right, smu_v11_0_get_fan_speed_rpm() is not correct for sienna cichlid when it's in manual mode.
An example is that in my system, the rpm is about 1800 in manual mode, confirmed with AGM and the internal smu fw scoreboard. But the fan1_input shows about 180000, which is way more than the real value.
If you see the value from the metrics table is 0 on navi10, maybe it's the real rpm since we still have 0 rpm feature. I can double check the navi10.
Thanks.
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 2:47 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed in fan1_input
[CAUTION: External Email]
Quoted 10 lines · Alex Deucher
Quoted 8 lines · Alex Deucher
Quoted 6 lines · Kenneth Feng
fix the wrong fan speed in
fan1_inputwhen the fan control mode is manual. the fan speed value is not correct when we set manual mode tofan1_enalbe- 1. since the fan speed in the metrics table always reflects the real fan speed,we can fetch the fan speed for both auto and manual mode.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Kenneth Feng <[email protected]>NACK. At least on the navi boards I have, the metrics table fan speed reads back 0 when the fan is in manual mode. That's why I changed this in the first place.
Nevermind, I was thinking about navi1x. If this is working correctly on sienna cichlid, please ignore me.
That said, I don't see why the current code should not work. Maybe a bug elsewhere? Is smu_v11_0_get_fan_speed_rpm() incorrect for sienna cichlid?
Alex
Quoted 40 lines
Alex
Quoted 36 lines
Alex
Quoted 32 lines
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)(quoted diff) +0
-0
a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.cb/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.cindex496abc31b07e..27b6cade9ade100644drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +3
-8@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data (smu, -METRICS_CURR_FANSPEED , - speed); -default : -return smu_v11_0_get_fan_speed_rpm (smu, speed); - } +return sienna_cichlid_get_smu_metrics_data (smu, +METRICS_CURR_FANSPEED , + speed); } static int sienna_cichlid_get_fan_parameters(struct smu_context*smu)
--
2.17.1
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2F
lists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7 C01%7Ckenneth.feng%40amd.com%7Cd8e969f4b63e4897a3df08d875f1b050%7C 3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637389028190609906%7CUn known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik 1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KomP2H%2FadKJChDbNvNPQlTotmE WrhutsQCHfiRIjNUY%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Feng, Kenneth
maintainer[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Navi10 also has this problem as below.
# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_input 1217 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_enable 0 # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_enable # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_enable 1 s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_input 183105
In AGM, the rpm is 1800.
-----Original Message-----
From: Feng, Kenneth
Sent: Thursday, October 22, 2020 9:11 AM
To: Alex Deucher <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: RE: [PATCH] drm/amd/pm: fix the wrong fan speed in fan1_input
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Right, smu_v11_0_get_fan_speed_rpm() is not correct for sienna cichlid when it's in manual mode.
An example is that in my system, the rpm is about 1800 in manual mode, confirmed with AGM and the internal smu fw scoreboard. But the fan1_input shows about 180000, which is way more than the real value.
If you see the value from the metrics table is 0 on navi10, maybe it's the real rpm since we still have 0 rpm feature. I can double check the navi10.
Thanks.
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 2:47 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed in fan1_input
[CAUTION: External Email]
Quoted 10 lines · Alex Deucher
Quoted 8 lines · Alex Deucher
Quoted 6 lines · Kenneth Feng
fix the wrong fan speed in
fan1_inputwhen the fan control mode is manual. the fan speed value is not correct when we set manual mode tofan1_enalbe- 1. since the fan speed in the metrics table always reflects the real fan speed,we can fetch the fan speed for both auto and manual mode.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Kenneth Feng <[email protected]>NACK. At least on the navi boards I have, the metrics table fan speed reads back 0 when the fan is in manual mode. That's why I changed this in the first place.
Nevermind, I was thinking about navi1x. If this is working correctly on sienna cichlid, please ignore me.
That said, I don't see why the current code should not work. Maybe a bug elsewhere? Is smu_v11_0_get_fan_speed_rpm() incorrect for sienna cichlid?
Alex
Quoted 40 lines
Alex
Quoted 36 lines
Alex
Quoted 32 lines
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)diff --git
a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.cb/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.cindex496abc31b07e..27b6cade9ade100644drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +3
-8@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data (smu, -METRICS_CURR_FANSPEED , - speed); -default : -return smu_v11_0_get_fan_speed_rpm (smu, speed); - } +return sienna_cichlid_get_smu_metrics_data (smu, +METRICS_CURR_FANSPEED , + speed); } static int sienna_cichlid_get_fan_parameters(struct smu_context*smu)
--
2.17.1
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2F
lists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7 C01%7Ckenneth.feng%40amd.com%7Cd8e969f4b63e4897a3df08d875f1b050%7C 3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637389028190609906%7CUn known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik 1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KomP2H%2FadKJChDbNvNPQlTotmE WrhutsQCHfiRIjNUY%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 15 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Navi10 also has this problem as below.# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_input 1217 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_enable 0 # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_enable # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_enable 1 s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_input 183105
Quoted 1 line
In AGM, the rpm is 1800.
Does it read back correctly if you manually set the fan rpm first before reading it back?
Alex
Quoted 94 lines
-----Original Message-----
From: Feng, Kenneth
Sent: Thursday, October 22, 2020 9:11 AM
To: Alex Deucher <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: RE: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Right,smu_v11_0_get_fan_speed_rpm()is not correct for sienna cichlid when it's in manual mode.
An example is that in my system, the rpm is about 1800 in manual mode, confirmed with AGM and the internal smu fw scoreboard. But thefan1_inputshows about 180000, which is way more than the real value.
If you see the value from the metrics table is 0 on navi10, maybe it's the real rpm since we still have 0 rpm feature. I can double check the navi10.
Thanks.-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 2:47 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 10 lines · Alex Deucher
Quoted 8 lines · Alex Deucher
Quoted 6 lines · Kenneth Feng
fix the wrong fan speed in
fan1_inputwhen the fan control mode is manual. the fan speed value is not correct when we set manual mode tofan1_enalbe- 1. since the fan speed in the metrics table always reflects the real fan speed,we can fetch the fan speed for both auto and manual mode.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Kenneth Feng <[email protected]>NACK. At least on the navi boards I have, the metrics table fan speed reads back 0 when the fan is in manual mode. That's why I changed this in the first place.
Nevermind, I was thinking about navi1x. If this is working correctly on sienna cichlid, please ignore me.
That said, I don't see why the current code should not work. Maybe a bug elsewhere? Is
smu_v11_0_get_fan_speed_rpm()incorrect for sienna cichlid?Alex
Quoted 40 lines
Alex
Quoted 36 lines
Alex
Quoted 32 lines
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)diff --git
a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.cb/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.cindex496abc31b07e..27b6cade9ade100644drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +3
-8@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data (smu, -METRICS_CURR_FANSPEED , - speed); -default : -return smu_v11_0_get_fan_speed_rpm (smu, speed); - } +return sienna_cichlid_get_smu_metrics_data (smu, +METRICS_CURR_FANSPEED , + speed); } static int sienna_cichlid_get_fan_parameters(struct smu_context*smu)
--
2.17.1
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2F
lists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7 C01%7Ckenneth.feng%40amd.com%7Cd8e969f4b63e4897a3df08d875f1b050%7C 3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637389028190609906%7CUn known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik 1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KomP2H%2FadKJChDbNvNPQlTotmE WrhutsQCHfiRIjNUY%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Feng, Kenneth
maintainer[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
After reboot, It is also not read back correctly as below.
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_enable s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_input 183105 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_enable 1
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 10:18 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed in fan1_input
[CAUTION: External Email]
Quoted 24 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Navi10 also has this problem as below.# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_input 1217 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_enable 0 # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_enable # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_enable 1 s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_input 183105
Quoted 1 line
In AGM, the rpm is 1800.
Does it read back correctly if you manually set the fan rpm first before reading it back?
Alex
Quoted 96 lines
-----Original Message-----
From: Feng, Kenneth
Sent: Thursday, October 22, 2020 9:11 AM
To: Alex Deucher <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: RE: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Right,smu_v11_0_get_fan_speed_rpm()is not correct for sienna cichlid when it's in manual mode.
An example is that in my system, the rpm is about 1800 in manual mode, confirmed with AGM and the internal smu fw scoreboard. But thefan1_inputshows about 180000, which is way more than the real value.
If you see the value from the metrics table is 0 on navi10, maybe it's the real rpm since we still have 0 rpm feature. I can double check the navi10.
Thanks.-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 2:47 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 10 lines · Alex Deucher
Quoted 8 lines · Alex Deucher
Quoted 6 lines · Kenneth Feng
fix the wrong fan speed in
fan1_inputwhen the fan control mode is manual. the fan speed value is not correct when we set manual mode tofan1_enalbe- 1. since the fan speed in the metrics table always reflects the
real fan speed,we can fetch the fan speed for both auto and manual mode.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Kenneth Feng <[email protected]>NACK. At least on the navi boards I have, the metrics table fan speed reads back 0 when the fan is in manual mode. That's why I changed this in the first place.
Nevermind, I was thinking about navi1x. If this is working correctly on sienna cichlid, please ignore me.
That said, I don't see why the current code should not work. Maybe a bug elsewhere? Is
smu_v11_0_get_fan_speed_rpm()incorrect for sienna cichlid?Alex
Quoted 40 lines
Alex
Quoted 36 lines
Alex
Quoted 32 lines
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)diff --git
a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.cb/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.cindex496abc31b07e..27b6cade9ade100644drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +3
-8@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data (smu, -METRICS_CURR_FANSPEED , - speed); -default : -return smu_v11_0_get_fan_speed_rpm (smu, speed); - } +return sienna_cichlid_get_smu_metrics_data (smu, +METRICS_CURR_FANSPEED , + speed); } static int sienna_cichlid_get_fan_parameters(struct smu_context*smu)
--
2.17.1
Quoted 16 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%
2F lists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04 %7 C01%7Ckenneth.feng%40amd.com%7Cd8e969f4b63e4897a3df08d875f1b050%Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
7C 3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637389028190609906%7C Un known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6 Ik 1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KomP2H%2FadKJChDbNvNPQlTot mE
WrhutsQCHfiRIjNUY%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 11 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
After reboot, It is also not read back correctly as below.# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_enable s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_input 183105 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_enable 1
What about if you manually set the speed. E.g.,
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_enable # echo 800 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_target # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_input
The problem I ran into on navi1x was setting the fan speed manually resulted in 0 for the fan speed in the metrics table. E.g.,
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm
See:
https://gitlab.freedesktop.org/drm/amd/-/issues/1164
Alex
Quoted 139 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 10:18 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 24 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Navi10 also has this problem as below.# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_input 1217 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_enable 0 # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_enable # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_enable 1 s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_input 183105Quoted 1 line
In AGM, the rpm is 1800.
Does it read back correctly if you manually set the fan rpm first before reading it back?
Alex
Quoted 96 lines
-----Original Message-----
From: Feng, Kenneth
Sent: Thursday, October 22, 2020 9:11 AM
To: Alex Deucher <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: RE: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Right,smu_v11_0_get_fan_speed_rpm()is not correct for sienna cichlid when it's in manual mode.
An example is that in my system, the rpm is about 1800 in manual mode, confirmed with AGM and the internal smu fw scoreboard. But thefan1_inputshows about 180000, which is way more than the real value.
If you see the value from the metrics table is 0 on navi10, maybe it's the real rpm since we still have 0 rpm feature. I can double check the navi10.
Thanks.-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 2:47 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 10 lines · Alex Deucher
Quoted 8 lines · Alex Deucher
Quoted 6 lines · Kenneth Feng
fix the wrong fan speed in
fan1_inputwhen the fan control mode is manual. the fan speed value is not correct when we set manual mode tofan1_enalbe- 1. since the fan speed in the metrics table always reflects the
real fan speed,we can fetch the fan speed for both auto and manual mode.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Kenneth Feng <[email protected]>NACK. At least on the navi boards I have, the metrics table fan speed reads back 0 when the fan is in manual mode. That's why I changed this in the first place.
Nevermind, I was thinking about navi1x. If this is working correctly on sienna cichlid, please ignore me.
That said, I don't see why the current code should not work. Maybe a bug elsewhere? Is
smu_v11_0_get_fan_speed_rpm()incorrect for sienna cichlid?Alex
Quoted 40 lines
Alex
Quoted 36 lines
Alex
Quoted 32 lines
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)diff --git
a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.cb/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.cindex496abc31b07e..27b6cade9ade100644drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +3
-8@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data (smu, -METRICS_CURR_FANSPEED , - speed); -default : -return smu_v11_0_get_fan_speed_rpm (smu, speed); - } +return sienna_cichlid_get_smu_metrics_data (smu, +METRICS_CURR_FANSPEED , + speed); } static int sienna_cichlid_get_fan_parameters(struct smu_context*smu)
--
2.17.1
Quoted 16 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%
2F lists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04 %7 C01%7Ckenneth.feng%40amd.com%7Cd8e969f4b63e4897a3df08d875f1b050%Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
7C 3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637389028190609906%7C Un known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6 Ik 1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KomP2H%2FadKJChDbNvNPQlTot mE
WrhutsQCHfiRIjNUY%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Feng, Kenneth
maintainer[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
The speed is not 0 in the below scenario if the rpm is got from the metrics table on navi10. The possibility is that you were using an old firmware. The firmware on my system is 0x002a3e00 Can you remember the version when you saw the problem?
Thanks.
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1 109
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 11:28 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed in fan1_input
[CAUTION: External Email]
Quoted 5 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
After reboot, It is also not read back correctly as below.
Quoted 11 lines
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_enable s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_input 183105 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_enable 1
What about if you manually set the speed. E.g., # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_enable
# echo 800 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_target # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_input
The problem I ran into on navi1x was setting the fan speed manually resulted in 0 for the fan speed in the metrics table. E.g.,
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm
Alex
Quoted 162 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 10:18 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 29 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Navi10 also has this problem as below.# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_input 1217 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_enable 0 # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_enable # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_enable 1 s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_input 183105Quoted 1 line
In AGM, the rpm is 1800.
Does it read back correctly if you manually set the fan rpm first before reading it back?
Alex
Quoted 113 lines
-----Original Message-----
From: Feng, Kenneth
Sent: Thursday, October 22, 2020 9:11 AM
To: Alex Deucher <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: RE: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Right,smu_v11_0_get_fan_speed_rpm()is not correct for sienna cichlid when it's in manual mode.
An example is that in my system, the rpm is about 1800 in manual mode, confirmed with AGM and the internal smu fw scoreboard. But thefan1_inputshows about 180000, which is way more than the real value.
If you see the value from the metrics table is 0 on navi10, maybe it's the real rpm since we still have 0 rpm feature. I can double check the navi10.
Thanks.-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 2:47 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 10 lines · Alex Deucher
Quoted 8 lines · Alex Deucher
Quoted 6 lines · Kenneth Feng
fix the wrong fan speed in
fan1_inputwhen the fan control mode is manual. the fan speed value is not correct when we set manual mode tofan1_enalbe- 1. since the fan speed in the metrics table always reflects the
real fan speed,we can fetch the fan speed for both auto and manual mode.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Kenneth Feng <[email protected]>NACK. At least on the navi boards I have, the metrics table fan speed reads back 0 when the fan is in manual mode. That's why I changed this in the first place.
Nevermind, I was thinking about navi1x. If this is working correctly on sienna cichlid, please ignore me.
That said, I don't see why the current code should not work. Maybe a bug elsewhere? Is
smu_v11_0_get_fan_speed_rpm()incorrect for sienna cichlid?Alex
Quoted 55 lines
Alex
Quoted 51 lines
Alex
Quoted 47 lines
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)diff --git
a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.cb/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.cindex496abc31b07e..27b6cade9ade100644drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +3
-8@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data (smu, -METRICS_CURR_FANSPEED , - speed); -default : -return smu_v11_0_get_fan_speed_rpm (smu, speed); - } +return sienna_cichlid_get_smu_metrics_data (smu, +METRICS_CURR_FANSPEED , + speed); } static int sienna_cichlid_get_fan_parameters(struct
smu_context
*smu)
--
2.17.1_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2
F%25
2F lists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data= 04
%7 C01%7Ckenneth.feng%40amd.com%7Cd8e969f4b63e4897a3df08d875f1b05 0%
7C 3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637389028190609906% 7C
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Un known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTi I6
Ik 1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KomP2H%2FadKJChDbNvNPQlT ot
mE
WrhutsQCHfiRIjNUY%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 7 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
The speed is not 0 in the below scenario if the rpm is got from the metrics table on navi10. The possibility is that you were using an old firmware. The firmware on my system is0x002a3e00Can you remember the version when you saw the problem?
SMC feature version: 0, firmware version: 0x002a3600
Alex
Quoted 216 lines
Thanks.
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1 109-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 11:28 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 5 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
After reboot, It is also not read back correctly as below.Quoted 11 lines
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_enable s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_input 183105 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_enable 1What about if you manually set the speed. E.g., # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_enable
# echo 800 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_target # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_inputThe problem I ran into on navi1x was setting the fan speed manually resulted in 0 for the fan speed in the metrics table. E.g.,
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwmAlex
Quoted 162 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 10:18 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 29 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Navi10 also has this problem as below.# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_input 1217 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_enable 0 # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_enable # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_enable 1 s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_input 183105Quoted 1 line
In AGM, the rpm is 1800.
Does it read back correctly if you manually set the fan rpm first before reading it back?
Alex
Quoted 113 lines
-----Original Message-----
From: Feng, Kenneth
Sent: Thursday, October 22, 2020 9:11 AM
To: Alex Deucher <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: RE: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Right,smu_v11_0_get_fan_speed_rpm()is not correct for sienna cichlid when it's in manual mode.
An example is that in my system, the rpm is about 1800 in manual mode, confirmed with AGM and the internal smu fw scoreboard. But thefan1_inputshows about 180000, which is way more than the real value.
If you see the value from the metrics table is 0 on navi10, maybe it's the real rpm since we still have 0 rpm feature. I can double check the navi10.
Thanks.-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 2:47 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 10 lines · Alex Deucher
Quoted 8 lines · Alex Deucher
Quoted 6 lines · Kenneth Feng
fix the wrong fan speed in
fan1_inputwhen the fan control mode is manual. the fan speed value is not correct when we set manual mode tofan1_enalbe- 1. since the fan speed in the metrics table always reflects the
real fan speed,we can fetch the fan speed for both auto and manual mode.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Kenneth Feng <[email protected]>NACK. At least on the navi boards I have, the metrics table fan speed reads back 0 when the fan is in manual mode. That's why I changed this in the first place.
Nevermind, I was thinking about navi1x. If this is working correctly on sienna cichlid, please ignore me.
That said, I don't see why the current code should not work. Maybe a bug elsewhere? Is
smu_v11_0_get_fan_speed_rpm()incorrect for sienna cichlid?Alex
Quoted 55 lines
Alex
Quoted 51 lines
Alex
Quoted 47 lines
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)diff --git
a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.cb/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.cindex496abc31b07e..27b6cade9ade100644drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +3
-8@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data (smu, -METRICS_CURR_FANSPEED , - speed); -default : -return smu_v11_0_get_fan_speed_rpm (smu, speed); - } +return sienna_cichlid_get_smu_metrics_data (smu, +METRICS_CURR_FANSPEED , + speed); } static int sienna_cichlid_get_fan_parameters(struct
smu_context
*smu)
--
2.17.1_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2
F%25
2F lists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data= 04
%7 C01%7Ckenneth.feng%40amd.com%7Cd8e969f4b63e4897a3df08d875f1b05 0%
7C 3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637389028190609906% 7C
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Un known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTi I6
Ik 1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KomP2H%2FadKJChDbNvNPQlT ot
mE
WrhutsQCHfiRIjNUY%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 11 lines · Alex Deucher
Quoted 7 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
The speed is not 0 in the below scenario if the rpm is got from the metrics table on navi10. The possibility is that you were using an old firmware. The firmware on my system is0x002a3e00Can you remember the version when you saw the problem?SMC feature version: 0, firmware version:
0x002a3600
Actually, I'm not sure. It might have been updated since the last time I tested this.
Alex
Quoted 219 lines
Alex
Quoted 216 lines
Thanks.
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1 109-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 11:28 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 5 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
After reboot, It is also not read back correctly as below.Quoted 11 lines
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_enable s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_input 183105 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_enable 1What about if you manually set the speed. E.g., # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_enable
# echo 800 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_target # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_inputThe problem I ran into on navi1x was setting the fan speed manually resulted in 0 for the fan speed in the metrics table. E.g.,
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwmAlex
Quoted 162 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 10:18 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 29 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Navi10 also has this problem as below.# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_input 1217 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_enable 0 # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_enable # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_enable 1 s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_input 183105Quoted 1 line
In AGM, the rpm is 1800.
Does it read back correctly if you manually set the fan rpm first before reading it back?
Alex
Quoted 113 lines
-----Original Message-----
From: Feng, Kenneth
Sent: Thursday, October 22, 2020 9:11 AM
To: Alex Deucher <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: RE: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Right,smu_v11_0_get_fan_speed_rpm()is not correct for sienna cichlid when it's in manual mode.
An example is that in my system, the rpm is about 1800 in manual mode, confirmed with AGM and the internal smu fw scoreboard. But thefan1_inputshows about 180000, which is way more than the real value.
If you see the value from the metrics table is 0 on navi10, maybe it's the real rpm since we still have 0 rpm feature. I can double check the navi10.
Thanks.-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 2:47 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 10 lines · Alex Deucher
Quoted 8 lines · Alex Deucher
Quoted 6 lines · Kenneth Feng
fix the wrong fan speed in
fan1_inputwhen the fan control mode is manual. the fan speed value is not correct when we set manual mode tofan1_enalbe- 1. since the fan speed in the metrics table always reflects the
real fan speed,we can fetch the fan speed for both auto and manual mode.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Kenneth Feng <[email protected]>NACK. At least on the navi boards I have, the metrics table fan speed reads back 0 when the fan is in manual mode. That's why I changed this in the first place.
Nevermind, I was thinking about navi1x. If this is working correctly on sienna cichlid, please ignore me.
That said, I don't see why the current code should not work. Maybe a bug elsewhere? Is
smu_v11_0_get_fan_speed_rpm()incorrect for sienna cichlid?Alex
Quoted 55 lines
Alex
Quoted 51 lines
Alex
Quoted 47 lines
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)diff --git
a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.cb/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.cindex496abc31b07e..27b6cade9ade100644drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +3
-8@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data (smu, -METRICS_CURR_FANSPEED , - speed); -default : -return smu_v11_0_get_fan_speed_rpm (smu, speed); - } +return sienna_cichlid_get_smu_metrics_data (smu, +METRICS_CURR_FANSPEED , + speed); } static int sienna_cichlid_get_fan_parameters(struct
smu_context
*smu)
--
2.17.1_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2
F%25
2F lists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data= 04
%7 C01%7Ckenneth.feng%40amd.com%7Cd8e969f4b63e4897a3df08d875f1b05 0%
7C 3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637389028190609906% 7C
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Un known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTi I6
Ik 1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KomP2H%2FadKJChDbNvNPQlT ot
mE
WrhutsQCHfiRIjNUY%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Alex Deucher
Reviewed-by Evan QuanQuoted 12 lines · Alex Deucher
Quoted 10 lines · Alex Deucher
Quoted 7 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
The speed is not 0 in the below scenario if the rpm is got from the metrics table on navi10. The possibility is that you were using an old firmware. The firmware on my system is0x002a3e00Can you remember the version when you saw the problem?
Quoted 4 lines
Quoted 1 line
SMC feature version: 0, firmware version:
0x002a3600Actually, I'm not sure. It might have been updated since the last time I tested this.
If you can confirm it's working on all the asics with the latest firmware, maybe it makes more sense to just revert this commit:
commit 3033e9f1c2de0eca89e9a98c7e307820f3fc953e
Author: Alex Deucher <[email protected]> Date: Thu Aug 27 00:12:38 2020 -0400
drm/amdgpu/swsmu: handle manual fan readback on SMU11
Need to read back from registers for manual mode rather than using the metrics table.
Alex
Quoted 223 lines
Alex
Quoted 219 lines
Alex
Quoted 216 lines
Thanks.
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1 109-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 11:28 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 5 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
After reboot, It is also not read back correctly as below.Quoted 11 lines
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_enable s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_input 183105 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0 /hwmon/hwmon3/fan1_enable 1What about if you manually set the speed. E.g., # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_enable
# echo 800 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_target # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/fan1_inputThe problem I ran into on navi1x was setting the fan speed manually resulted in 0 for the fan speed in the metrics table. E.g.,
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/hwmon/hwmon3/pwmAlex
Quoted 162 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 10:18 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 29 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Navi10 also has this problem as below.# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_input 1217 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_enable 0 # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_enable # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_enable 1 s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:00 .0 /hwmon/hwmon3/fan1_input 183105Quoted 1 line
In AGM, the rpm is 1800.
Does it read back correctly if you manually set the fan rpm first before reading it back?
Alex
Quoted 113 lines
-----Original Message-----
From: Feng, Kenneth
Sent: Thursday, October 22, 2020 9:11 AM
To: Alex Deucher <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: RE: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Right,smu_v11_0_get_fan_speed_rpm()is not correct for sienna cichlid when it's in manual mode.
An example is that in my system, the rpm is about 1800 in manual mode, confirmed with AGM and the internal smu fw scoreboard. But thefan1_inputshows about 180000, which is way more than the real value.
If you see the value from the metrics table is 0 on navi10, maybe it's the real rpm since we still have 0 rpm feature. I can double check the navi10.
Thanks.-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 2:47 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 10 lines · Alex Deucher
Quoted 8 lines · Alex Deucher
Quoted 6 lines · Kenneth Feng
fix the wrong fan speed in
fan1_inputwhen the fan control mode is manual. the fan speed value is not correct when we set manual mode tofan1_enalbe- 1. since the fan speed in the metrics table always reflects the
real fan speed,we can fetch the fan speed for both auto and manual mode.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Kenneth Feng <[email protected]>NACK. At least on the navi boards I have, the metrics table fan speed reads back 0 when the fan is in manual mode. That's why I changed this in the first place.
Nevermind, I was thinking about navi1x. If this is working correctly on sienna cichlid, please ignore me.
That said, I don't see why the current code should not work. Maybe a bug elsewhere? Is
smu_v11_0_get_fan_speed_rpm()incorrect for sienna cichlid?Alex
Quoted 55 lines
Alex
Quoted 51 lines
Alex
Quoted 47 lines
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)diff --git
a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.cb/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.cindex496abc31b07e..27b6cade9ade100644drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +3
-8@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data (smu, -METRICS_CURR_FANSPEED , - speed); -default : -return smu_v11_0_get_fan_speed_rpm (smu, speed); - } +return sienna_cichlid_get_smu_metrics_data (smu, +METRICS_CURR_FANSPEED , + speed); } static int sienna_cichlid_get_fan_parameters(struct
smu_context
*smu)
--
2.17.1_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2
F%25
2F lists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data= 04
%7 C01%7Ckenneth.feng%40amd.com%7Cd8e969f4b63e4897a3df08d875f1b05 0%
7C 3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637389028190609906% 7C
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Un known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTi I6
Ik 1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KomP2H%2FadKJChDbNvNPQlT ot
mE
WrhutsQCHfiRIjNUY%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
And smu_v11_0_get_fan_speed_rpm() also doesn't reflect the real value on navi10. I will confirm and if it's ok, will revert it.
Thanks.
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 1:19 PM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed in fan1_input
[CAUTION: External Email]
Quoted 12 lines · Alex Deucher
Quoted 10 lines · Alex Deucher
Quoted 7 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
The speed is not 0 in the below scenario if the rpm is got from the metrics table on navi10. The possibility is that you were using an old firmware. The
firmware on my system is0x002a3e00Can you remember the version when you saw the problem?
Quoted 4 lines
Quoted 1 line
SMC feature version: 0, firmware version:
0x002a3600Actually, I'm not sure. It might have been updated since the last time I tested this.
If you can confirm it's working on all the asics with the latest firmware, maybe it makes more sense to just revert this commit:
commit 3033e9f1c2de0eca89e9a98c7e307820f3fc953e
Author: Alex Deucher <[email protected]> Date: Thu Aug 27 00:12:38 2020 -0400
drm/amdgpu/swsmu: handle manual fan readback on SMU11
Need to read back from registers for manual mode rather than using the metrics table.
Alex
Quoted 263 lines
Alex
Quoted 259 lines
Alex
Quoted 256 lines
Thanks.
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1 109-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 11:28 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 5 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
After reboot, It is also not read back correctly as below.Quoted 13 lines
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:0 4:00.0 /hwmon/hwmon3/fan1_enable s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:0 4:00.0 /hwmon/hwmon3/fan1_input 183105 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:0 4:00.0 /hwmon/hwmon3/fan1_enable 1What about if you manually set the speed. E.g., # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:
00.0/hwmon/hwmon3/fan1_enable # echo 800 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:
00.0/hwmon/hwmon3/fan1_target # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:
00.0/hwmon/hwmon3/fan1_inputThe problem I ran into on navi1x was setting the fan speed manually resulted in 0 for the fan speed in the metrics table. E.g.,
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwmSee:
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2F
gitlab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1164&data=04 %7C01%7CKenneth.Feng%40amd.com%7C7b20871a843e41a5038408d8764a0d51% 7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637389407704795887%7C Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6 Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=2jEFoU62zbGIwEACv3C6xAmyNg IQ4q1kbBfNQ3Ztm7E%3D&reserved=0Alex
Quoted 178 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 10:18 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 34 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Navi10 also has this problem as below.# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_input 1217 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_enable 0 # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_enable # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_enable 1 s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_input 183105Quoted 1 line
In AGM, the rpm is 1800.
Does it read back correctly if you manually set the fan rpm first before reading it back?
Alex
Quoted 123 lines
-----Original Message-----
From: Feng, Kenneth
Sent: Thursday, October 22, 2020 9:11 AM
To: Alex Deucher <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: RE: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Right,smu_v11_0_get_fan_speed_rpm()is not correct for sienna cichlid when it's in manual mode.
An example is that in my system, the rpm is about 1800 in manual mode, confirmed with AGM and the internal smu fw scoreboard. But thefan1_inputshows about 180000, which is way more than the real value.
If you see the value from the metrics table is 0 on navi10, maybe it's the real rpm since we still have 0 rpm feature. I can double check the navi10.
Thanks.-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 2:47 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 10 lines · Alex Deucher
Quoted 8 lines · Alex Deucher
Quoted 6 lines · Kenneth Feng
fix the wrong fan speed in
fan1_inputwhen the fan control mode is manual. the fan speed value is not correct when we set manual mode tofan1_enalbe- 1. since the fan speed in the metrics table always reflects
the real fan speed,we can fetch the fan speed for both auto and manual mode.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Kenneth Feng <[email protected]>NACK. At least on the navi boards I have, the metrics table fan speed reads back 0 when the fan is in manual mode. That's why I changed this in the first place.
Nevermind, I was thinking about navi1x. If this is working correctly on sienna cichlid, please ignore me.
That said, I don't see why the current code should not work. Maybe a bug elsewhere? Is
smu_v11_0_get_fan_speed_rpm()incorrect for sienna cichlid?Alex
Quoted 65 lines
Alex
Quoted 61 lines
Alex
Quoted 57 lines
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt. c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt. c index
496abc31b07e..27b6cade9ade100644
---
a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt. c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ +++ppt.c(quoted diff) +3
-8@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data(smu, - METRICS_CURR_FANSPEED, - speed); - default: - return smu_v11_0_get_fan_speed_rpm(smu, speed); - } + return sienna_cichlid_get_smu_metrics_data(smu, + METRICS_CURR_FANSPEED, + speed); } static int sienna_cichlid_get_fan_parameters(struct
smu_context
*smu)
--
2.17.1_______________________________________________
amd-gfx mailing list [email protected]
https://nam11.safelinks.protection.outlook.com/?url=http
s%3A%252
F%25
2F lists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx& ;data=
04
%7 C01%7Ckenneth.feng%40amd.com%7Cd8e969f4b63e4897a3df08d87 5f1b05
0%
7C 3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6373890281906 09906%
7C
Un known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIi
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
LCJBTi
I6
Ik 1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KomP2H%2FadKJChDbN vNPQlT
ot
mE
WrhutsQCHfiRIjNUY%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
As I confirmed, this is Arcturus specific.
On Arcturus we don't have fan control feature and the fan speed is always 0 from the metrics table. For navi series, I'm sure we don't need it. Looks like we can't just revert it. Thanks.
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 1:19 PM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed in fan1_input
[CAUTION: External Email]
Quoted 12 lines · Alex Deucher
Quoted 10 lines · Alex Deucher
Quoted 7 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
The speed is not 0 in the below scenario if the rpm is got from the metrics table on navi10. The possibility is that you were using an old firmware. The
firmware on my system is0x002a3e00Can you remember the version when you saw the problem?
Quoted 4 lines
Quoted 1 line
SMC feature version: 0, firmware version:
0x002a3600Actually, I'm not sure. It might have been updated since the last time I tested this.
If you can confirm it's working on all the asics with the latest firmware, maybe it makes more sense to just revert this commit:
commit 3033e9f1c2de0eca89e9a98c7e307820f3fc953e
Author: Alex Deucher <[email protected]> Date: Thu Aug 27 00:12:38 2020 -0400
drm/amdgpu/swsmu: handle manual fan readback on SMU11
Need to read back from registers for manual mode rather than using the metrics table.
Alex
Quoted 263 lines
Alex
Quoted 259 lines
Alex
Quoted 256 lines
Thanks.
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1 109-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 11:28 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 5 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
After reboot, It is also not read back correctly as below.Quoted 13 lines
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:0 4:00.0 /hwmon/hwmon3/fan1_enable s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:0 4:00.0 /hwmon/hwmon3/fan1_input 183105 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:0 4:00.0 /hwmon/hwmon3/fan1_enable 1What about if you manually set the speed. E.g., # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:
00.0/hwmon/hwmon3/fan1_enable # echo 800 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:
00.0/hwmon/hwmon3/fan1_target # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:
00.0/hwmon/hwmon3/fan1_inputThe problem I ran into on navi1x was setting the fan speed manually resulted in 0 for the fan speed in the metrics table. E.g.,
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwmSee:
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2F
gitlab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1164&data=04 %7C01%7CKenneth.Feng%40amd.com%7C7b20871a843e41a5038408d8764a0d51% 7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637389407704795887%7C Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6 Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=2jEFoU62zbGIwEACv3C6xAmyNg IQ4q1kbBfNQ3Ztm7E%3D&reserved=0Alex
Quoted 178 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 10:18 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 34 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Navi10 also has this problem as below.# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_input 1217 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_enable 0 # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_enable # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_enable 1 s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_input 183105Quoted 1 line
In AGM, the rpm is 1800.
Does it read back correctly if you manually set the fan rpm first before reading it back?
Alex
Quoted 123 lines
-----Original Message-----
From: Feng, Kenneth
Sent: Thursday, October 22, 2020 9:11 AM
To: Alex Deucher <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: RE: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Right,smu_v11_0_get_fan_speed_rpm()is not correct for sienna cichlid when it's in manual mode.
An example is that in my system, the rpm is about 1800 in manual mode, confirmed with AGM and the internal smu fw scoreboard. But thefan1_inputshows about 180000, which is way more than the real value.
If you see the value from the metrics table is 0 on navi10, maybe it's the real rpm since we still have 0 rpm feature. I can double check the navi10.
Thanks.-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 2:47 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 10 lines · Alex Deucher
Quoted 8 lines · Alex Deucher
Quoted 6 lines · Kenneth Feng
fix the wrong fan speed in
fan1_inputwhen the fan control mode is manual. the fan speed value is not correct when we set manual mode tofan1_enalbe- 1. since the fan speed in the metrics table always reflects
the real fan speed,we can fetch the fan speed for both auto and manual mode.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Kenneth Feng <[email protected]>NACK. At least on the navi boards I have, the metrics table fan speed reads back 0 when the fan is in manual mode. That's why I changed this in the first place.
Nevermind, I was thinking about navi1x. If this is working correctly on sienna cichlid, please ignore me.
That said, I don't see why the current code should not work. Maybe a bug elsewhere? Is
smu_v11_0_get_fan_speed_rpm()incorrect for sienna cichlid?Alex
Quoted 65 lines
Alex
Quoted 61 lines
Alex
Quoted 57 lines
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt. c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt. c index
496abc31b07e..27b6cade9ade100644
---
a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt. c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ +++ppt.c(quoted diff) +3
-8@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data(smu, - METRICS_CURR_FANSPEED, - speed); - default: - return smu_v11_0_get_fan_speed_rpm(smu, speed); - } + return sienna_cichlid_get_smu_metrics_data(smu, + METRICS_CURR_FANSPEED, + speed); } static int sienna_cichlid_get_fan_parameters(struct
smu_context
*smu)
--
2.17.1_______________________________________________
amd-gfx mailing list [email protected]
https://nam11.safelinks.protection.outlook.com/?url=http
s%3A%252
F%25
2F lists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx& ;data=
04
%7 C01%7Ckenneth.feng%40amd.com%7Cd8e969f4b63e4897a3df08d87 5f1b05
0%
7C 3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6373890281906 09906%
7C
Un known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIi
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
LCJBTi
I6
Ik 1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KomP2H%2FadKJChDbN vNPQlT
ot
mE
WrhutsQCHfiRIjNUY%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 7 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
As I confirmed, this is Arcturus specific.
On Arcturus we don't have fan control feature and the fan speed is always 0 from the metrics table. For navi series, I'm sure we don't need it. Looks like we can't just revert it.
Ok, I guess we can just do a partial revert then.
Alex
Quoted 311 lines
Thanks.
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 1:19 PM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 12 lines · Alex Deucher
Quoted 10 lines · Alex Deucher
Quoted 7 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
The speed is not 0 in the below scenario if the rpm is got from the metrics table on navi10. The possibility is that you were using an old firmware. The
firmware on my system is0x002a3e00Can you remember the version when you saw the problem?Quoted 4 lines
Quoted 1 line
SMC feature version: 0, firmware version:
0x002a3600Actually, I'm not sure. It might have been updated since the last time I tested this.
If you can confirm it's working on all the asics with the latest firmware, maybe it makes more sense to just revert this commit:
commit
3033e9f1c2de0eca89e9a98c7e307820f3fc953eAuthor: Alex Deucher <[email protected]> Date: Thu Aug 27 00:12:38 2020 -0400drm/amdgpu/swsmu: handle manual fan readback on SMU11
Need to read back from registers for manual mode rather than using the metrics table.
Reviewed-by Evan Quan <[email protected]>Signed-off-by Alex Deucher <[email protected]>Alex
Quoted 263 lines
Alex
Quoted 259 lines
Alex
Quoted 256 lines
Thanks.
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1 109-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 11:28 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 5 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
After reboot, It is also not read back correctly as below.Quoted 13 lines
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:0 4:00.0 /hwmon/hwmon3/fan1_enable s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:0 4:00.0 /hwmon/hwmon3/fan1_input 183105 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:0 4:00.0 /hwmon/hwmon3/fan1_enable 1What about if you manually set the speed. E.g., # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:
00.0/hwmon/hwmon3/fan1_enable # echo 800 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:
00.0/hwmon/hwmon3/fan1_target # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:
00.0/hwmon/hwmon3/fan1_inputThe problem I ran into on navi1x was setting the fan speed manually resulted in 0 for the fan speed in the metrics table. E.g.,
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwmSee:
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2F
gitlab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1164&data=04 %7C01%7CKenneth.Feng%40amd.com%7C7b20871a843e41a5038408d8764a0d51% 7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637389407704795887%7C Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6 Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=2jEFoU62zbGIwEACv3C6xAmyNg IQ4q1kbBfNQ3Ztm7E%3D&reserved=0Alex
Quoted 178 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 10:18 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 34 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Navi10 also has this problem as below.# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_input 1217 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_enable 0 # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_enable # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_enable 1 s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_input 183105Quoted 1 line
In AGM, the rpm is 1800.
Does it read back correctly if you manually set the fan rpm first before reading it back?
Alex
Quoted 123 lines
-----Original Message-----
From: Feng, Kenneth
Sent: Thursday, October 22, 2020 9:11 AM
To: Alex Deucher <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: RE: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Right,smu_v11_0_get_fan_speed_rpm()is not correct for sienna cichlid when it's in manual mode.
An example is that in my system, the rpm is about 1800 in manual mode, confirmed with AGM and the internal smu fw scoreboard. But thefan1_inputshows about 180000, which is way more than the real value.
If you see the value from the metrics table is 0 on navi10, maybe it's the real rpm since we still have 0 rpm feature. I can double check the navi10.
Thanks.-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 2:47 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 10 lines · Alex Deucher
Quoted 8 lines · Alex Deucher
Quoted 6 lines · Kenneth Feng
fix the wrong fan speed in
fan1_inputwhen the fan control mode is manual. the fan speed value is not correct when we set manual mode tofan1_enalbe- 1. since the fan speed in the metrics table always reflects
the real fan speed,we can fetch the fan speed for both auto and manual mode.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Kenneth Feng <[email protected]>NACK. At least on the navi boards I have, the metrics table fan speed reads back 0 when the fan is in manual mode. That's why I changed this in the first place.
Nevermind, I was thinking about navi1x. If this is working correctly on sienna cichlid, please ignore me.
That said, I don't see why the current code should not work. Maybe a bug elsewhere? Is
smu_v11_0_get_fan_speed_rpm()incorrect for sienna cichlid?Alex
Quoted 65 lines
Alex
Quoted 61 lines
Alex
Quoted 57 lines
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt. c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt. c index
496abc31b07e..27b6cade9ade100644
---
a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt. c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ +++ppt.c(quoted diff) +3
-8@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data(smu, - METRICS_CURR_FANSPEED, - speed); - default: - return smu_v11_0_get_fan_speed_rpm(smu, speed); - } + return sienna_cichlid_get_smu_metrics_data(smu, + METRICS_CURR_FANSPEED, + speed); } static int sienna_cichlid_get_fan_parameters(struct
smu_context
*smu)
--
2.17.1_______________________________________________
amd-gfx mailing list [email protected]
https://nam11.safelinks.protection.outlook.com/?url=http
s%3A%252
F%25
2F lists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx& ;data=
04
%7 C01%7Ckenneth.feng%40amd.com%7Cd8e969f4b63e4897a3df08d87 5f1b05
0%
7C 3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6373890281906 09906%
7C
Un known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIi
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
LCJBTi
I6
Ik 1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KomP2H%2FadKJChDbN vNPQlT
ot
mE
WrhutsQCHfiRIjNUY%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 11 lines · Alex Deucher
Quoted 7 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
As I confirmed, this is Arcturus specific.
On Arcturus we don't have fan control feature and the fan speed is always 0 from the metrics table. For navi series, I'm sure we don't need it. Looks like we can't just revert it.Ok, I guess we can just do a partial revert then.
Most (all?) arcturus boards are fanless so that makes sense.
Alex
Quoted 315 lines
Alex
Quoted 311 lines
Thanks.
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 1:19 PM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 12 lines · Alex Deucher
Quoted 10 lines · Alex Deucher
Quoted 7 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
The speed is not 0 in the below scenario if the rpm is got from the metrics table on navi10. The possibility is that you were using an old firmware. The
firmware on my system is0x002a3e00Can you remember the version when you saw the problem?Quoted 4 lines
Quoted 1 line
SMC feature version: 0, firmware version:
0x002a3600Actually, I'm not sure. It might have been updated since the last time I tested this.
If you can confirm it's working on all the asics with the latest firmware, maybe it makes more sense to just revert this commit:
commit
3033e9f1c2de0eca89e9a98c7e307820f3fc953eAuthor: Alex Deucher <[email protected]> Date: Thu Aug 27 00:12:38 2020 -0400drm/amdgpu/swsmu: handle manual fan readback on SMU11
Need to read back from registers for manual mode rather than using the metrics table.
Reviewed-by Evan Quan <[email protected]>Signed-off-by Alex Deucher <[email protected]>Alex
Quoted 263 lines
Alex
Quoted 259 lines
Alex
Quoted 256 lines
Thanks.
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1 109-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 11:28 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 5 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
After reboot, It is also not read back correctly as below.Quoted 13 lines
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:0 4:00.0 /hwmon/hwmon3/fan1_enable s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:0 4:00.0 /hwmon/hwmon3/fan1_input 183105 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:0 4:00.0 /hwmon/hwmon3/fan1_enable 1What about if you manually set the speed. E.g., # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:
00.0/hwmon/hwmon3/fan1_enable # echo 800 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:
00.0/hwmon/hwmon3/fan1_target # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:
00.0/hwmon/hwmon3/fan1_inputThe problem I ran into on navi1x was setting the fan speed manually resulted in 0 for the fan speed in the metrics table. E.g.,
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwmSee:
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2F
gitlab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1164&data=04 %7C01%7CKenneth.Feng%40amd.com%7C7b20871a843e41a5038408d8764a0d51% 7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637389407704795887%7C Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6 Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=2jEFoU62zbGIwEACv3C6xAmyNg IQ4q1kbBfNQ3Ztm7E%3D&reserved=0Alex
Quoted 178 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 10:18 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 34 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Navi10 also has this problem as below.# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_input 1217 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_enable 0 # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_enable # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_enable 1 s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_input 183105Quoted 1 line
In AGM, the rpm is 1800.
Does it read back correctly if you manually set the fan rpm first before reading it back?
Alex
Quoted 123 lines
-----Original Message-----
From: Feng, Kenneth
Sent: Thursday, October 22, 2020 9:11 AM
To: Alex Deucher <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: RE: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Right,smu_v11_0_get_fan_speed_rpm()is not correct for sienna cichlid when it's in manual mode.
An example is that in my system, the rpm is about 1800 in manual mode, confirmed with AGM and the internal smu fw scoreboard. But thefan1_inputshows about 180000, which is way more than the real value.
If you see the value from the metrics table is 0 on navi10, maybe it's the real rpm since we still have 0 rpm feature. I can double check the navi10.
Thanks.-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 2:47 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 10 lines · Alex Deucher
Quoted 8 lines · Alex Deucher
Quoted 6 lines · Kenneth Feng
fix the wrong fan speed in
fan1_inputwhen the fan control mode is manual. the fan speed value is not correct when we set manual mode tofan1_enalbe- 1. since the fan speed in the metrics table always reflects
the real fan speed,we can fetch the fan speed for both auto and manual mode.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Kenneth Feng <[email protected]>NACK. At least on the navi boards I have, the metrics table fan speed reads back 0 when the fan is in manual mode. That's why I changed this in the first place.
Nevermind, I was thinking about navi1x. If this is working correctly on sienna cichlid, please ignore me.
That said, I don't see why the current code should not work. Maybe a bug elsewhere? Is
smu_v11_0_get_fan_speed_rpm()incorrect for sienna cichlid?Alex
Quoted 65 lines
Alex
Quoted 61 lines
Alex
Quoted 57 lines
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt. c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt. c index
496abc31b07e..27b6cade9ade100644
---
a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt. c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ +++ppt.c(quoted diff) +3
-8@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data(smu, - METRICS_CURR_FANSPEED, - speed); - default: - return smu_v11_0_get_fan_speed_rpm(smu, speed); - } + return sienna_cichlid_get_smu_metrics_data(smu, + METRICS_CURR_FANSPEED, + speed); } static int sienna_cichlid_get_fan_parameters(struct
smu_context
*smu)
--
2.17.1_______________________________________________
amd-gfx mailing list [email protected]
https://nam11.safelinks.protection.outlook.com/?url=http
s%3A%252
F%25
2F lists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx& ;data=
04
%7 C01%7Ckenneth.feng%40amd.com%7Cd8e969f4b63e4897a3df08d87 5f1b05
0%
7C 3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6373890281906 09906%
7C
Un known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIi
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
LCJBTi
I6
Ik 1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KomP2H%2FadKJChDbN vNPQlT
ot
mE
WrhutsQCHfiRIjNUY%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 7 lines · Alex Deucher
Quoted 5 lines · Alex Deucher
Quoted 3 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Hi Alex,
As I confirmed, this is Arcturus specific.
On Arcturus we don't have fan control feature and the fan speed is always 0 from the metrics table. For navi series, I'm sure we don't need it. Looks like we can't just revert it.Ok, I guess we can just do a partial revert then.
Most (all?) arcturus boards are fanless so that makes sense.
So we can probably just revert it.
Alex
Quoted 318 lines
Alex
Quoted 315 lines
Alex
Quoted 311 lines
Thanks.
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 1:19 PM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 12 lines · Alex Deucher
Quoted 10 lines · Alex Deucher
Quoted 7 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
The speed is not 0 in the below scenario if the rpm is got from the metrics table on navi10. The possibility is that you were using an old firmware. The
firmware on my system is0x002a3e00Can you remember the version when you saw the problem?Quoted 4 lines
Quoted 1 line
SMC feature version: 0, firmware version:
0x002a3600Actually, I'm not sure. It might have been updated since the last time I tested this.
If you can confirm it's working on all the asics with the latest firmware, maybe it makes more sense to just revert this commit:
commit
3033e9f1c2de0eca89e9a98c7e307820f3fc953eAuthor: Alex Deucher <[email protected]> Date: Thu Aug 27 00:12:38 2020 -0400drm/amdgpu/swsmu: handle manual fan readback on SMU11
Need to read back from registers for manual mode rather than using the metrics table.
Reviewed-by Evan Quan <[email protected]>Signed-off-by Alex Deucher <[email protected]>Alex
Quoted 263 lines
Alex
Quoted 259 lines
Alex
Quoted 256 lines
Thanks.
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1 109-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 11:28 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 5 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
After reboot, It is also not read back correctly as below.Quoted 13 lines
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:0 4:00.0 /hwmon/hwmon3/fan1_enable s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:0 4:00.0 /hwmon/hwmon3/fan1_input 183105 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:0 4:00.0 /hwmon/hwmon3/fan1_enable 1What about if you manually set the speed. E.g., # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:
00.0/hwmon/hwmon3/fan1_enable # echo 800 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:
00.0/hwmon/hwmon3/fan1_target # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04:
00.0/hwmon/hwmon3/fan1_inputThe problem I ran into on navi1x was setting the fan speed manually resulted in 0 for the fan speed in the metrics table. E.g.,
# echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1_enable # echo 125 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwm1 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000:04: 00.0/hwmon/hwmon3/pwmSee:
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2F
gitlab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1164&data=04 %7C01%7CKenneth.Feng%40amd.com%7C7b20871a843e41a5038408d8764a0d51% 7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637389407704795887%7C Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6 Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=2jEFoU62zbGIwEACv3C6xAmyNg IQ4q1kbBfNQ3Ztm7E%3D&reserved=0Alex
Quoted 178 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 10:18 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 34 lines · Kenneth
[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Navi10 also has this problem as below.# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_input 1217 # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_enable 0 # echo 1 > devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_enable # cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_enable 1 s# cat devices/pci0000:00/0000:00:01.1/0000:02:00.0/0000:03:00.0/0000 :04:00 .0 /hwmon/hwmon3/fan1_input 183105Quoted 1 line
In AGM, the rpm is 1800.
Does it read back correctly if you manually set the fan rpm first before reading it back?
Alex
Quoted 123 lines
-----Original Message-----
From: Feng, Kenneth
Sent: Thursday, October 22, 2020 9:11 AM
To: Alex Deucher <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: RE: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[AMD Official Use Only - Internal Distribution Only]
Hi Alex,
Right,smu_v11_0_get_fan_speed_rpm()is not correct for sienna cichlid when it's in manual mode.
An example is that in my system, the rpm is about 1800 in manual mode, confirmed with AGM and the internal smu fw scoreboard. But thefan1_inputshows about 180000, which is way more than the real value.
If you see the value from the metrics table is 0 on navi10, maybe it's the real rpm since we still have 0 rpm feature. I can double check the navi10.
Thanks.-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 22, 2020 2:47 AM
To: Feng, Kenneth <[email protected]>
Cc: amd-gfx list <[email protected]>; Gao, Likun <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: fix the wrong fan speed infan1_input[CAUTION: External Email]
Quoted 10 lines · Alex Deucher
Quoted 8 lines · Alex Deucher
Quoted 6 lines · Kenneth Feng
fix the wrong fan speed in
fan1_inputwhen the fan control mode is manual. the fan speed value is not correct when we set manual mode tofan1_enalbe- 1. since the fan speed in the metrics table always reflects
the real fan speed,we can fetch the fan speed for both auto and manual mode.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Kenneth Feng <[email protected]>NACK. At least on the navi boards I have, the metrics table fan speed reads back 0 when the fan is in manual mode. That's why I changed this in the first place.
Nevermind, I was thinking about navi1x. If this is working correctly on sienna cichlid, please ignore me.
That said, I don't see why the current code should not work. Maybe a bug elsewhere? Is
smu_v11_0_get_fan_speed_rpm()incorrect for sienna cichlid?Alex
Quoted 65 lines
Alex
Quoted 61 lines
Alex
Quoted 57 lines
--- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt. c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt. c index
496abc31b07e..27b6cade9ade100644
---
a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt. c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ +++ppt.c(quoted diff) +3
-8@@ -1171,14 +1171,9 @@ static int sienna_cichlid_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 sienna_cichlid_get_smu_metrics_data(smu, - METRICS_CURR_FANSPEED, - speed); - default: - return smu_v11_0_get_fan_speed_rpm(smu, speed); - } + return sienna_cichlid_get_smu_metrics_data(smu, + METRICS_CURR_FANSPEED, + speed); } static int sienna_cichlid_get_fan_parameters(struct
smu_context
*smu)
--
2.17.1_______________________________________________
amd-gfx mailing list [email protected]
https://nam11.safelinks.protection.outlook.com/?url=http
s%3A%252
F%25
2F lists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx& ;data=
04
%7 C01%7Ckenneth.feng%40amd.com%7Cd8e969f4b63e4897a3df08d87 5f1b05
0%
7C 3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6373890281906 09906%
7C
Un known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIi
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
LCJBTi
I6
Ik 1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KomP2H%2FadKJChDbN vNPQlT
ot
mE
WrhutsQCHfiRIjNUY%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx