From 4462aa22e7a1baa868cc7ff30764c39aaaeda892 Mon Sep 17 00:00:00 2001 From: Xenolphthalein <21215869+Xenolphthalein@users.noreply.github.com> Date: Fri, 4 Dec 2026 15:35:19 +0100 Subject: [PATCH 1/2] arm64: dts: qcom: sm8250-pico4-phoenix: the panels dark from the kernel's start The bootloader leaves the panels' enable line (GPIO 29) high with its splash on the panels. Once the kernel's display clock controller and the SMMUs probe, that scanout breaks up, and the panels, still lit, show grey until something lowers the line: for about a second at every boot, in the installed system, charger mode and the recovery. A state of the pin controller itself drives the line low when the controller probes, before the display's clock controller, the SMMUs and mdss. That takes the PDC registered early (irqchip/qcom-pdc: register before the device initcalls, on sm8250/7.2): without it the pin controller waits for the late initcalls, at 0.61 s, and the grey stays for about 170 ms. With it the line goes low at 0.17 s. A short flash before that remains; nothing the kernel does before then touches the display. The panel driver takes the line as it finds it and raises it once the panels show its picture. --- .../boot/dts/qcom/sm8250-pico4-phoenix.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250-pico4-phoenix.dts b/arch/arm64/boot/dts/qcom/sm8250-pico4-phoenix.dts index f36fec0a1b51..e216127bd49b 100644 --- a/arch/arm64/boot/dts/qcom/sm8250-pico4-phoenix.dts +++ b/arch/arm64/boot/dts/qcom/sm8250-pico4-phoenix.dts @@ -797,6 +797,10 @@ gpio-reserved-ranges = <24 2>, <27 2>, <30 2>, <64 1>, <66 1>, <73 1>, <88 3>, <112 2>, <120 5>, <146 34>; + /* The panels dark from the kernel's start (panel_enable_off below). */ + pinctrl-0 = <&panel_enable_off>; + pinctrl-names = "default"; + /* * The GD32 MCU's control lines, set as the stock serial driver sets them when it probes * the MCU's UART (boot-gpio, reset-gpio and sync-gpio of the stock tree's @@ -835,6 +839,21 @@ line-name = "display-avdd-off"; }; + /* + * The panels' enable line (29), which the bootloader leaves high, low from the kernel's + * start: mdss's reset ends the scanout of the bootloader's splash, and lit panels without + * video show grey. A state of the pin controller itself applies when it probes, right after + * the PDC (0.17 s), before the display's clock controller, the SMMUs and mdss; the panel + * driver takes the line as it finds it and raises it once the panels show its picture. + */ + panel_enable_off: panel-enable-off-state { + pins = "gpio29"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + output-low; + }; + /* The GD32 MCU's UART, two wires as in the stock tree (its control lines are the hogs above). */ qup_uart1_default: qup-uart1-default-state { pins = "gpio6", "gpio7"; From 8700db8a472deb0d9cdaee7f1895ef51002b8690 Mon Sep 17 00:00:00 2001 From: Xenolphthalein <21215869+Xenolphthalein@users.noreply.github.com> Date: Fri, 4 Dec 2026 13:17:00 +0100 Subject: [PATCH 2/2] drm/panel: pico4-ls026b3sa: the enable line low until the first light A boot's panels show nothing after their first power-on until the first light sends the power-on commands again. Raised at the first enable, the enable line lit the lenses black for those 300 ms, then the first light took it low and raised it again with the picture: the lenses changed brightness twice before the first picture. The line now stays low from the first enable until the first light raises it. The probe's comment no longer says the panels show the bootloader's splash until the first modeset: mdss's reset ends it, and the tree keeps the enable line low from the kernel's start. --- drivers/gpu/drm/panel/panel-pico4-ls026b3sa.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-pico4-ls026b3sa.c b/drivers/gpu/drm/panel/panel-pico4-ls026b3sa.c index 814b30e0531b..4c5b716d1f9c 100644 --- a/drivers/gpu/drm/panel/panel-pico4-ls026b3sa.c +++ b/drivers/gpu/drm/panel/panel-pico4-ls026b3sa.c @@ -194,13 +194,16 @@ static int pico4_enable(struct drm_panel *panel) { struct pico4_panel *ctx = to_pico4_panel(panel); - gpiod_direction_output(ctx->backlight, !backlight_is_blank(ctx->bl)); ctx->enabled = true; ctx->dimmed = backlight_is_blank(ctx->bl); - if (!ctx->lit) { - ctx->lit = true; - schedule_delayed_work(&ctx->first_light, msecs_to_jiffies(300)); + if (ctx->lit) { + gpiod_direction_output(ctx->backlight, !ctx->dimmed); + return 0; } + /* Lit now, the lenses would glow black until the first light: the line stays low until then. */ + gpiod_direction_output(ctx->backlight, 0); + ctx->lit = true; + schedule_delayed_work(&ctx->first_light, msecs_to_jiffies(300)); return 0; } @@ -419,7 +422,10 @@ static int pico4_probe(struct mipi_dsi_device *dsi) ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), ctx->supplies); if (ret) return dev_err_probe(dev, ret, "supplies\n"); - /* As the bootloader left them: the panels show its splash until the first modeset. */ + /* + * Reset and VIO as the bootloader left them, until the first modeset; the enable line is + * low from the kernel's start (the tree's pin state), the lenses dark since mdss's reset. + */ ctx->reset = devm_gpiod_get(dev, "reset", GPIOD_ASIS); if (IS_ERR(ctx->reset)) return dev_err_probe(dev, PTR_ERR(ctx->reset), "reset gpio\n");