[PATCH] clk: qcom: dispcc-sm8250: Don't park mdp_clk_src at registration

From: Roman Linev

Date: Sat Nov 21 2026 - 21:40:11 EST


Parking disp_cc_mdss_mdp_clk_src at registration time breaks the EFI
GOP framebuffer on the HUAWEI MateBook E Go 2022 (gaokun2, SC8180X):
the panel goes dark as soon as dispcc-sm8250 probes and stays dark,
while simpledrm keeps rendering into the framebuffer.

Use clk_rcg2_shared_no_init_park_ops for disp_cc_mdss_mdp_clk_src, as
was done for sc8280xp and x1e80100, so registering the clock no longer
reconfigures it. The firmware framebuffer then keeps working until the
display driver takes over, as long as its other resources (MDSS_GDSC,
the MDP branch and the display PLL) stay enabled.

Tested on gaokun2 with an out-of-tree DT whose simple-framebuffer node
holds MDSS_GDSC, dispcc-sm8250 built as a module, and clk_ignore_unused
pd_ignore_unused on the command line. With the patch the panel stays
lit; without the patch the panel goes dark (v7.4-rc3 and v7.3-rc2
based kernels). Built-in dispcc-sm8250 and the unused-clock sweep were
not tested. This driver also serves sm8150, sm8250 and sm8350; only
sc8180x was tested.

The cause was localized and the change tested with the help of an AI
coding assistant (Anthropic Claude).

Fixes: 01a0a6cc8cfd ("clk: qcom: Park shared RCGs upon registration")
Signed-off-by: Roman Linev <admin@xxxxxxxx>
---

Notes:
Testing (HUAWEI MateBook E Go 2022 LTE, SC8180X, booted from USB via GRUB
with an out-of-tree gaokun2 DT; Ubuntu userspace, GNOME on simpledrm):

The DT describes the EFI GOP framebuffer as a simple-framebuffer in
/chosen with power-domains = <&dispcc MDSS_GDSC>; without that holder
MDSS_GDSC is powered off at dispcc's genpd sync_state, which also
blanks the panel independently of this patch. With the holder in place
and dispcc-sm8250 loaded as a module (deferred_probe_timeout=30 so
simpledrm binds after it; clk_ignore_unused pd_ignore_unused on every
boot, so the unused-clock sweep never ran), each pair differs only in
this one line:

kernel stock dispcc-sm8250 with this patch
v7.4-rc3 panel black desktop visible
Ubuntu 7.3.0-15 (rc2) panel black desktop visible

In both black cases the kernel log shows simpledrm bound to the DT
framebuffer, MDSS_GDSC on and GNOME rendering (KMS readback of the
framebuffer shows the desktop), but the physical panel stays dark from
the moment dispcc-sm8250 probes. Only the sc8180x path was tested.

Prior art: Val Packett's downstream linux-qclaptops tree carries the
same one-line change for the Surface Pro X (commit 88aee348d602, "mostly
for sc8180x"); I came across it while researching the issue, next to
the merged sc8280xp/x1e80100 fixes it mirrors, and did not find it
posted to linux-clk. This report is from a different device, the HUAWEI
MateBook E Go 2022 (gaokun2), where the failure looks different:
MDSS_GDSC is held on by a simple-framebuffer node and scanout still
stops. The tests above isolate the parking as the cause on two kernels.

Tool use: an AI coding assistant (Anthropic Claude) was used to
compare this driver with the sc8280xp/x1e80100 fixes, build the test
kernels/modules and analyse the boot logs; the change itself is the
one-line ops swap from those fixes. All hardware observations were made
by me on the device.

drivers/clk/qcom/dispcc-sm8250.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/qcom/dispcc-sm8250.c b/drivers/clk/qcom/dispcc-sm8250.c
index dc62eb18de..4a94b4c5a9 100644
--- a/drivers/clk/qcom/dispcc-sm8250.c
+++ b/drivers/clk/qcom/dispcc-sm8250.c
@@ -564,7 +564,7 @@ static struct clk_rcg2 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,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_shared_no_init_park_ops,
},
};


base-commit: fbfe0c4beecfbd0e2958d91e5c95ff189bc489a0
--
2.56.1