All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] clk: qcom: gpucc-sc8280xp: fix GX external supply lookup
@ 2024-03-26 14:01 Johan Hovold
  2024-03-26 14:01 ` [PATCH 1/5] dt-bindings: clock: qcom: add SA8540P gpucc Johan Hovold
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Johan Hovold @ 2024-03-26 14:01 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Konrad Dybcio, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Mark Brown, Dmitry Baryshkov,
	linux-arm-msm, linux-clk, linux-kernel, Johan Hovold

The SA8540P platform is closely related to SC8280XP but differs in that
it uses an external supply for the GX power domain.
    
This series adds a new SA8540P GPU clock controller compatible which
can be used to determine whether to look up the external supply.
    
This specifically avoids warnings such as:
    
	gpu_cc-sc8280xp 3d90000.clock-controller: supply vdd-gfx not found, using dummy regulator
    
on SC8280XP, which were introduced in 6.9-rc1.

Note that this also avoids triggering a potential deadlock on SC8280XP
even if the underlying issue still remains for the derivative platforms
like SA8540P and SA8295P that actually use the supply. [1]

Also note that this is a better alternative to simply making the
external supply optional as that would suppress any warnings about
missing supplies on platforms that actually require it. This series
therefore supersedes [2].

Johan


[1] https://lore.kernel.org/lkml/Zf25Sv2x9WaCFuIH@hovoldconsulting.com/
[2] https://lore.kernel.org/lkml/20240325081957.10946-1-johan+linaro@kernel.org/


Johan Hovold (5):
  dt-bindings: clock: qcom: add SA8540P gpucc
  arm64: dts: qcom: sa8540p: use sa8540p gpucc compatible
  clk: qcom: gpucc-sc8280xp: make cc descriptor const
  clk: qcom: gpucc-sc8280xp: fix GX external supply lookup
  arm64: dts: qcom: sa8540p: drop fallback gpucc compatible

 .../devicetree/bindings/clock/qcom,gpucc.yaml |  1 +
 arch/arm64/boot/dts/qcom/sa8540p.dtsi         |  2 +
 drivers/clk/qcom/gpucc-sc8280xp.c             | 42 ++++++++++++++++---
 3 files changed, 39 insertions(+), 6 deletions(-)

-- 
2.43.0


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

* [PATCH 1/5] dt-bindings: clock: qcom: add SA8540P gpucc
  2024-03-26 14:01 [PATCH 0/5] clk: qcom: gpucc-sc8280xp: fix GX external supply lookup Johan Hovold
@ 2024-03-26 14:01 ` Johan Hovold
  2024-03-26 15:59   ` Krzysztof Kozlowski
  2024-03-26 14:01 ` [PATCH 2/5] arm64: dts: qcom: sa8540p: use sa8540p gpucc compatible Johan Hovold
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Johan Hovold @ 2024-03-26 14:01 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Konrad Dybcio, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Mark Brown, Dmitry Baryshkov,
	linux-arm-msm, linux-clk, linux-kernel, Johan Hovold

The SA8540P platform is closely related to SC8280XP but differs in that
it uses an external supply for the GX power domain.

Add a new compatible string for the SA8540P GPU clock controller so that
the OS can determine which resources to look for.

Fixes: e60b95d2b687 ("dt-bindings: clock: qcom: Allow VDD_GFX supply to GX")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 Documentation/devicetree/bindings/clock/qcom,gpucc.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml b/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
index f57aceddac6b..5b385e4976b6 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
@@ -28,6 +28,7 @@ properties:
   compatible:
     enum:
       - qcom,sdm845-gpucc
+      - qcom,sa8540p-gpucc
       - qcom,sa8775p-gpucc
       - qcom,sc7180-gpucc
       - qcom,sc7280-gpucc
-- 
2.43.0


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

* [PATCH 2/5] arm64: dts: qcom: sa8540p: use sa8540p gpucc compatible
  2024-03-26 14:01 [PATCH 0/5] clk: qcom: gpucc-sc8280xp: fix GX external supply lookup Johan Hovold
  2024-03-26 14:01 ` [PATCH 1/5] dt-bindings: clock: qcom: add SA8540P gpucc Johan Hovold
@ 2024-03-26 14:01 ` Johan Hovold
  2024-03-26 16:02   ` Krzysztof Kozlowski
  2024-03-26 14:01 ` [PATCH 3/5] clk: qcom: gpucc-sc8280xp: make cc descriptor const Johan Hovold
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Johan Hovold @ 2024-03-26 14:01 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Konrad Dybcio, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Mark Brown, Dmitry Baryshkov,
	linux-arm-msm, linux-clk, linux-kernel, Johan Hovold

The SA8540P platform is closely related to SC8280XP but differs in that
it uses an external supply for the GX power domain.

Use the new SA8540P compatible string for the GPU clock controller so
that the OS can determine which resources to look for.

Note that a fallback SC8280XP compatible is added temporarily to avoid
any temporary regressions for sa8295p-adp.

Fixes: fd5821a1a83c ("arm64: dts: qcom: sa8540p: Drop gfx.lvl as power-domain for gpucc")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sa8540p.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sa8540p.dtsi b/arch/arm64/boot/dts/qcom/sa8540p.dtsi
index 23888029cc11..3b31a9ea3492 100644
--- a/arch/arm64/boot/dts/qcom/sa8540p.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8540p.dtsi
@@ -168,6 +168,8 @@ opp-2592000000 {
 };
 
 &gpucc {
+	compatible = "qcom,sa8540p-gpucc", "qcom,sc8280xp-gpucc";
+
 	/* SA8295P and SA8540P doesn't provide gfx.lvl */
 	/delete-property/ power-domains;
 
-- 
2.43.0


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

* [PATCH 3/5] clk: qcom: gpucc-sc8280xp: make cc descriptor const
  2024-03-26 14:01 [PATCH 0/5] clk: qcom: gpucc-sc8280xp: fix GX external supply lookup Johan Hovold
  2024-03-26 14:01 ` [PATCH 1/5] dt-bindings: clock: qcom: add SA8540P gpucc Johan Hovold
  2024-03-26 14:01 ` [PATCH 2/5] arm64: dts: qcom: sa8540p: use sa8540p gpucc compatible Johan Hovold
@ 2024-03-26 14:01 ` Johan Hovold
  2024-03-26 20:45   ` Konrad Dybcio
  2024-03-26 14:01 ` [PATCH 4/5] clk: qcom: gpucc-sc8280xp: fix GX external supply lookup Johan Hovold
  2024-03-26 14:01 ` [PATCH 5/5] arm64: dts: qcom: sa8540p: drop fallback gpucc compatible Johan Hovold
  4 siblings, 1 reply; 13+ messages in thread
From: Johan Hovold @ 2024-03-26 14:01 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Konrad Dybcio, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Mark Brown, Dmitry Baryshkov,
	linux-arm-msm, linux-clk, linux-kernel, Johan Hovold

Add the missing 'const' keyword to mark the Qualcomm clock controller
descriptor data as constant.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/clk/qcom/gpucc-sc8280xp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/qcom/gpucc-sc8280xp.c b/drivers/clk/qcom/gpucc-sc8280xp.c
index 3611d2d1823d..df6b01768767 100644
--- a/drivers/clk/qcom/gpucc-sc8280xp.c
+++ b/drivers/clk/qcom/gpucc-sc8280xp.c
@@ -415,7 +415,7 @@ static const struct regmap_config gpu_cc_sc8280xp_regmap_config = {
 	.fast_io = true,
 };
 
-static struct qcom_cc_desc gpu_cc_sc8280xp_desc = {
+static const struct qcom_cc_desc gpu_cc_sc8280xp_desc = {
 	.config = &gpu_cc_sc8280xp_regmap_config,
 	.clks = gpu_cc_sc8280xp_clocks,
 	.num_clks = ARRAY_SIZE(gpu_cc_sc8280xp_clocks),
-- 
2.43.0


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

* [PATCH 4/5] clk: qcom: gpucc-sc8280xp: fix GX external supply lookup
  2024-03-26 14:01 [PATCH 0/5] clk: qcom: gpucc-sc8280xp: fix GX external supply lookup Johan Hovold
                   ` (2 preceding siblings ...)
  2024-03-26 14:01 ` [PATCH 3/5] clk: qcom: gpucc-sc8280xp: make cc descriptor const Johan Hovold
@ 2024-03-26 14:01 ` Johan Hovold
  2024-03-26 14:01 ` [PATCH 5/5] arm64: dts: qcom: sa8540p: drop fallback gpucc compatible Johan Hovold
  4 siblings, 0 replies; 13+ messages in thread
From: Johan Hovold @ 2024-03-26 14:01 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Konrad Dybcio, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Mark Brown, Dmitry Baryshkov,
	linux-arm-msm, linux-clk, linux-kernel, Johan Hovold

The SA8540P platform is closely related to SC8280XP but differs in that
it uses an external supply for the GX power domain.

Use the new SA8540P compatible to determine whether to look up the
external supply.

This specifically avoids warnings such as:

	gpu_cc-sc8280xp 3d90000.clock-controller: supply vdd-gfx not found, using dummy regulator

on SC8280XP.

Note that this also avoids triggering a potential deadlock on SC8280XP
even if the underlying issue still remains for the derivative platforms
like SA8540P and SA8295P that actually use the supply.

Fixes: deebc79b28d6 ("clk: qcom: gpucc-sc8280xp: Add external supply for GX gdsc")
Link: https://lore.kernel.org/lkml/Zf25Sv2x9WaCFuIH@hovoldconsulting.com/
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/clk/qcom/gpucc-sc8280xp.c | 40 +++++++++++++++++++++++++++----
 1 file changed, 35 insertions(+), 5 deletions(-)

diff --git a/drivers/clk/qcom/gpucc-sc8280xp.c b/drivers/clk/qcom/gpucc-sc8280xp.c
index df6b01768767..48a2e8df14f2 100644
--- a/drivers/clk/qcom/gpucc-sc8280xp.c
+++ b/drivers/clk/qcom/gpucc-sc8280xp.c
@@ -390,7 +390,7 @@ static struct gdsc cx_gdsc = {
 	.flags = VOTABLE | RETAIN_FF_ENABLE,
 };
 
-static struct gdsc gx_gdsc = {
+static struct gdsc sa8540p_gx_gdsc = {
 	.gdscr = 0x100c,
 	.clamp_io_ctrl = 0x1508,
 	.pd = {
@@ -402,9 +402,25 @@ static struct gdsc gx_gdsc = {
 	.supply = "vdd-gfx",
 };
 
+static struct gdsc sc8280xp_gx_gdsc = {
+	.gdscr = 0x100c,
+	.clamp_io_ctrl = 0x1508,
+	.pd = {
+		.name = "gx_gdsc",
+		.power_on = gdsc_gx_do_nothing_enable,
+	},
+	.pwrsts = PWRSTS_OFF_ON,
+	.flags = CLAMP_IO | RETAIN_FF_ENABLE,
+};
+
+static struct gdsc *gpu_cc_sa8540p_gdscs[] = {
+	[GPU_CC_CX_GDSC] = &cx_gdsc,
+	[GPU_CC_GX_GDSC] = &sa8540p_gx_gdsc,
+};
+
 static struct gdsc *gpu_cc_sc8280xp_gdscs[] = {
 	[GPU_CC_CX_GDSC] = &cx_gdsc,
-	[GPU_CC_GX_GDSC] = &gx_gdsc,
+	[GPU_CC_GX_GDSC] = &sc8280xp_gx_gdsc,
 };
 
 static const struct regmap_config gpu_cc_sc8280xp_regmap_config = {
@@ -415,6 +431,14 @@ static const struct regmap_config gpu_cc_sc8280xp_regmap_config = {
 	.fast_io = true,
 };
 
+static const struct qcom_cc_desc gpu_cc_sa8540p_desc = {
+	.config = &gpu_cc_sc8280xp_regmap_config,
+	.clks = gpu_cc_sc8280xp_clocks,
+	.num_clks = ARRAY_SIZE(gpu_cc_sc8280xp_clocks),
+	.gdscs = gpu_cc_sa8540p_gdscs,
+	.num_gdscs = ARRAY_SIZE(gpu_cc_sa8540p_gdscs),
+};
+
 static const struct qcom_cc_desc gpu_cc_sc8280xp_desc = {
 	.config = &gpu_cc_sc8280xp_regmap_config,
 	.clks = gpu_cc_sc8280xp_clocks,
@@ -425,9 +449,14 @@ static const struct qcom_cc_desc gpu_cc_sc8280xp_desc = {
 
 static int gpu_cc_sc8280xp_probe(struct platform_device *pdev)
 {
+	const struct qcom_cc_desc *desc;
 	struct regmap *regmap;
 	int ret;
 
+	desc = of_device_get_match_data(&pdev->dev);
+	if (!desc)
+		return -EINVAL;
+
 	ret = devm_pm_runtime_enable(&pdev->dev);
 	if (ret)
 		return ret;
@@ -436,7 +465,7 @@ static int gpu_cc_sc8280xp_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	regmap = qcom_cc_map(pdev, &gpu_cc_sc8280xp_desc);
+	regmap = qcom_cc_map(pdev, desc);
 	if (IS_ERR(regmap)) {
 		pm_runtime_put(&pdev->dev);
 		return PTR_ERR(regmap);
@@ -449,14 +478,15 @@ static int gpu_cc_sc8280xp_probe(struct platform_device *pdev)
 	qcom_branch_set_clk_en(regmap, 0x1170); /* GPU_CC_CB_CLK */
 	qcom_branch_set_clk_en(regmap, 0x109c); /* GPU_CC_CXO_CLK */
 
-	ret = qcom_cc_really_probe(pdev, &gpu_cc_sc8280xp_desc, regmap);
+	ret = qcom_cc_really_probe(pdev, desc, regmap);
 	pm_runtime_put(&pdev->dev);
 
 	return ret;
 }
 
 static const struct of_device_id gpu_cc_sc8280xp_match_table[] = {
-	{ .compatible = "qcom,sc8280xp-gpucc" },
+	{ .compatible = "qcom,sa8540p-gpucc", &gpu_cc_sa8540p_desc },
+	{ .compatible = "qcom,sc8280xp-gpucc", &gpu_cc_sc8280xp_desc },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, gpu_cc_sc8280xp_match_table);
-- 
2.43.0


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

* [PATCH 5/5] arm64: dts: qcom: sa8540p: drop fallback gpucc compatible
  2024-03-26 14:01 [PATCH 0/5] clk: qcom: gpucc-sc8280xp: fix GX external supply lookup Johan Hovold
                   ` (3 preceding siblings ...)
  2024-03-26 14:01 ` [PATCH 4/5] clk: qcom: gpucc-sc8280xp: fix GX external supply lookup Johan Hovold
@ 2024-03-26 14:01 ` Johan Hovold
  4 siblings, 0 replies; 13+ messages in thread
From: Johan Hovold @ 2024-03-26 14:01 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Konrad Dybcio, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Mark Brown, Dmitry Baryshkov,
	linux-arm-msm, linux-clk, linux-kernel, Johan Hovold

Drop the fallback SC8280XP GPU clock controller compatible that was
added temporarily to handle the transition to the new SA8540P
compatible.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sa8540p.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sa8540p.dtsi b/arch/arm64/boot/dts/qcom/sa8540p.dtsi
index 3b31a9ea3492..9c2e99d30d08 100644
--- a/arch/arm64/boot/dts/qcom/sa8540p.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8540p.dtsi
@@ -168,7 +168,7 @@ opp-2592000000 {
 };
 
 &gpucc {
-	compatible = "qcom,sa8540p-gpucc", "qcom,sc8280xp-gpucc";
+	compatible = "qcom,sa8540p-gpucc";
 
 	/* SA8295P and SA8540P doesn't provide gfx.lvl */
 	/delete-property/ power-domains;
-- 
2.43.0


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

* Re: [PATCH 1/5] dt-bindings: clock: qcom: add SA8540P gpucc
  2024-03-26 14:01 ` [PATCH 1/5] dt-bindings: clock: qcom: add SA8540P gpucc Johan Hovold
@ 2024-03-26 15:59   ` Krzysztof Kozlowski
  2024-03-26 16:40     ` Johan Hovold
  0 siblings, 1 reply; 13+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-26 15:59 UTC (permalink / raw)
  To: Johan Hovold, Bjorn Andersson
  Cc: Konrad Dybcio, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Mark Brown, Dmitry Baryshkov,
	linux-arm-msm, linux-clk, linux-kernel

On 26/03/2024 15:01, Johan Hovold wrote:
> The SA8540P platform is closely related to SC8280XP but differs in that
> it uses an external supply for the GX power domain.
> 
> Add a new compatible string for the SA8540P GPU clock controller so that
> the OS can determine which resources to look for.
> 
> Fixes: e60b95d2b687 ("dt-bindings: clock: qcom: Allow VDD_GFX supply to GX")

I don't get why adding new device support is a fix. Commit msg did not
help me to understand it.


> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  Documentation/devicetree/bindings/clock/qcom,gpucc.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml b/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
> index f57aceddac6b..5b385e4976b6 100644
> --- a/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
> +++ b/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
> @@ -28,6 +28,7 @@ properties:
>    compatible:
>      enum:
>        - qcom,sdm845-gpucc
> +      - qcom,sa8540p-gpucc

This looks fine and pretty trivial, but I really do not understand why
skipping our list for automated testing.

<standard letter>
Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC. It might happen, that command when run on an older
kernel, gives you outdated entries. Therefore please be sure you base
your patches on recent Linux kernel.

Tools like b4 or scripts/get_maintainer.pl provide you proper list of
people, so fix your workflow. Tools might also fail if you work on some
ancient tree (don't, instead use mainline), work on fork of kernel
(don't, instead use mainline) or you ignore some maintainers (really
don't). Just use b4 and everything should be fine, although remember
about `b4 prep --auto-to-cc` if you added new patches to the patchset.

You missed at least devicetree list (maybe more), so this won't be
tested by automated tooling. Performing review on untested code might be
a waste of time.

Please kindly resend and include all necessary To/Cc entries.
</standard letter>

Best regards,
Krzysztof


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

* Re: [PATCH 2/5] arm64: dts: qcom: sa8540p: use sa8540p gpucc compatible
  2024-03-26 14:01 ` [PATCH 2/5] arm64: dts: qcom: sa8540p: use sa8540p gpucc compatible Johan Hovold
@ 2024-03-26 16:02   ` Krzysztof Kozlowski
  2024-03-26 16:48     ` Johan Hovold
  0 siblings, 1 reply; 13+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-26 16:02 UTC (permalink / raw)
  To: Johan Hovold, Bjorn Andersson
  Cc: Konrad Dybcio, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Mark Brown, Dmitry Baryshkov,
	linux-arm-msm, linux-clk, linux-kernel

On 26/03/2024 15:01, Johan Hovold wrote:
> The SA8540P platform is closely related to SC8280XP but differs in that
> it uses an external supply for the GX power domain.
> 
> Use the new SA8540P compatible string for the GPU clock controller so
> that the OS can determine which resources to look for.
> 
> Note that a fallback SC8280XP compatible is added temporarily to avoid
> any temporary regressions for sa8295p-adp.
> 
> Fixes: fd5821a1a83c ("arm64: dts: qcom: sa8540p: Drop gfx.lvl as power-domain for gpucc")
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  arch/arm64/boot/dts/qcom/sa8540p.dtsi | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sa8540p.dtsi b/arch/arm64/boot/dts/qcom/sa8540p.dtsi
> index 23888029cc11..3b31a9ea3492 100644
> --- a/arch/arm64/boot/dts/qcom/sa8540p.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sa8540p.dtsi
> @@ -168,6 +168,8 @@ opp-2592000000 {
>  };
>  
>  &gpucc {
> +	compatible = "qcom,sa8540p-gpucc", "qcom,sc8280xp-gpucc";

This introduces new dtbs_check failures. Please fix the binding and drop
the last patch in the series.

Best regards,
Krzysztof


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

* Re: [PATCH 1/5] dt-bindings: clock: qcom: add SA8540P gpucc
  2024-03-26 15:59   ` Krzysztof Kozlowski
@ 2024-03-26 16:40     ` Johan Hovold
  2024-03-27  8:54       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 13+ messages in thread
From: Johan Hovold @ 2024-03-26 16:40 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Bjorn Andersson, Konrad Dybcio, Michael Turquette,
	Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Mark Brown, Dmitry Baryshkov, linux-arm-msm, linux-clk,
	linux-kernel

On Tue, Mar 26, 2024 at 04:59:43PM +0100, Krzysztof Kozlowski wrote:
> On 26/03/2024 15:01, Johan Hovold wrote:
> > The SA8540P platform is closely related to SC8280XP but differs in that
> > it uses an external supply for the GX power domain.
> > 
> > Add a new compatible string for the SA8540P GPU clock controller so that
> > the OS can determine which resources to look for.
> > 
> > Fixes: e60b95d2b687 ("dt-bindings: clock: qcom: Allow VDD_GFX supply to GX")
> 
> I don't get why adding new device support is a fix. Commit msg did not
> help me to understand it.

Yeah, perhaps I could have expanded on the problem a bit more here.

Hopefully it's clear if you look at the cover letter, but the commit
referred to above should have added a new compatible for SA8540P which
uses the new supply so that the OS can determine when it should try to
look it up and when it is required.

The Fixes tag can also be dropped, I admit this is not clear-cut.

> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> > ---
> >  Documentation/devicetree/bindings/clock/qcom,gpucc.yaml | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml b/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
> > index f57aceddac6b..5b385e4976b6 100644
> > --- a/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
> > +++ b/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
> > @@ -28,6 +28,7 @@ properties:
> >    compatible:
> >      enum:
> >        - qcom,sdm845-gpucc
> > +      - qcom,sa8540p-gpucc
> 
> This looks fine and pretty trivial, but I really do not understand why
> skipping our list for automated testing.
> 
> <standard letter>
...
> </standard letter>

Spare me the rant. This was obviously a mistake from reusing and
manually amending a git-send-email command from shell history and
failing to notice that this series also should have been CCed the
devicetree list.

Johan

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

* Re: [PATCH 2/5] arm64: dts: qcom: sa8540p: use sa8540p gpucc compatible
  2024-03-26 16:02   ` Krzysztof Kozlowski
@ 2024-03-26 16:48     ` Johan Hovold
  0 siblings, 0 replies; 13+ messages in thread
From: Johan Hovold @ 2024-03-26 16:48 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Johan Hovold, Bjorn Andersson, Konrad Dybcio, Michael Turquette,
	Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Mark Brown, Dmitry Baryshkov, linux-arm-msm, linux-clk,
	linux-kernel

On Tue, Mar 26, 2024 at 05:02:43PM +0100, Krzysztof Kozlowski wrote:
> On 26/03/2024 15:01, Johan Hovold wrote:
> > The SA8540P platform is closely related to SC8280XP but differs in that
> > it uses an external supply for the GX power domain.
> > 
> > Use the new SA8540P compatible string for the GPU clock controller so
> > that the OS can determine which resources to look for.
> > 
> > Note that a fallback SC8280XP compatible is added temporarily to avoid
> > any temporary regressions for sa8295p-adp.
> > 
> > Fixes: fd5821a1a83c ("arm64: dts: qcom: sa8540p: Drop gfx.lvl as power-domain for gpucc")
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> > ---
> >  arch/arm64/boot/dts/qcom/sa8540p.dtsi | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/qcom/sa8540p.dtsi b/arch/arm64/boot/dts/qcom/sa8540p.dtsi
> > index 23888029cc11..3b31a9ea3492 100644
> > --- a/arch/arm64/boot/dts/qcom/sa8540p.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/sa8540p.dtsi
> > @@ -168,6 +168,8 @@ opp-2592000000 {
> >  };
> >  
> >  &gpucc {
> > +	compatible = "qcom,sa8540p-gpucc", "qcom,sc8280xp-gpucc";
> 
> This introduces new dtbs_check failures. Please fix the binding and drop
> the last patch in the series.

I know, and this is done on purpose.

I doubt anyone cares if the sa8295p GPU breaks for one commit in case
this series goes in through the same tree or even for a couple of RCs in
case they go in through separate trees.

But we recently had a similar discussion about a bluetooth fix and
whatever course of action I would have chosen here, someone is bound to
whine.

In this case I figured it was worth doing the extra work. But this is
just a temporary workaround as "qcom,sa8540p-gpucc" is not truly
compatible with "qcom,sc8280xp-gpucc" as only the former depends on the
external supply.

Heck, I even spelled it out in the commit message...

Johan

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

* Re: [PATCH 3/5] clk: qcom: gpucc-sc8280xp: make cc descriptor const
  2024-03-26 14:01 ` [PATCH 3/5] clk: qcom: gpucc-sc8280xp: make cc descriptor const Johan Hovold
@ 2024-03-26 20:45   ` Konrad Dybcio
  0 siblings, 0 replies; 13+ messages in thread
From: Konrad Dybcio @ 2024-03-26 20:45 UTC (permalink / raw)
  To: Johan Hovold, Bjorn Andersson
  Cc: Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Mark Brown, Dmitry Baryshkov,
	linux-arm-msm, linux-clk, linux-kernel

On 26.03.2024 3:01 PM, Johan Hovold wrote:
> Add the missing 'const' keyword to mark the Qualcomm clock controller
> descriptor data as constant.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

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

* Re: [PATCH 1/5] dt-bindings: clock: qcom: add SA8540P gpucc
  2024-03-26 16:40     ` Johan Hovold
@ 2024-03-27  8:54       ` Krzysztof Kozlowski
  2024-03-28 15:43         ` Johan Hovold
  0 siblings, 1 reply; 13+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-27  8:54 UTC (permalink / raw)
  To: Johan Hovold, Krzysztof Kozlowski
  Cc: Johan Hovold, Bjorn Andersson, Konrad Dybcio, Michael Turquette,
	Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Mark Brown, Dmitry Baryshkov, linux-arm-msm, linux-clk,
	linux-kernel

On 26/03/2024 17:40, Johan Hovold wrote:
> On Tue, Mar 26, 2024 at 04:59:43PM +0100, Krzysztof Kozlowski wrote:
>> On 26/03/2024 15:01, Johan Hovold wrote:
>>> The SA8540P platform is closely related to SC8280XP but differs in that
>>> it uses an external supply for the GX power domain.
>>>
>>> Add a new compatible string for the SA8540P GPU clock controller so that
>>> the OS can determine which resources to look for.
>>>
>>> Fixes: e60b95d2b687 ("dt-bindings: clock: qcom: Allow VDD_GFX supply to GX")
>>
>> I don't get why adding new device support is a fix. Commit msg did not
>> help me to understand it.
> 
> Yeah, perhaps I could have expanded on the problem a bit more here.
> 
> Hopefully it's clear if you look at the cover letter, but the commit
> referred to above should have added a new compatible for SA8540P which
> uses the new supply so that the OS can determine when it should try to
> look it up and when it is required.
> 
> The Fixes tag can also be dropped, I admit this is not clear-cut.

Some sort of short explanation would be good in the commit msg, so Fixes
can stay.

> 
>>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>>> ---
>>>  Documentation/devicetree/bindings/clock/qcom,gpucc.yaml | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml b/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
>>> index f57aceddac6b..5b385e4976b6 100644
>>> --- a/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
>>> +++ b/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
>>> @@ -28,6 +28,7 @@ properties:
>>>    compatible:
>>>      enum:
>>>        - qcom,sdm845-gpucc
>>> +      - qcom,sa8540p-gpucc
>>
>> This looks fine and pretty trivial, but I really do not understand why
>> skipping our list for automated testing.
>>
>> <standard letter>
> ...
>> </standard letter>
> 
> Spare me the rant. This was obviously a mistake from reusing and
> manually amending a git-send-email command from shell history and
> failing to notice that this series also should have been CCed the
> devicetree list.

That's not a rant but a template. :) You know, some people don't Cc DT
list on purpose, claiming "it is trivial patch and I already Cc'ed other
mailing lists". I don't know what was the reason here.

I forgot one more template to add:

P.S. This review might include comments based on templates. My intention
is not to offend or patronize but streamline my review process. Thank
you for understanding.

Best regards,
Krzysztof


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

* Re: [PATCH 1/5] dt-bindings: clock: qcom: add SA8540P gpucc
  2024-03-27  8:54       ` Krzysztof Kozlowski
@ 2024-03-28 15:43         ` Johan Hovold
  0 siblings, 0 replies; 13+ messages in thread
From: Johan Hovold @ 2024-03-28 15:43 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson
  Cc: Krzysztof Kozlowski, Johan Hovold, Konrad Dybcio,
	Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Mark Brown, Dmitry Baryshkov,
	linux-arm-msm, linux-clk, linux-kernel

On Wed, Mar 27, 2024 at 09:54:09AM +0100, Krzysztof Kozlowski wrote:
> On 26/03/2024 17:40, Johan Hovold wrote:
> > On Tue, Mar 26, 2024 at 04:59:43PM +0100, Krzysztof Kozlowski wrote:
> >> On 26/03/2024 15:01, Johan Hovold wrote:
> >>> The SA8540P platform is closely related to SC8280XP but differs in that
> >>> it uses an external supply for the GX power domain.
> >>>
> >>> Add a new compatible string for the SA8540P GPU clock controller so that
> >>> the OS can determine which resources to look for.
> >>>
> >>> Fixes: e60b95d2b687 ("dt-bindings: clock: qcom: Allow VDD_GFX supply to GX")
> >>
> >> I don't get why adding new device support is a fix. Commit msg did not
> >> help me to understand it.
> > 
> > Yeah, perhaps I could have expanded on the problem a bit more here.
> > 
> > Hopefully it's clear if you look at the cover letter, but the commit
> > referred to above should have added a new compatible for SA8540P which
> > uses the new supply so that the OS can determine when it should try to
> > look it up and when it is required.
> > 
> > The Fixes tag can also be dropped, I admit this is not clear-cut.
> 
> Some sort of short explanation would be good in the commit msg, so Fixes
> can stay.

There is an explanation in the commit message, but I agree that it could
be expanded.

After talking to Bjorn about this yesterday, he convinced me that simply
treating the supply as optional is the right thing to do here.

Apparently it is possible to us an external supply also on sc8280xp.
There's more to the story, and I don't have access to the documentation,
but we'll go with the simpler:

	https://lore.kernel.org/lkml/20240325081957.10946-1-johan+linaro@kernel.org/

for now.

Johan

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

end of thread, other threads:[~2024-03-28 15:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-26 14:01 [PATCH 0/5] clk: qcom: gpucc-sc8280xp: fix GX external supply lookup Johan Hovold
2024-03-26 14:01 ` [PATCH 1/5] dt-bindings: clock: qcom: add SA8540P gpucc Johan Hovold
2024-03-26 15:59   ` Krzysztof Kozlowski
2024-03-26 16:40     ` Johan Hovold
2024-03-27  8:54       ` Krzysztof Kozlowski
2024-03-28 15:43         ` Johan Hovold
2024-03-26 14:01 ` [PATCH 2/5] arm64: dts: qcom: sa8540p: use sa8540p gpucc compatible Johan Hovold
2024-03-26 16:02   ` Krzysztof Kozlowski
2024-03-26 16:48     ` Johan Hovold
2024-03-26 14:01 ` [PATCH 3/5] clk: qcom: gpucc-sc8280xp: make cc descriptor const Johan Hovold
2024-03-26 20:45   ` Konrad Dybcio
2024-03-26 14:01 ` [PATCH 4/5] clk: qcom: gpucc-sc8280xp: fix GX external supply lookup Johan Hovold
2024-03-26 14:01 ` [PATCH 5/5] arm64: dts: qcom: sa8540p: drop fallback gpucc compatible Johan Hovold

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.