From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: neil.armstrong@linaro.org, Bjorn Andersson <andersson@kernel.org>
Cc: Konrad Dybcio <konradybcio@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] arm64: dts: qcom: sm8650: setup cpu thermal with idle on high temperatures
Date: Thu, 9 Jan 2025 16:18:50 +0100 [thread overview]
Message-ID: <66754bb1-44cf-4f22-af7b-450d4fede20a@oss.qualcomm.com> (raw)
In-Reply-To: <2fcd9a10-ae9e-480f-87a1-5b49e5082ef5@linaro.org>
On 8.01.2025 10:15 AM, Neil Armstrong wrote:
> On 08/01/2025 04:11, Bjorn Andersson wrote:
>> On Tue, Jan 07, 2025 at 09:13:18AM +0100, Neil Armstrong wrote:
>>> Hi,
>>>
>>> On 07/01/2025 00:39, Bjorn Andersson wrote:
>>>> On Fri, Jan 03, 2025 at 03:38:26PM +0100, Neil Armstrong wrote:
>>>>> On the SM8650, the dynamic clock and voltage scaling (DCVS) is done in an
>>>>> hardware controlled loop using the LMH and EPSS blocks with constraints and
>>>>> OPPs programmed in the board firmware.
>>>>>
>>>>> Since the Hardware does a better job at maintaining the CPUs temperature
>>>>> in an acceptable range by taking in account more parameters like the die
>>>>> characteristics or other factory fused values, it makes no sense to try
>>>>> and reproduce a similar set of constraints with the Linux cpufreq thermal
>>>>> core.
>>>>>
>>>>> In addition, the tsens IP is responsible for monitoring the temperature
>>>>> across the SoC and the current settings will heavily trigger the tsens
>>>>> UP/LOW interrupts if the CPU temperatures reaches the hardware thermal
>>>>> constraints which are currently defined in the DT. And since the CPUs
>>>>> are not hooked in the thermal trip points, the potential interrupts and
>>>>> calculations are a waste of system resources.
>>>>>
>>>>> Instead, set higher temperatures in the CPU trip points, and hook some CPU
>>>>> idle injector with a 100% duty cycle at the highest trip point in the case
>>>>> the hardware DCVS cannot handle the temperature surge, and try our best to
>>>>> avoid reaching the critical temperature trip point which should trigger an
>>>>> inevitable thermal shutdown.
>>>>>
>>>>
>>>> Are you able to hit these higher temperatures? Do you have some test
>>>> case where the idle-injection shows to be successful in blocking us from
>>>> reaching the critical temp?
>>>
>>> No, I've been able to test idle-injection and observed a noticeable effect
>>> but I had to set lower trip, do you know how I can easily "block" LMH/EPSS from
>>> scaling down and let the temp go higher ?
>>>
>>
>> I don't know how to override that configuration.
I'll try to get some answers. SDM845 seems to expose a couple SCM calls for
this purpose and it's already wired up in drivers/thermal/qcom/lmh.c
>>>> E.g. in X13s (SC8280XP) we opted for relying on LMH/EPSS and define only
>>>> the critical trip for when the hardware fails us.
>>>
>>> It's the goal here aswell
>>>
>>
>> How about simplifying the patch by removing the idle-injection step and
>> just rely on LMH/EPSS and the "critical" trip (at least until someone
>> can prove that there's value in the extra mitigation)?
>
> OK, but I see value in this idle injection mitigation in that case LMH/EPSS
> fails, the only factor in control of HLOS is by stopping scheduling tasks
> since frequency won't be able to scale anymore.
If LMH fails, your SoC is probably cooked already, anyway :(
I'm not sure why idle injection isn't enabled by default if no other cooling
methods are found. Perhaps that could be discussed with some thermal folks..
> Anyway, I agree it can be added later on, so should I drop the 2 trip points
> and only leave the critical one ?
I think sticking with critical=Tjmax + critical-action = "reboot" may be the
way to go here.
We may want to give some folks a heads up, so they can wire up skin sensors
on their devices ahead of these changes landing tree-wide.
Konrad
next prev parent reply other threads:[~2025-01-09 15:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-03 14:38 [PATCH 0/2] arm64: dts: qcom: sm8650: rework CPU & GPU thermal zones Neil Armstrong
2025-01-03 14:38 ` [PATCH 1/2] arm64: dts: qcom: sm8650: setup cpu thermal with idle on high temperatures Neil Armstrong
2025-01-06 23:39 ` Bjorn Andersson
2025-01-07 8:13 ` Neil Armstrong
2025-01-08 3:11 ` Bjorn Andersson
2025-01-08 9:15 ` Neil Armstrong
2025-01-09 15:18 ` Konrad Dybcio [this message]
2025-01-10 9:41 ` neil.armstrong
2025-01-09 21:01 ` Bjorn Andersson
2025-01-10 9:40 ` Neil Armstrong
2025-01-03 14:38 ` [PATCH 2/2] arm64: dts: qcom: sm8650: setup gpu thermal with higher temperatures Neil Armstrong
2025-01-03 20:00 ` Rob Clark
2025-01-06 9:02 ` Neil Armstrong
2025-01-03 14:43 ` [PATCH 0/2] arm64: dts: qcom: sm8650: rework CPU & GPU thermal zones Konrad Dybcio
2025-01-03 14:49 ` Neil Armstrong
2025-01-09 15:20 ` Konrad Dybcio
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=66754bb1-44cf-4f22-af7b-450d4fede20a@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=robh@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