mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] thermal/drivers/tegra/soctherm: Program throttrip with hot trip temperature
@ 2026-10-20 19:18 Patrick Fischer via B4 Relay
  2026-10-21  2:04 ` Mikko Perttunen
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick Fischer via B4 Relay @ 2026-10-20 19:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano, Thierry Reding, Jonathan Hunter
  Cc: Zhang Rui, Lukasz Luba, linux-pm, linux-tegra, linux-kernel,
	Svyatoslav Ryhel, stable, Patrick Fischer

From: Patrick Fischer <admin@tsv-stahl-riesa.de>

tegra_soctherm_set_hwtrips() is supposed to program the hardware
throttle trip (throttrip) with the temperature of the thermal zone's
hot trip point. Since commit 735a968d2fea ("thermal/drivers/tegra: Use
generic thermal_zone_get_trip() function"), get_hot_temp() only looks
up the hot trip and no longer stores its temperature, and the later
conversion to get_hot_trip() kept that behaviour. throttrip_program()
is therefore called with the value still left in 'temperature', which
is the thermtrip or critical temperature that was just used for
thermtrip_program().

As a result, hardware throttling only starts at the shutdown
temperature instead of at the hot trip. On the NVIDIA Tegra Note 7
(P1640, Tegra114), where tegra114.dtsi defines the hot trips at 100 C
and the critical trips at 102 C, soctherm reports:

  throttrip: will throttle when cpu reaches 102000 mC

instead of 100000 mC. Svyatoslav Ryhel observed the same on the ASUS
Transformer Pad TF701T (Tegra114) and the Xiaomi Mi Pad (Tegra124).
All boards using soctherm with a hot trip bound to a throttle cooling
device are affected.

Use the temperature of the hot trip for throttrip_program() again.

Fixes: 735a968d2fea ("thermal/drivers/tegra: Use generic thermal_zone_get_trip() function")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Tested-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Patrick Fischer <admin@tsv-stahl-riesa.de>
---
 drivers/thermal/tegra/soctherm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c
index f74acf13b24d..903215502606 100644
--- a/drivers/thermal/tegra/soctherm.c
+++ b/drivers/thermal/tegra/soctherm.c
@@ -765,6 +765,8 @@ static int tegra_soctherm_set_hwtrips(struct device *dev,
 		return 0;
 	}
 
+	temperature = hot_trip->temperature;
+
 	for (i = 0; i < THROTTLE_OC1; i++) {
 		struct thermal_cooling_device *cdev;
 

---
base-commit: f47d223627f80cb7a1eb14c585fe6cb35de5e984
change-id: 20261020-upstream-soctherm-throttrip-ad6965977b6c

Best regards,
--  
Patrick Fischer <admin@tsv-stahl-riesa.de>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-21  2:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-20 19:18 [PATCH] thermal/drivers/tegra/soctherm: Program throttrip with hot trip temperature Patrick Fischer via B4 Relay
2026-10-21  2:04 ` Mikko Perttunen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®