kernel/spacemit: let lt8911exb own the panel backlight

lt8911exb registers a drm_panel but never calls drm_panel_of_backlight(),
so drm_panel_enable() had no backlight to unblank. Bind it at enable time
rather than at probe, because pwm_bl registers after this bridge and
failing the probe on -EPROBE_DEFER stalls the DSI bind.

Signed-off-by: SuperKali <hello@superkali.me>
This commit is contained in:
SuperKali
2026-08-26 22:06:20 +02:00
committed by Igor
parent 53eed8bbfc
commit c31b79a96f
@@ -0,0 +1,36 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: SuperKali <hello@superkali.me>
Date: Mon, 24 Aug 2026 00:27:41 +0200
Subject: drm: spacemit: lt8911exb: pick up the panel backlight from the DT
The driver registers a drm_panel but never calls drm_panel_of_backlight(),
so panel->backlight stays NULL and drm_panel_enable() has nothing to
unblank. pwm_bl leaves the backlight at FB_BLANK_POWERDOWN whenever the
node carries a phandle, which dtc -@ always adds, so the panel came up lit
by nothing at duty 0. Bind at enable time: pwm_bl registers after this
bridge, and failing the probe on -EPROBE_DEFER would stall the DSI bind.
Signed-off-by: SuperKali <hello@superkali.me>
---
drivers/gpu/drm/spacemit/lt8911exb.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/spacemit/lt8911exb.c b/drivers/gpu/drm/spacemit/lt8911exb.c
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/spacemit/lt8911exb.c
+++ b/drivers/gpu/drm/spacemit/lt8911exb.c
@@ -1152,6 +1152,11 @@ static int lt8911exb_panel_enable(struct drm_panel *panel)
struct lt8911exb *lt8911exb = panel_to_lt8911exb(panel);
DRM_INFO("%s()\n", __func__);
+
+ /* pwm_bl registers after this bridge, so bind the backlight here */
+ if (!panel->backlight)
+ drm_panel_of_backlight(panel);
+
if (!IS_ERR_OR_NULL(lt8911exb->enable_gpio)) {
gpiod_direction_output(lt8911exb->enable_gpio, 1);
}
--
Armbian