From: Esteban Urrutia via B4 Relay <devnull+esteuwu.proton.me@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney@redhat.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Jagadeesh Kona <quic_jkona@quicinc.com>
Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org,
Esteban Urrutia <esteuwu@proton.me>
Subject: [PATCH v3 3/3] clk: qcom: alpha-pll: Check Lucid Ole PLL status before configuring
Date: Mon, 13 Jul 2026 23:28:19 -0400 [thread overview]
Message-ID: <20260713-sm8450-qol-dispcc-v3-3-56fd05822270@proton.me> (raw)
In-Reply-To: <20260713-sm8450-qol-dispcc-v3-0-56fd05822270@proton.me>
From: Esteban Urrutia <esteuwu@proton.me>
On some platforms such as SM8475, not doing this may result in graphical
glitches when the mdss driver takes over.
This fixes the aforementioned issue.
Fixes: 3132a9a11e57 ("clk: qcom: clk-alpha-pll: Add support for lucid ole pll configure")
Signed-off-by: Esteban Urrutia <esteuwu@proton.me>
---
drivers/clk/qcom/clk-alpha-pll.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c
index f8313f9d0e30..60173b076cc5 100644
--- a/drivers/clk/qcom/clk-alpha-pll.c
+++ b/drivers/clk/qcom/clk-alpha-pll.c
@@ -2373,6 +2373,15 @@ void clk_lucid_ole_pll_configure(struct clk_alpha_pll *pll, struct regmap *regma
{
u32 lval = config->l;
+ /*
+ * If the bootloader left the PLL enabled it's likely that there are
+ * RCGs that will lock up if we disable the PLL below.
+ */
+ if (trion_pll_is_enabled(pll, regmap)) {
+ pr_debug("Lucid Ole PLL is already enabled, skipping configuration\n");
+ return;
+ }
+
lval |= TRION_PLL_CAL_VAL << LUCID_EVO_PLL_CAL_L_VAL_SHIFT;
lval |= TRION_PLL_CAL_VAL << LUCID_OLE_PLL_RINGOSC_CAL_L_VAL_SHIFT;
clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), lval);
--
2.55.0
next prev parent reply other threads:[~2026-07-14 3:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 3:28 [PATCH v3 0/3] SM8450 QoL changes (dispcc) Esteban Urrutia via B4 Relay
2026-07-14 3:28 ` [PATCH v3 1/3] clk: qcom: dispcc-sm8450: Fix disp_cc_mdss_mdp_clk_src ops Esteban Urrutia via B4 Relay
2026-07-17 21:02 ` David Heidelberg
2026-07-14 3:28 ` [PATCH v3 2/3] clk: qcom: dispcc-sm8450: Migrate to qcom_cc_driver_data Esteban Urrutia via B4 Relay
2026-07-14 3:28 ` Esteban Urrutia via B4 Relay [this message]
2026-07-15 9:31 ` [PATCH v3 3/3] clk: qcom: alpha-pll: Check Lucid Ole PLL status before configuring 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=20260713-sm8450-qol-dispcc-v3-3-56fd05822270@proton.me \
--to=devnull+esteuwu.proton.me@kernel.org \
--cc=andersson@kernel.org \
--cc=bmasney@redhat.com \
--cc=esteuwu@proton.me \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=mturquette@baylibre.com \
--cc=phone-devel@vger.kernel.org \
--cc=quic_jkona@quicinc.com \
--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