* [PATCH] clk: qcom: dispcc-sm8750: Stop disp_cc_mdss_mdp_clk_src from getting parked
@ 2026-12-05 10:56 Zhendong Liu via B4 Relay
2026-12-05 11:24 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Zhendong Liu via B4 Relay @ 2026-12-05 10:56 UTC (permalink / raw)
To: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
Jerome Brunet
Cc: Junhao Xie, Konrad Dybcio, Taniya Das, Dmitry Baryshkov,
Krzysztof Kozlowski, linux-arm-msm, linux-clk, linux-kernel,
Zhendong Liu
From: Junhao Xie <bigfoot@radxa.com>
The bootloader on SM8750 devices can hand over with the display still
scanning out its splash screen, which simple-framebuffer or simpledrm
then keeps showing until the msm driver takes over. clk_rcg2_shared_ops
parks disp_cc_mdss_mdp_clk_src on XO when the clock is registered,
which drops the MDP core clock from 575 MHz (DISP_CC_PLL0) to 19.2 MHz
under the running scanout until a consumer enables the clock again.
On a Xiaomi Pad 8 Pro (dual-DSI DSC panel at 120 Hz), with a
simple-framebuffer node that holds the display clocks and power domains
and without clk_ignore_unused, the INTF1 and INTF2 underrun bits in the
MDP top-level interrupt status were already set at the first readout,
about 6 s after boot, in all six boots checked without this change. In
a boot with the RCG left alone at registration they stayed clear, the
timing engines kept counting at 120 Hz and the RCG kept its 575 MHz
configuration.
The other shared RCGs of this controller (mdss_ahb, mdss_esc0 and
mdss_esc1) already run from XO at handover on this device, so parking
them changes nothing, and they are left as they are.
Switch disp_cc_mdss_mdp_clk_src to clk_rcg2_shared_no_init_park_ops, as
already done for sc8280xp, x1e80100, sm8450, eliza, glymur and sm8250.
Fixes: f1080d8dab0f ("clk: qcom: dispcc-sm8750: Add SM8750 Display clock controller")
Signed-off-by: Junhao Xie <bigfoot@radxa.com>
[Zhendong: dropped the mdss_gdsc change, rewrote the commit message]
Signed-off-by: Zhendong Liu <yzddmr6@gmail.com>
---
This is the combined diff of commits 8dfa30816512 and 11463aa75c2e by
Junhao Xie in https://github.com/BigfootACA/linux (branch full-v7.1.3).
It has not been posted before, so I am sending it with his authorship
and his Signed-off-by from those commits; Junhao is on Cc.
The boots were on our downstream SM8750 tablet kernel with dispcc
built in. The register values are read from the MDP top-level
interrupt status (0x3C000300 without the change, 0x28000300 with it)
and the RCG CFG register (0x00100105, DISP_CC_PLL0 divided by 3, as
the bootloader set it). Built with W=1 (arm64 defconfig) on the base
commit below, no new warnings.
I used an AI coding assistant for this work. It ran the tests on the
tablet and drafted the commit message. I have reviewed both.
---
drivers/clk/qcom/dispcc-sm8750.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/dispcc-sm8750.c b/drivers/clk/qcom/dispcc-sm8750.c
index 3205ce5c1ad9..5e6151de8104 100644
--- a/drivers/clk/qcom/dispcc-sm8750.c
+++ b/drivers/clk/qcom/dispcc-sm8750.c
@@ -697,7 +697,7 @@ static struct clk_rcg2 disp_cc_mdss_mdp_clk_src = {
* It is not clear whether such approach should be taken instead
* of manual control.
*/
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_shared_no_init_park_ops,
},
};
---
base-commit: 4c2e4f42d53e425b90f07dc4c78e7b89aa2e0081
change-id: 20261205-upstream3-dispcc-sm8750-mdp-no-park-bb84e1d5882c
Best regards,
--
Zhendong Liu <yzddmr6@gmail.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] clk: qcom: dispcc-sm8750: Stop disp_cc_mdss_mdp_clk_src from getting parked
2026-12-05 10:56 [PATCH] clk: qcom: dispcc-sm8750: Stop disp_cc_mdss_mdp_clk_src from getting parked Zhendong Liu via B4 Relay
@ 2026-12-05 11:24 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-12-05 11:24 UTC (permalink / raw)
To: Zhendong Liu; +Cc: linux-clk
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] clk: qcom: dispcc-sm8750: clk_disable_unused() turns off PLL
under active RCG
--
commit d3a7d13de7c0040239480860fbbc22b7f0c6564c
Author: Junhao Xie <bigfoot@radxa.com>
clk: qcom: dispcc-sm8750: Stop disp_cc_mdss_mdp_clk_src from getting parked
This commit switches disp_cc_mdss_mdp_clk_src from clk_rcg2_shared_ops to
clk_rcg2_shared_no_init_park_ops so the bootloader-configured MDP clock is
not parked onto XO at registration time.
> diff --git a/drivers/clk/qcom/dispcc-sm8750.c b/drivers/clk/qcom/dispcc-sm8750.c
> index 3205ce5c1ad9e..5e6151de81047 100644
> --- a/drivers/clk/qcom/dispcc-sm8750.c
> +++ b/drivers/clk/qcom/dispcc-sm8750.c
> @@ -697,7 +697,7 @@ static struct clk_rcg2 disp_cc_mdss_mdp_clk_src = {
> * It is not clear whether such approach should be taken instead
> * of manual control.
> */
> - .ops = &clk_rcg2_shared_ops,
> + .ops = &clk_rcg2_shared_no_init_park_ops,
> },
> };
[Severity: Medium]
Can this allow clk_disable_unused() to turn off disp_cc_pll0 while
disp_cc_mdss_mdp_clk_src is still active and muxed to it?
When dispcc-sm8750 is built in and no simple-framebuffer node holds
DISP_CC_MDSS_MDP_CLK at late_initcall_sync (such as on upstream sm8750-mtp
with DRM_MSM=m and without clk_ignore_unused), clk_disable_unused_subtree()
walks disp_cc_pll0 -> disp_cc_mdss_mdp_clk_src -> disp_cc_mdss_mdp_clk.
Unlike most sibling drivers cited in the commit message,
disp_cc_mdss_mdp_clk uses clk_branch2_aon_ops (no .disable or
.disable_unused), so its branch stays enabled in hardware and keeps the RCG
active.
Because clk_rcg2_shared_no_init_park_ops omits .is_enabled,
clk_core_is_enabled() returns 0 and skips parking the RCG. disp_cc_pll0
uses clk_alpha_pll_taycan_elu_ops without CLK_IGNORE_UNUSED, so
clk_disable_unused_subtree() shuts it down under the active RCG.
As noted in clk_rcg2_shared_init(), turning off a parent PLL under an
active unparked shared RCG can leave the RCG stuck on. Once
genpd_power_off_unused() collapses mdss_gdsc, a later gdsc_enable() when
msm probes (before msm_mdss_enable() enables clocks) can wedge mdss_gdsc.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261205-upstream3-dispcc-sm8750-mdp-no-park-v1-1-0747375c5896@gmail.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-05 11:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-05 10:56 [PATCH] clk: qcom: dispcc-sm8750: Stop disp_cc_mdss_mdp_clk_src from getting parked Zhendong Liu via B4 Relay
2026-12-05 11:24 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox