Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Mikko Perttunen <mperttunen@nvidia.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@kernel.org>,
	Thierry Reding <thierry.reding@kernel.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	stable@vger.kernel.org
Cc: Zhang Rui <rui.zhang@intel.com>,
	Lukasz Luba <lukasz.luba@arm.com>,
	linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Svyatoslav Ryhel <clamor95@gmail.com>,
	stable@vger.kernel.org,
	Patrick Fischer <admin@tsv-stahl-riesa.de>,
	admin@tsv-stahl-riesa.de
Subject: Re: [PATCH] thermal/drivers/tegra/soctherm: Program throttrip with hot trip temperature
Date: Wed, 21 Oct 2026 11:04:50 +0900	[thread overview]
Message-ID: <5z1T3MJbRUWQUClLWuCCnw@nvidia.com> (raw)
In-Reply-To: <20261020-upstream-soctherm-throttrip-v1-1-c67f8a02ec3b@tsv-stahl-riesa.de>

On Wednesday, October 21, 2026 4:18 AM Patrick Fischer via B4 Relay wrote:
> 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>
> 
> 
> 

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>




      reply	other threads:[~2026-10-21  2:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5z1T3MJbRUWQUClLWuCCnw@nvidia.com \
    --to=mperttunen@nvidia.com \
    --cc=admin@tsv-stahl-riesa.de \
    --cc=clamor95@gmail.com \
    --cc=daniel.lezcano@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=thierry.reding@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox