[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240327202740.3075378-2-swboyd@chromium.org>
Date: Wed, 27 Mar 2024 13:27:37 -0700
From: Stephen Boyd <swboyd@...omium.org>
To: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Bjorn Andersson <andersson@...nel.org>
Cc: linux-kernel@...r.kernel.org,
linux-clk@...r.kernel.org,
patches@...ts.linux.dev,
linux-arm-msm@...r.kernel.org,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Douglas Anderson <dianders@...omium.org>,
Taniya Das <quic_tdas@...cinc.com>
Subject: [PATCH 1/2] clk: qcom: dispcc-sc7180: Force off rotator clk at probe
The 'disp_cc_mdss_rot_clk' is parented to 'disp_cc_pll0' and enabled out
of boot on sc7180 Trogdor devices. This is a problem because the mdss
driver (the driver for compatible node "qcom,sc7180-mdss") turns off
'disp_cc_mdss_mdp_clk' and that clk is also parented to 'disp_cc_pll0'.
When the display pll turns off, the rotator clk gets stuck on.
We don't really care about this clk being on through boot, so simply
disable the clk during driver probe to avoid this issue.
Cc: Bjorn Andersson <andersson@...nel.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Cc: Douglas Anderson <dianders@...omium.org>
Cc: Taniya Das <quic_tdas@...cinc.com>
Signed-off-by: Stephen Boyd <swboyd@...omium.org>
---
drivers/clk/qcom/dispcc-sc7180.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/clk/qcom/dispcc-sc7180.c b/drivers/clk/qcom/dispcc-sc7180.c
index 9536bfc72a43..a3356a7758b3 100644
--- a/drivers/clk/qcom/dispcc-sc7180.c
+++ b/drivers/clk/qcom/dispcc-sc7180.c
@@ -705,6 +705,20 @@ static int disp_cc_sc7180_probe(struct platform_device *pdev)
if (IS_ERR(regmap))
return PTR_ERR(regmap);
+ /*
+ * Force off 'disp_cc_mdss_rot_clk' so that the driver for the
+ * "qcom,sc7180-mdss" compatible node can disable
+ * 'disp_cc_mdss_mdp_clk', which in turn disables 'disp_cc_pll0',
+ * without making this clk stuck on. When the mdss driver runtime
+ * suspends, the mdss_gdsc will turn off. If 'disp_cc_mdss_rot_clk'
+ * isn't off or parked on XO at this time it will wedge the GDSC and
+ * then 'disp_cc_mdss_mdp_clk' will fail to turn on because the GDSC is
+ * wedged.
+ */
+ regmap_update_bits(regmap,
+ disp_cc_mdss_rot_clk.clkr.enable_reg,
+ disp_cc_mdss_rot_clk.clkr.enable_mask, 0);
+
/* 1380MHz configuration */
disp_cc_pll_config.l = 0x47;
disp_cc_pll_config.alpha = 0xe000;
--
https://chromeos.dev
Powered by blists - more mailing lists