[PATCH 1/5] drm/rockchip: lvds: Do not override the panel bridge funcs

From: Molnár Máté via B4 Relay

Date: Sat Dec 05 2026 - 22:08:51 EST


From: Molnár Máté <matemolnar88@xxxxxxxxx>

rockchip_lvds_bind() wraps the panel in a panel bridge and then replaces
that bridge's funcs, ops and driver_private with its own, which only
implement get_modes() through lvds->panel. Since commit b71a623598d3
("drm/panel: of_drm_find_panel() return a counted reference"), lvds->panel
is cleared right after the panel bridge is created, so:

- the panel bridge's own pre_enable/enable/disable/post_disable are
gone, and nothing calls the panel's prepare/enable any more;
- the drm_panel_prepare()/drm_panel_enable() calls left in the RK3288
and PX30 encoder hooks now get a NULL panel and do nothing.

The panel supply is never enabled and the panel stays dark. On an RK3126
board with a panel-lvds panel, vcc_lcd is switched off by the regulator
core's unused-regulator cleanup while the CRTC is active.

The panel bridge already provides modes, atomic state handling and the
panel power sequence, so drop the override and the now unused
rockchip_lvds_bridge_funcs.

Fixes: b71a623598d3 ("drm/panel: of_drm_find_panel() return a counted reference")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Molnár Máté <matemolnar88@xxxxxxxxx>
---
drivers/gpu/drm/rockchip/rockchip_lvds.c | 26 --------------------------
1 file changed, 26 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c
index 6b51fab44..231258974 100644
--- a/drivers/gpu/drm/rockchip/rockchip_lvds.c
+++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c
@@ -60,11 +60,6 @@ struct rockchip_lvds {
struct dev_pin_info *pins;
};

-static inline struct rockchip_lvds *brige_to_lvds(struct drm_bridge *bridge)
-{
- return (struct rockchip_lvds *)bridge->driver_private;
-}
-
static inline struct rockchip_lvds *encoder_to_lvds(struct drm_encoder *encoder)
{
struct rockchip_encoder *rkencoder = to_rockchip_encoder(encoder);
@@ -105,23 +100,6 @@ static inline int rockchip_lvds_name_to_output(const char *s)
return -EINVAL;
}

-static int
-rockchip_lvds_bridge_get_modes(struct drm_bridge *bridge, struct drm_connector *connector)
-{
- struct rockchip_lvds *lvds = brige_to_lvds(bridge);
- struct drm_panel *panel = lvds->panel;
-
- return drm_panel_get_modes(panel, connector);
-}
-
-static const
-struct drm_bridge_funcs rockchip_lvds_bridge_funcs = {
- .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
- .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
- .atomic_create_state = drm_atomic_helper_bridge_create_state,
- .get_modes = rockchip_lvds_bridge_get_modes,
-};
-
static int
rockchip_lvds_encoder_atomic_check(struct drm_encoder *encoder,
struct drm_crtc_state *crtc_state,
@@ -618,10 +596,6 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master,
}

if (lvds->bridge) {
- lvds->bridge->driver_private = lvds;
- lvds->bridge->ops = DRM_BRIDGE_OP_MODES;
- lvds->bridge->funcs = &rockchip_lvds_bridge_funcs;
-
ret = drm_bridge_attach(encoder, lvds->bridge, NULL, DRM_BRIDGE_ATTACH_NO_CONNECTOR);
if (ret)
goto err_free_bridge;

--
2.43.0