]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/panel: simple: restore connector_type fallback
authorLudovic Desroches <ludovic.desroches@microchip.com>
Thu, 18 Dec 2025 13:34:43 +0000 (14:34 +0100)
committerNeil Armstrong <neil.armstrong@linaro.org>
Tue, 13 Jan 2026 09:07:40 +0000 (10:07 +0100)
commit9380dc33cd6ae4a6857818fcefce31cf716f3fae
treeece7e088d8ec7b3b8c60ba11321326a26c2c89a7
parent6ab3d4353bf75005eaa375677c9fed31148154d6
drm/panel: simple: restore connector_type fallback

The switch from devm_kzalloc() + drm_panel_init() to
devm_drm_panel_alloc() introduced a regression.

Several panel descriptors do not set connector_type. For those panels,
panel_simple_probe() used to compute a connector type (currently DPI as a
fallback) and pass that value to drm_panel_init(). After the conversion
to devm_drm_panel_alloc(), the call unconditionally used
desc->connector_type instead, ignoring the computed fallback and
potentially passing DRM_MODE_CONNECTOR_Unknown, which
drm_panel_bridge_add() does not allow.

Move the connector_type validation / fallback logic before the
devm_drm_panel_alloc() call and pass the computed connector_type to
devm_drm_panel_alloc(), so panels without an explicit connector_type
once again get the DPI default.

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Fixes: de04bb0089a9 ("drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()")
Cc: stable@vger.kernel.org
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://lore.kernel.org/stable/20251126-lcd_panel_connector_type_fix-v2-1-c15835d1f7cb%40microchip.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20251218-lcd_panel_connector_type_fix-v3-1-ddcea6d8d7ef@microchip.com
drivers/gpu/drm/panel/panel-simple.c