All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Foss <robert.foss@linaro.org>
To: bjorn.andersson@linaro.org, agross@kernel.org,
	mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org,
	krzk+dt@kernel.org, jonathan@marek.ca, tdas@codeaurora.org,
	anischal@codeaurora.org, linux-arm-msm@vger.kernel.org,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Vinod Koul <vkoul@kernel.org>
Subject: [PATCH v2 3/8] clk: qcom: sm8250-dispcc: Flag shared RCGs as assumed enable
Date: Tue,  3 May 2022 15:04:43 +0200	[thread overview]
Message-ID: <20220503130448.520470-3-robert.foss@linaro.org> (raw)
In-Reply-To: <20220503130448.520470-1-robert.foss@linaro.org>

From: Bjorn Andersson <bjorn.andersson@linaro.org>

The state of the shared RCGs found in the SM8250 dispcc can't reliably
be queried and hence doesn't implement the is_enabled() callback.

Mark the shared RCGs as CLK_ASSUME_ENABLED_WHEN_UNUSED, to ensure that
clk_disable_unused() will issue a disable and park the RCGs before it
turns off the parent PLLs - which will lock up these RCGs in any system
with continuous splash enabled.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
---
 drivers/clk/qcom/dispcc-sm8250.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/qcom/dispcc-sm8250.c b/drivers/clk/qcom/dispcc-sm8250.c
index db9379634fb2..22d9cbabecab 100644
--- a/drivers/clk/qcom/dispcc-sm8250.c
+++ b/drivers/clk/qcom/dispcc-sm8250.c
@@ -214,7 +214,7 @@ static struct clk_rcg2 disp_cc_mdss_ahb_clk_src = {
 		.name = "disp_cc_mdss_ahb_clk_src",
 		.parent_data = disp_cc_parent_data_3,
 		.num_parents = ARRAY_SIZE(disp_cc_parent_data_3),
-		.flags = CLK_SET_RATE_PARENT,
+		.flags = CLK_SET_RATE_PARENT | CLK_ASSUME_ENABLED_WHEN_UNUSED,
 		.ops = &clk_rcg2_shared_ops,
 	},
 };
@@ -546,7 +546,7 @@ static struct clk_rcg2 disp_cc_mdss_mdp_clk_src = {
 		.name = "disp_cc_mdss_mdp_clk_src",
 		.parent_data = disp_cc_parent_data_5,
 		.num_parents = ARRAY_SIZE(disp_cc_parent_data_5),
-		.flags = CLK_SET_RATE_PARENT,
+		.flags = CLK_SET_RATE_PARENT | CLK_ASSUME_ENABLED_WHEN_UNUSED,
 		.ops = &clk_rcg2_shared_ops,
 	},
 };
@@ -598,7 +598,7 @@ static struct clk_rcg2 disp_cc_mdss_rot_clk_src = {
 		.name = "disp_cc_mdss_rot_clk_src",
 		.parent_data = disp_cc_parent_data_5,
 		.num_parents = ARRAY_SIZE(disp_cc_parent_data_5),
-		.flags = CLK_SET_RATE_PARENT,
+		.flags = CLK_SET_RATE_PARENT | CLK_ASSUME_ENABLED_WHEN_UNUSED,
 		.ops = &clk_rcg2_shared_ops,
 	},
 };
-- 
2.34.1


  parent reply	other threads:[~2022-05-03 13:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 13:04 [PATCH v2 1/8] clk: qcom: rcg2: Cache rate changes for parked RCGs Robert Foss
2022-05-03 13:04 ` [PATCH v2 2/8] clk: Introduce CLK_ASSUME_ENABLED_WHEN_UNUSED Robert Foss
2022-05-03 15:02   ` Bjorn Andersson
2022-05-03 16:23     ` Robert Foss
2022-05-03 13:04 ` Robert Foss [this message]
2022-05-03 13:04 ` [PATCH v2 4/8] clk: qcom: add support for SM8350 GPUCC Robert Foss
2022-05-03 17:21   ` Bjorn Andersson
2022-05-03 20:39     ` Jonathan Marek
2022-05-04 12:24     ` Robert Foss
2022-05-03 13:04 ` [PATCH v2 5/8] dt-bindings: clock: Add Qcom SM8350 GPUCC bindings Robert Foss
2022-05-03 17:24   ` Bjorn Andersson
2022-05-03 13:04 ` [PATCH v2 6/8] clk: qcom: add support for SM8350 DISPCC Robert Foss
2022-05-03 17:25   ` Bjorn Andersson
2022-05-03 17:47     ` Robert Foss
2022-05-03 13:04 ` [PATCH v2 7/8] dt-bindings: clock: Add Qcom SM8350 DISPCC bindings Robert Foss
2022-05-03 17:26   ` Bjorn Andersson
2022-05-03 17:47     ` Robert Foss
2022-05-03 13:04 ` [PATCH v2 8/8] arm64: dts: qcom: sm8350: Add DISPCC node Robert Foss
2022-05-03 17:27   ` Bjorn Andersson
2022-05-03 15:01 ` [PATCH v2 1/8] clk: qcom: rcg2: Cache rate changes for parked RCGs Bjorn Andersson
2022-05-03 16:23   ` Robert Foss

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=20220503130448.520470-3-robert.foss@linaro.org \
    --to=robert.foss@linaro.org \
    --cc=agross@kernel.org \
    --cc=anischal@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=jonathan@marek.ca \
    --cc=krzk+dt@kernel.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 \
    --cc=tdas@codeaurora.org \
    --cc=vkoul@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 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.