linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH RFT v2 01/14] dt-bindings: clock: qcom,rpmcc: Add a way to enable unused clock cleanup
Date: Thu, 20 Apr 2023 13:58:11 +0530	[thread overview]
Message-ID: <20230420082811.GA6308@thinkpad> (raw)
In-Reply-To: <20230303-topic-rpmcc_sleep-v2-1-ae80a325fe94@linaro.org>

On Wed, Mar 08, 2023 at 10:35:17PM +0100, Konrad Dybcio wrote:
> Disabling RPMCC clocks can be a bit touchy. If we can't guarantee all
> (or at least most) of the oneline peripherals ask the interconnect
> framework to keep their buses online and guarantee enough bandwidth,
> we're relying on bootloader defaults to keep the said buses alive through
> RPM requests and rate setting on RPM clocks.
> 
> Without that in place, the RPM clocks are never enabled in the CCF, which
> qualifies them to be cleaned up, since - as far as Linux is concerned -
> nobody's using them and they're just wasting power. Doing so will end
> tragically, as within miliseconds we'll get *some* access attempt on an
> unlocked bus which will cause a platform crash.
> 
> On the other hand, if we want to save power and put well-supported
> platforms to sleep, we should be shutting off at least some of these
> clocks (this time with a clear distinction of which ones are *actually*
> not in use, coming from the interconnect driver).
> 
> To differentiate between these two cases while not breaking older DTs,
> introduce an opt-in property to correctly mark RPM clocks as enabled
> after handoff (the initial max freq vote) and hence qualify them for the
> common unused clock cleanup.
> 

My 2 cents here...

First, this property doesn't belong in DT at all as it is OS specific handling.
This leaves us with the option of using a cmdline or module params for rmpcc.
But we already have one (clk_ignore_unused), so the platforms making use of old
DTB's should use that instead.

And that get's rid of the debate that when you start disabling rpmcc clocks, old
platforms will break. I don't see a valid point to keep the old platforms alive
since their DTB (firmware) is broken already. So either they have to fix the DTB
or use a cmdline option.

- Mani

> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml b/Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml
> index 2a95bf8664f9..386153f61971 100644
> --- a/Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml
> +++ b/Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml
> @@ -58,6 +58,12 @@ properties:
>      minItems: 1
>      maxItems: 2
>  
> +  qcom,clk-disable-unused:
> +    type: boolean
> +    description:
> +      Indicates whether unused RPM clocks can be shut down with the common
> +      unused clock cleanup. Requires a functional interconnect driver.
> +
>  required:
>    - compatible
>    - '#clock-cells'
> 
> -- 
> 2.39.2
> 

-- 
மணிவண்ணன் சதாசிவம்

  parent reply	other threads:[~2023-04-20  8:28 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-08 21:35 [PATCH RFT v2 00/14] SMD RPMCC sleep preparations Konrad Dybcio
2023-03-08 21:35 ` [PATCH RFT v2 01/14] dt-bindings: clock: qcom,rpmcc: Add a way to enable unused clock cleanup Konrad Dybcio
2023-03-16 22:58   ` Rob Herring
2023-03-17  0:31     ` Konrad Dybcio
2023-03-17 18:20       ` Stephen Boyd
2023-04-06 14:44         ` Konrad Dybcio
2023-04-07 20:17           ` Konrad Dybcio
2023-04-11 21:34             ` Konrad Dybcio
2023-03-22  3:23   ` Bjorn Andersson
2023-04-17 19:05   ` Stephan Gerhold
2023-04-18  0:19     ` Stephen Boyd
2023-04-18 10:33       ` Konrad Dybcio
2023-04-19 11:31         ` Konrad Dybcio
2023-04-19 14:00           ` Stephan Gerhold
2023-04-19 21:08             ` Konrad Dybcio
2023-04-20  8:28   ` Manivannan Sadhasivam [this message]
2023-03-08 21:35 ` [PATCH RFT v2 02/14] clk: qcom: smd-rpm: Add .is_enabled hook Konrad Dybcio
2023-03-09  0:47   ` Dmitry Baryshkov
2023-03-22  3:02   ` Bjorn Andersson
2023-04-06 14:43     ` Konrad Dybcio
2023-03-08 21:35 ` [PATCH RFT v2 03/14] clk: qcom: smd-rpm: Add .is_prepared hook Konrad Dybcio
2023-03-09  0:48   ` Dmitry Baryshkov
2023-03-08 21:35 ` [PATCH RFT v2 04/14] clk: qcom: smd-rpm_ Make __DEFINE_CLK_SMD_RPM_BRANCH_PREFIX accept flags Konrad Dybcio
2023-03-09  0:48   ` Dmitry Baryshkov
2023-03-08 21:35 ` [PATCH RFT v2 05/14] clk: qcom: smd-rpm: Make DEFINE_CLK_SMD_RPM_BRANCH_A " Konrad Dybcio
2023-03-09  0:49   ` Dmitry Baryshkov
2023-03-08 21:35 ` [PATCH RFT v2 06/14] clk: qcom: smd-rpm: Make BI_TCXO_AO critical Konrad Dybcio
2023-03-09  0:49   ` Dmitry Baryshkov
2023-03-08 21:35 ` [PATCH RFT v2 07/14] clk: qcom: smd-rpm: Make __DEFINE_CLK_SMD_RPM_PREFIX accept flags Konrad Dybcio
2023-03-09  0:50   ` Dmitry Baryshkov
2023-03-08 21:35 ` [PATCH RFT v2 08/14] clk: qcom: smd-rpm: Separate out a macro for defining an AO clock Konrad Dybcio
2023-03-09  0:50   ` Dmitry Baryshkov
2023-03-08 21:35 ` [PATCH RFT v2 09/14] clk: qcom: smd-rpm: Add support for keepalive votes Konrad Dybcio
2023-03-09  0:54   ` Dmitry Baryshkov
2023-03-09  1:22     ` Konrad Dybcio
2023-03-08 21:35 ` [PATCH RFT v2 10/14] clk: qcom: smd-rpm: Introduce DEFINE_CLK_SMD_RPM_BUS_KEEPALIVE Konrad Dybcio
2023-03-09  1:25   ` Dmitry Baryshkov
2023-03-08 21:35 ` [PATCH RFT v2 11/14] clk: qcom: smd-rpm: Hook up PCNoC_0 keep_alive Konrad Dybcio
2023-03-09  1:25   ` Dmitry Baryshkov
2023-03-22  3:19   ` Bjorn Andersson
2023-03-22  8:05     ` Konrad Dybcio
2023-03-08 21:35 ` [PATCH RFT v2 12/14] clk: qcom: smd-rpm: Hook up CNoC_1 and SNoC_2 keep_alive Konrad Dybcio
2023-03-09  1:25   ` Dmitry Baryshkov
2023-03-08 21:35 ` [PATCH RFT v2 13/14] clk: qcom: smd-rpm: Mark clock enabled in clk_smd_rpm_handoff() Konrad Dybcio
2023-03-08 21:35 ` [PATCH RFT v2 14/14] arm64: dts: qcom: msm8996: Enable rpmcc unused clk disablement Konrad Dybcio
2023-04-20  1:50 ` [PATCH RFT v2 00/14] SMD RPMCC sleep preparations Konrad Dybcio
2023-04-20  7:56   ` Stephan Gerhold
2023-04-20  9:36     ` Konrad Dybcio
2023-04-20 10:04       ` Stephan Gerhold
2023-04-20 10:20         ` Konrad Dybcio
2023-04-20 15:57 ` Konrad Dybcio
2023-04-25 19:35   ` Stephen Boyd
2023-04-26  9:40     ` 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=20230420082811.GA6308@thinkpad \
    --to=manivannan.sadhasivam@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@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;
as well as URLs for NNTP newsgroup(s).