thermal/intel/intel_soc_dts_iosf: Fix reporting wrong temperatures
Subsystems (2)
PATCH 1/1 thermal/intel/intel_soc_dts_iosf: Fix reporting wrong temperatures
Since commit 955fb8719efb ("thermal/intel/intel_soc_dts_iosf: Use Intel TCC library") intel_soc_dts_iosf is reporting the wrong temperature.
The driver expects tj_max to be in milli-degrees-celcius but after the switch to the TCC library this is now in degrees celcius so instead of e.g. 90000 it is set to 90 causing a temperature 45 degrees below tj_max to be reported as -44910 milli-degrees instead of as 45000 milli-degrees.
Fix this by adding back the lost factor of 1000.
---
Note reported by private email, so no Closes: tag
--- drivers/thermal/intel/intel_soc_dts_iosf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/intel/intel_soc_dts_iosf.c +1 -1
@@ -398,7 +398,7 @@ struct intel_soc_dts_sensors *intel_soc_dts_iosf_init(spin_lock_init (&sensors->intr_notify_lock);mutex_init (&sensors->dts_update_lock); sensors->intr_type = intr_type; - sensors->tj_max = tj_max; + sensors->tj_max = tj_max *1000 ;if (intr_type ==INTEL_SOC_DTS_INTERRUPT_NONE ) notification = false;else
Signature · 1 line
2.40.1
Quoted 10 lines · Hans de Goede
Since commit
955fb8719efb("thermal/intel/intel_soc_dts_iosf: Use Intel
TCC library")intel_soc_dts_iosfis reporting the wrong temperature.The driver expects
tj_maxto be in milli-degrees-celcius but after the switch to the TCC library this is now in degrees celcius so instead of e.g. 90000 it is set to 90 causing a temperature 45 degrees belowtj_maxto be reported as -44910 milli-degrees instead of as 45000 milli-degrees.
Quoted 8 lines
Fix this by adding back the lost factor of 1000.
Fixes 955fb8719efb ("thermal/intel/intel_soc_dts_iosf: Use Intel TCClibrary")
Reported-by Bernhard Krug <[email protected]>Cc Zhang Rui <[email protected]>Signed-off-by Hans de Goede <[email protected]>
thanks,
rui
Quoted 21 lines
---
Note reported by private email, so no Closes: tag
---
drivers/thermal/intel/intel_soc_dts_iosf.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/thermal/intel/intel_soc_dts_iosf.c +1
-1@@ -398,7 +398,7 @@ struct intel_soc_dts_sensors *intel_soc_dts_iosf_init ( spin_lock_init(&sensors->intr_notify_lock); mutex_init(&sensors->dts_update_lock); sensors->intr_type = intr_type; - sensors->tj_max = tj_max; + sensors->tj_max = tj_max * 1000; if (intr_type == INTEL_SOC_DTS_INTERRUPT_NONE) notification = false;else
Quoted 14 lines · Rui
Quoted 12 lines · Hans de Goede
Since commit
955fb8719efb("thermal/intel/intel_soc_dts_iosf: Use Intel
TCC library")intel_soc_dts_iosfis reporting the wrong temperature.The driver expects
tj_maxto be in milli-degrees-celcius but after the switch to the TCC library this is now in degrees celcius so instead of e.g. 90000 it is set to 90 causing a temperature 45 degrees belowtj_maxto be reported as -44910 milli-degrees instead of as 45000 milli-degrees.Fix this by adding back the lost factor of 1000.
Quoted 8 lines
Quoted 6 lines
Fixes 955fb8719efb ("thermal/intel/intel_soc_dts_iosf: Use Intel TCClibrary")
Reported-by Bernhard Krug <[email protected]>Cc Zhang Rui <[email protected]>Signed-off-by Hans de Goede <[email protected]>Acked-by Zhang Rui <[email protected]>
Applied as 6.4-rc material, thanks!
Quoted 22 lines
Quoted 21 lines
---
Note reported by private email, so no Closes: tag--- drivers/thermal/intel/intel_soc_dts_iosf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/thermal/intel/intel_soc_dts_iosf.c +1
-1@@ -398,7 +398,7 @@ struct intel_soc_dts_sensors *intel_soc_dts_iosf_init ( spin_lock_init(&sensors->intr_notify_lock);mutex_init (&sensors->dts_update_lock); sensors->intr_type = intr_type; - sensors->tj_max = tj_max; + sensors->tj_max = tj_max *1000 ;if (intr_type ==INTEL_SOC_DTS_INTERRUPT_NONE ) notification = false;else