LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Thara Gopinath <thara.gopinath@linaro.org>
To: Daniel Lezcano <daniel.lezcano@linaro.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: agross@kernel.org, rui.zhang@intel.com, viresh.kumar@linaro.org,
	rjw@rjwysocki.net, robh+dt@kernel.org, steev@kali.org,
	tdas@codeaurora.org, mka@chromium.org,
	linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [Patch v5 2/6] thermal: qcom: Add support for LMh driver
Date: Tue, 31 Aug 2021 10:52:27 -0400	[thread overview]
Message-ID: <299e2a59-ae4e-278d-200d-630f055c1411@linaro.org> (raw)
In-Reply-To: <a216c89d-6cd5-326d-f203-f48caaf2a096@linaro.org>



On 8/23/21 11:57 AM, Daniel Lezcano wrote:
> 
> Hi Bjorn,
> 
> On 23/08/2021 17:05, Bjorn Andersson wrote:
>> On Sat 21 Aug 02:41 PDT 2021, Daniel Lezcano wrote:
>>
>>>
>>> Hi Thara,
>>>
>>> On 09/08/2021 21:16, Thara Gopinath wrote:
>>>> Driver enabling various pieces of Limits Management Hardware(LMh) for cpu
>>>> cluster0 and cpu cluster1 namely kick starting monitoring of temperature,
>>>> current, battery current violations, enabling reliability algorithm and
>>>> setting up various temperature limits.
>>>>
>>>> The following has been explained in the cover letter. I am including this
>>>> here so that this remains in the commit message as well.
>>>>
>>>> LMh is a hardware infrastructure on some Qualcomm SoCs that can enforce
>>>> temperature and current limits as programmed by software for certain IPs
>>>> like CPU. On many newer LMh is configured by firmware/TZ and no programming
>>>> is needed from the kernel side. But on certain SoCs like sdm845 the
>>>> firmware does not do a complete programming of the h/w. On such soc's
>>>> kernel software has to explicitly set up the temperature limits and turn on
>>>> various monitoring and enforcing algorithms on the hardware.
>>>>
>>>> Tested-by: Steev Klimaszewski <steev@kali.org> # Lenovo Yoga C630
>>>> Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
>>>
>>> Is it possible to have an option to disable/enable the LMh driver at
>>> runtime, for instance with a module parameter ?
>>>
>>
>> Are you referring to being able to disable the hardware throttling, or
>> the driver's changes to thermal pressure?
> 
> The former.

Hi Daniel,

It is not recommended to turn off LMh once enabled. From h/w point of 
view, it can be done for debug purposes but it is not to be implemented 
as a feature.


> 
>> I'm not aware of any way to disable the hardware. I do remember that
>> there was some experiments done (with a hacked up boot chain) early on
>> and iirc it was concluded that it's not a good idea.
> 
> My objective was to test the board with the thermal framework handling
> the mitigation instead of the hardware.
> 
> I guess I can set the hardware temperature higher than the thermal zone
> temperature.

Right. Also remember that  patch 5 in this series removes the cooling 
devices for the cpu thermal zones. So if you are testing this you will 
have to add them back.

> 
> On which sensor the lmh does refer to ? The cluster one ?
> 
> (by the way the thermal zone temperatures per core are lower by 5°C than
> the hardware mitigation ? is it done on purpose ?)


So IIUC, it refers to tsens for individual cpus and collates the input. 
But the documentation is not clear on this one. I took the mitigation 
temperature from downstream code. Yes I did realize that the thermal 
zone trip1 temp is 90 degree where as the LMh mitigation point is 95 
degree. My thinking is this is because the h/w mitigation can happen 
faster than s/w and hence the 5 degree bump up in temperature.

> 
>> Either way, if there is a way and there is a use for it, we can always
>> add such parameter incrementally. So I suggest that we merge this as is.
> 
> Yes, that was for my information. It is already merged.

Thank you very much

> 
> Thanks
> 
>    -- Daniel
> 

-- 
Warm Regards
Thara (She/Her/Hers)

  reply	other threads:[~2021-08-31 14:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09 19:15 [Patch v5 0/6] Introduce LMh driver for Qualcomm SoCs Thara Gopinath
2021-08-09 19:15 ` [Patch v5 1/6] firmware: qcom_scm: Introduce SCM calls to access LMh Thara Gopinath
2021-08-17 13:17   ` Daniel Lezcano
2021-08-17 14:07     ` Bjorn Andersson
2021-08-17 14:08       ` Daniel Lezcano
2021-08-09 19:16 ` [Patch v5 2/6] thermal: qcom: Add support for LMh driver Thara Gopinath
2021-08-21  9:41   ` Daniel Lezcano
2021-08-23 15:05     ` Bjorn Andersson
2021-08-23 15:57       ` Daniel Lezcano
2021-08-31 14:52         ` Thara Gopinath [this message]
2021-08-09 19:16 ` [Patch v5 3/6] cpufreq: qcom-cpufreq-hw: Add dcvs interrupt support Thara Gopinath
2021-08-10  2:47   ` Viresh Kumar
2021-08-11 11:27     ` Thara Gopinath
2021-08-18  3:37   ` Viresh Kumar
2021-08-09 19:16 ` [Patch v5 4/6] arm64: dts: qcom: sdm45: Add support for LMh node Thara Gopinath
2021-08-09 19:16 ` [Patch v5 5/6] arm64: dts: qcom: sdm845: Remove cpufreq cooling devices for CPU thermal zones Thara Gopinath
2021-08-09 19:16 ` [Patch v5 6/6] dt-bindings: thermal: Add dt binding for QCOM LMh Thara Gopinath
2021-08-09 19:16 ` Thara Gopinath
2021-08-17 18:56   ` Rob Herring

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=299e2a59-ae4e-278d-200d-630f055c1411@linaro.org \
    --to=thara.gopinath@linaro.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=rjw@rjwysocki.net \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=steev@kali.org \
    --cc=tdas@codeaurora.org \
    --cc=viresh.kumar@linaro.org \
    --subject='Re: [Patch v5 2/6] thermal: qcom: Add support for LMh driver' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).