From: Mikko Perttunen <mperttunen@nvidia.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>,
Thierry Reding <thierry.reding@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>,
stable@vger.kernel.org
Cc: Svyatoslav Ryhel <clamor95@gmail.com>,
linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Patrick Fischer <admin@tsv-stahl-riesa.de>,
admin@tsv-stahl-riesa.de
Subject: Re: [PATCH 1/2] thermal: tegra: soctherm-fuse: Fix shifted_cp extension
Date: Thu, 26 Nov 2026 17:13:41 +0900 [thread overview]
Message-ID: <JfN0BOneRLm5hD336qlZ3Q@nvidia.com> (raw)
In-Reply-To: <20261106-upstream-soctherm-t114-v1-1-c875d1921084@tsv-stahl-riesa.de>
On Saturday, November 7, 2026 5:31 AM Patrick Fischer via B4 Relay wrote:
> From: Svyatoslav Ryhel <clamor95@gmail.com>
>
> The shifted_cp value in tegra_calc_shared_calib() should be passed to
> sign_extend32() similarly to how shifted_ft is handled. This omission
> caused malfunctions in the GPU and memory thermal zones, which was
> observed on the Tegratab.
>
> Tegra124, Tegra132 and Tegra210 are not affected: SHIFT_CP is in the
> low six bits of their fuse word, so sign-extending the whole word gives
> the same result. Only Tegra114 has SHIFT_CP in bits [15:10].
>
> Fixes: 48fc33b95159 ("thermal/drivers/tegra/soctherm-fuse: Prepare calibration for Tegra114 support")
> Cc: stable@vger.kernel.org
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> Signed-off-by: Patrick Fischer <admin@tsv-stahl-riesa.de>
> ---
> drivers/thermal/tegra/soctherm-fuse.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/tegra/soctherm-fuse.c b/drivers/thermal/tegra/soctherm-fuse.c
> index 8d37cd8c9122..2de1d0cb676e 100644
> --- a/drivers/thermal/tegra/soctherm-fuse.c
> +++ b/drivers/thermal/tegra/soctherm-fuse.c
> @@ -102,7 +102,7 @@ int tegra_calc_shared_calib(const struct tegra_soctherm_fuse *tfuse,
>
> shifted_cp = (val & tfuse->fuse_shift_cp_mask) >>
> tfuse->fuse_shift_cp_shift;
> - shifted_cp = sign_extend32(val, 5);
> + shifted_cp = sign_extend32(shifted_cp, 5);
>
> shared->actual_temp_cp = 2 * NOMINAL_CALIB_CP + shifted_cp;
> shared->actual_temp_ft = 2 * tfuse->nominal_calib_ft + shifted_ft;
>
> --
> 2.56.0
>
>
>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
next prev parent reply other threads:[~2026-11-26 8:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 20:31 [PATCH 0/2] thermal: tegra: Fix SOC_THERM temperatures on Tegra114 Patrick Fischer via B4 Relay
2026-11-06 20:31 ` Patrick Fischer
2026-11-06 20:31 ` [PATCH 1/2] thermal: tegra: soctherm-fuse: Fix shifted_cp extension Patrick Fischer via B4 Relay
2026-11-06 20:31 ` Patrick Fischer
2026-11-26 8:13 ` Mikko Perttunen [this message]
2026-11-06 20:31 ` [PATCH 2/2] thermal/drivers/tegra: Avoid SOC_THERM calculation overflow on Tegra114 Patrick Fischer via B4 Relay
2026-11-06 20:31 ` Patrick Fischer
2026-11-07 10:17 ` Svyatoslav Ryhel
2026-11-26 10:27 ` Mikko Perttunen
2026-11-22 10:21 ` [PATCH 0/2] thermal: tegra: Fix SOC_THERM temperatures " Patrick Fischer
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=JfN0BOneRLm5hD336qlZ3Q@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.