linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] clk: qcom: sm8[56]50: Drop the Disp AHB clock from Display Clock Controller
@ 2024-01-25  9:27 Abel Vesa
  2024-01-25  9:27 ` [PATCH 1/5] dt-bindings: clock: sm8550-dispcc: Drop the Disp AHB clock Abel Vesa
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Abel Vesa @ 2024-01-25  9:27 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Michael Turquette, Stephen Boyd,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong
  Cc: Krzysztof Kozlowski, linux-arm-msm, linux-clk, devicetree,
	linux-kernel, Abel Vesa

The Disp AHB clock is provided by the GCC but never registered. It is
instead enabled on probe as it is expected to be always-on. So it should
be dropped from Disp CC entirely.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
Abel Vesa (5):
      dt-bindings: clock: sm8550-dispcc: Drop the Disp AHB clock
      arm64: dts: qcom: sm8550: Drop the Disp AHB clock from dispcc node
      arm64: dts: qcom: sm8650: Drop the Disp AHB clock from dispcc node
      clk: qcom: dispcc-sm8550: Drop the Disp AHB DT provided clock
      clk: qcom: dispcc-sm8650: Drop the Disp AHB DT provided clock

 Documentation/devicetree/bindings/clock/qcom,sm8550-dispcc.yaml | 2 --
 arch/arm64/boot/dts/qcom/sm8550.dtsi                            | 1 -
 arch/arm64/boot/dts/qcom/sm8650.dtsi                            | 1 -
 drivers/clk/qcom/dispcc-sm8550.c                                | 1 -
 drivers/clk/qcom/dispcc-sm8650.c                                | 1 -
 5 files changed, 6 deletions(-)
---
base-commit: 01af33cc9894b4489fb68fa35c40e9fe85df63dc
change-id: 20240125-dispcc-sm8550-sm8650-drop-disp-ahb-clk-fa011f7be9fa

Best regards,
-- 
Abel Vesa <abel.vesa@linaro.org>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/5] dt-bindings: clock: sm8550-dispcc: Drop the Disp AHB clock
  2024-01-25  9:27 [PATCH 0/5] clk: qcom: sm8[56]50: Drop the Disp AHB clock from Display Clock Controller Abel Vesa
@ 2024-01-25  9:27 ` Abel Vesa
  2024-01-25  9:27 ` [PATCH 2/5] arm64: dts: qcom: sm8550: Drop the Disp AHB clock from dispcc node Abel Vesa
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Abel Vesa @ 2024-01-25  9:27 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Michael Turquette, Stephen Boyd,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong
  Cc: Krzysztof Kozlowski, linux-arm-msm, linux-clk, devicetree,
	linux-kernel, Abel Vesa

The Disp AHB clock is not registered, but enabled on probe, by the SM8650 and
SM8550 GCC drivers. So drop the clock from dispcc node.

Fixes: 553f9bd45554 ("dt-bindings: clock: document SM8550 DISPCC clock controller")
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
 Documentation/devicetree/bindings/clock/qcom,sm8550-dispcc.yaml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8550-dispcc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8550-dispcc.yaml
index c129f8c16b50..6660d38bef86 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sm8550-dispcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sm8550-dispcc.yaml
@@ -25,7 +25,6 @@ properties:
     items:
       - description: Board XO source
       - description: Board Always On XO source
-      - description: Display's AHB clock
       - description: sleep clock
       - description: Byte clock from DSI PHY0
       - description: Pixel clock from DSI PHY0
@@ -82,7 +81,6 @@ examples:
       reg = <0x0af00000 0x10000>;
       clocks = <&rpmhcc RPMH_CXO_CLK>,
                <&rpmhcc RPMH_CXO_CLK_A>,
-               <&gcc GCC_DISP_AHB_CLK>,
                <&sleep_clk>,
                <&dsi0_phy 0>,
                <&dsi0_phy 1>,

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/5] arm64: dts: qcom: sm8550: Drop the Disp AHB clock from dispcc node
  2024-01-25  9:27 [PATCH 0/5] clk: qcom: sm8[56]50: Drop the Disp AHB clock from Display Clock Controller Abel Vesa
  2024-01-25  9:27 ` [PATCH 1/5] dt-bindings: clock: sm8550-dispcc: Drop the Disp AHB clock Abel Vesa
@ 2024-01-25  9:27 ` Abel Vesa
  2024-01-25  9:27 ` [PATCH 3/5] arm64: dts: qcom: sm8650: " Abel Vesa
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Abel Vesa @ 2024-01-25  9:27 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Michael Turquette, Stephen Boyd,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong
  Cc: Krzysztof Kozlowski, linux-arm-msm, linux-clk, devicetree,
	linux-kernel, Abel Vesa

The Disp AHB clock is not registered, but is enabled on probe, by the
GCC driver. So drop it from the dispcc node.

Fixes: d7da51db5b81 ("arm64: dts: qcom: sm8550: add display hardware devices")
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8550.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
index ee1ba5a8c8fc..59c23d0696a9 100644
--- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
@@ -3026,7 +3026,6 @@ dispcc: clock-controller@af00000 {
 			reg = <0 0x0af00000 0 0x20000>;
 			clocks = <&bi_tcxo_div2>,
 				 <&bi_tcxo_ao_div2>,
-				 <&gcc GCC_DISP_AHB_CLK>,
 				 <&sleep_clk>,
 				 <&mdss_dsi0_phy 0>,
 				 <&mdss_dsi0_phy 1>,

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/5] arm64: dts: qcom: sm8650: Drop the Disp AHB clock from dispcc node
  2024-01-25  9:27 [PATCH 0/5] clk: qcom: sm8[56]50: Drop the Disp AHB clock from Display Clock Controller Abel Vesa
  2024-01-25  9:27 ` [PATCH 1/5] dt-bindings: clock: sm8550-dispcc: Drop the Disp AHB clock Abel Vesa
  2024-01-25  9:27 ` [PATCH 2/5] arm64: dts: qcom: sm8550: Drop the Disp AHB clock from dispcc node Abel Vesa
@ 2024-01-25  9:27 ` Abel Vesa
  2024-01-25  9:27 ` [PATCH 4/5] clk: qcom: dispcc-sm8550: Drop the Disp AHB DT provided clock Abel Vesa
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Abel Vesa @ 2024-01-25  9:27 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Michael Turquette, Stephen Boyd,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong
  Cc: Krzysztof Kozlowski, linux-arm-msm, linux-clk, devicetree,
	linux-kernel, Abel Vesa

The Disp AHB clock is not registered, but is enabled on probe, by the
GCC driver. So drop it from the dispcc node.

Fixes: d2350377997f ("arm64: dts: qcom: add initial SM8650 dtsi")
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8650.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi
index 2df77123a8c7..1bf16636371c 100644
--- a/arch/arm64/boot/dts/qcom/sm8650.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi
@@ -3442,7 +3442,6 @@ dispcc: clock-controller@af00000 {
 
 			clocks = <&bi_tcxo_div2>,
 				 <&bi_tcxo_ao_div2>,
-				 <&gcc GCC_DISP_AHB_CLK>,
 				 <&sleep_clk>,
 				 <&mdss_dsi0_phy 0>,
 				 <&mdss_dsi0_phy 1>,

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/5] clk: qcom: dispcc-sm8550: Drop the Disp AHB DT provided clock
  2024-01-25  9:27 [PATCH 0/5] clk: qcom: sm8[56]50: Drop the Disp AHB clock from Display Clock Controller Abel Vesa
                   ` (2 preceding siblings ...)
  2024-01-25  9:27 ` [PATCH 3/5] arm64: dts: qcom: sm8650: " Abel Vesa
@ 2024-01-25  9:27 ` Abel Vesa
  2024-01-25  9:27 ` [PATCH 5/5] clk: qcom: dispcc-sm8650: " Abel Vesa
  2024-01-25  9:49 ` [PATCH 0/5] clk: qcom: sm8[56]50: Drop the Disp AHB clock from Display Clock Controller Konrad Dybcio
  5 siblings, 0 replies; 9+ messages in thread
From: Abel Vesa @ 2024-01-25  9:27 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Michael Turquette, Stephen Boyd,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong
  Cc: Krzysztof Kozlowski, linux-arm-msm, linux-clk, devicetree,
	linux-kernel, Abel Vesa

The GCC doesn't even register the Disp AHB clock. It enables it
on probe though. So drop it from the list of DT provided clocks as well.

Fixes: 90114ca11476 ("clk: qcom: add SM8550 DISPCC driver")
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
 drivers/clk/qcom/dispcc-sm8550.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/clk/qcom/dispcc-sm8550.c b/drivers/clk/qcom/dispcc-sm8550.c
index f96d8b81fd9a..b33795f8e8cf 100644
--- a/drivers/clk/qcom/dispcc-sm8550.c
+++ b/drivers/clk/qcom/dispcc-sm8550.c
@@ -31,7 +31,6 @@
 enum {
 	DT_BI_TCXO,
 	DT_BI_TCXO_AO,
-	DT_AHB_CLK,
 	DT_SLEEP_CLK,
 
 	DT_DSI0_PHY_PLL_OUT_BYTECLK,

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 5/5] clk: qcom: dispcc-sm8650: Drop the Disp AHB DT provided clock
  2024-01-25  9:27 [PATCH 0/5] clk: qcom: sm8[56]50: Drop the Disp AHB clock from Display Clock Controller Abel Vesa
                   ` (3 preceding siblings ...)
  2024-01-25  9:27 ` [PATCH 4/5] clk: qcom: dispcc-sm8550: Drop the Disp AHB DT provided clock Abel Vesa
@ 2024-01-25  9:27 ` Abel Vesa
  2024-01-25  9:49 ` [PATCH 0/5] clk: qcom: sm8[56]50: Drop the Disp AHB clock from Display Clock Controller Konrad Dybcio
  5 siblings, 0 replies; 9+ messages in thread
From: Abel Vesa @ 2024-01-25  9:27 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Michael Turquette, Stephen Boyd,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong
  Cc: Krzysztof Kozlowski, linux-arm-msm, linux-clk, devicetree,
	linux-kernel, Abel Vesa

The GCC doesn't even register the Disp AHB clock. It enables it
on probe though. So drop it from the list of DT provided clocks as well.

Fixes: 9e939f008338 ("clk: qcom: add the SM8650 Display Clock Controller driver")
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
 drivers/clk/qcom/dispcc-sm8650.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/clk/qcom/dispcc-sm8650.c b/drivers/clk/qcom/dispcc-sm8650.c
index f3b1d9d16bae..382ebc1866b9 100644
--- a/drivers/clk/qcom/dispcc-sm8650.c
+++ b/drivers/clk/qcom/dispcc-sm8650.c
@@ -29,7 +29,6 @@
 enum {
 	DT_BI_TCXO,
 	DT_BI_TCXO_AO,
-	DT_AHB_CLK,
 	DT_SLEEP_CLK,
 
 	DT_DSI0_PHY_PLL_OUT_BYTECLK,

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/5] clk: qcom: sm8[56]50: Drop the Disp AHB clock from Display Clock Controller
  2024-01-25  9:27 [PATCH 0/5] clk: qcom: sm8[56]50: Drop the Disp AHB clock from Display Clock Controller Abel Vesa
                   ` (4 preceding siblings ...)
  2024-01-25  9:27 ` [PATCH 5/5] clk: qcom: dispcc-sm8650: " Abel Vesa
@ 2024-01-25  9:49 ` Konrad Dybcio
  2024-01-25 10:44   ` Abel Vesa
  5 siblings, 1 reply; 9+ messages in thread
From: Konrad Dybcio @ 2024-01-25  9:49 UTC (permalink / raw)
  To: Abel Vesa, Bjorn Andersson, Michael Turquette, Stephen Boyd,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong
  Cc: Krzysztof Kozlowski, linux-arm-msm, linux-clk, devicetree, linux-kernel



On 1/25/24 10:27, Abel Vesa wrote:
> The Disp AHB clock is provided by the GCC but never registered. It is
> instead enabled on probe as it is expected to be always-on. So it should
> be dropped from Disp CC entirely.
> 
> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> ---

Abel, you just raised some concerns over my series doing this and now
you're doing the same, plus breaking backwards compatibility for no
good reason, instead of solving the problem.

The correct solution here is to register the AHB clock with GCC and
pm_clk_add() it from dispcc's .probe (and enable runtime PM on dispcc
if it's already not the case). Then the AHB clock will be gated when
no display hardware (= no dispcc consumer) is in use.

8[56]50 are in a good position for this, as they already have the
required DTS reference. Unfortunately, I still haven't fully dug
into this for platforms without one, but that's on me.

Konrad

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/5] clk: qcom: sm8[56]50: Drop the Disp AHB clock from Display Clock Controller
  2024-01-25  9:49 ` [PATCH 0/5] clk: qcom: sm8[56]50: Drop the Disp AHB clock from Display Clock Controller Konrad Dybcio
@ 2024-01-25 10:44   ` Abel Vesa
  2024-01-25 10:47     ` Konrad Dybcio
  0 siblings, 1 reply; 9+ messages in thread
From: Abel Vesa @ 2024-01-25 10:44 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
	Krzysztof Kozlowski, linux-arm-msm, linux-clk, devicetree,
	linux-kernel

On 24-01-25 10:49:23, Konrad Dybcio wrote:
> 
> 
> On 1/25/24 10:27, Abel Vesa wrote:
> > The Disp AHB clock is provided by the GCC but never registered. It is
> > instead enabled on probe as it is expected to be always-on. So it should
> > be dropped from Disp CC entirely.
> > 
> > Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> > ---
> 
> Abel, you just raised some concerns over my series doing this and now
> you're doing the same, plus breaking backwards compatibility for no
> good reason, instead of solving the problem.

Sorry but, during the off-list discussion, you convinced me that it is OK to drop
their registration as long as we enable them on probe.

I've not seen the following reply in time before sending current series:
https://lore.kernel.org/all/6aa58497-9727-4601-b6eb-264c478997c3@linaro.org/

Since this is blocking the patches for dispcc and dts for X1E80100, I
thought I'd just drop the clock as required from DT point of view.
But yeah, you're right, it breaks bindings ABI and that's wrong.

> 
> The correct solution here is to register the AHB clock with GCC and
> pm_clk_add() it from dispcc's .probe (and enable runtime PM on dispcc
> if it's already not the case). Then the AHB clock will be gated when
> no display hardware (= no dispcc consumer) is in use.

I agree.

> 
> 8[56]50 are in a good position for this, as they already have the
> required DTS reference. Unfortunately, I still haven't fully dug
> into this for platforms without one, but that's on me.

Since I need to do this for the X1E80100, I'll probably do it for the
other two as well.

Sorry for the misunderstanding.

> 
> Konrad

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/5] clk: qcom: sm8[56]50: Drop the Disp AHB clock from Display Clock Controller
  2024-01-25 10:44   ` Abel Vesa
@ 2024-01-25 10:47     ` Konrad Dybcio
  0 siblings, 0 replies; 9+ messages in thread
From: Konrad Dybcio @ 2024-01-25 10:47 UTC (permalink / raw)
  To: Abel Vesa
  Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
	Krzysztof Kozlowski, linux-arm-msm, linux-clk, devicetree,
	linux-kernel



On 1/25/24 11:44, Abel Vesa wrote:
> On 24-01-25 10:49:23, Konrad Dybcio wrote:
>>
>>
>> On 1/25/24 10:27, Abel Vesa wrote:
>>> The Disp AHB clock is provided by the GCC but never registered. It is
>>> instead enabled on probe as it is expected to be always-on. So it should
>>> be dropped from Disp CC entirely.
>>>
>>> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
>>> ---
>>
>> Abel, you just raised some concerns over my series doing this and now
>> you're doing the same, plus breaking backwards compatibility for no
>> good reason, instead of solving the problem.
> 
> Sorry but, during the off-list discussion, you convinced me that it is OK to drop
> their registration as long as we enable them on probe.
> 
> I've not seen the following reply in time before sending current series:
> https://lore.kernel.org/all/6aa58497-9727-4601-b6eb-264c478997c3@linaro.org/
> 
> Since this is blocking the patches for dispcc and dts for X1E80100, I
> thought I'd just drop the clock as required from DT point of view.
> But yeah, you're right, it breaks bindings ABI and that's wrong.
> 
>>
>> The correct solution here is to register the AHB clock with GCC and
>> pm_clk_add() it from dispcc's .probe (and enable runtime PM on dispcc
>> if it's already not the case). Then the AHB clock will be gated when
>> no display hardware (= no dispcc consumer) is in use.
> 
> I agree.
> 
>>
>> 8[56]50 are in a good position for this, as they already have the
>> required DTS reference. Unfortunately, I still haven't fully dug
>> into this for platforms without one, but that's on me.
> 
> Since I need to do this for the X1E80100, I'll probably do it for the
> other two as well.

Thanks!

> 
> Sorry for the misunderstanding.

The story is confusing as per usual, perhaps I could have explained
it better in the first place..

Konrad

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-01-25 10:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-25  9:27 [PATCH 0/5] clk: qcom: sm8[56]50: Drop the Disp AHB clock from Display Clock Controller Abel Vesa
2024-01-25  9:27 ` [PATCH 1/5] dt-bindings: clock: sm8550-dispcc: Drop the Disp AHB clock Abel Vesa
2024-01-25  9:27 ` [PATCH 2/5] arm64: dts: qcom: sm8550: Drop the Disp AHB clock from dispcc node Abel Vesa
2024-01-25  9:27 ` [PATCH 3/5] arm64: dts: qcom: sm8650: " Abel Vesa
2024-01-25  9:27 ` [PATCH 4/5] clk: qcom: dispcc-sm8550: Drop the Disp AHB DT provided clock Abel Vesa
2024-01-25  9:27 ` [PATCH 5/5] clk: qcom: dispcc-sm8650: " Abel Vesa
2024-01-25  9:49 ` [PATCH 0/5] clk: qcom: sm8[56]50: Drop the Disp AHB clock from Display Clock Controller Konrad Dybcio
2024-01-25 10:44   ` Abel Vesa
2024-01-25 10:47     ` Konrad Dybcio

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).