[PATCH 14/35] drm/panel: remove drm_panel.connector_type
From: Dmitry Baryshkov
Date: Mon Oct 26 2026 - 07:19:04 EST
The connector type is stored twice, in the panel and in the bridge
embedded into it. Keep only the bridge one, which is what the rest of
the DRM core looks at.
Assisted-by: LLM
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
---
drivers/gpu/drm/drm_panel.c | 9 ++++-----
include/drm/drm_panel.h | 9 ---------
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c
index ab701a526ef9..5bc97166bcb8 100644
--- a/drivers/gpu/drm/drm_panel.c
+++ b/drivers/gpu/drm/drm_panel.c
@@ -86,7 +86,7 @@ static int panel_bridge_attach(struct drm_bridge *bridge,
ret = drm_connector_init(bridge->dev, connector,
&panel_bridge_connector_funcs,
- panel->connector_type);
+ panel->bridge.type);
if (ret) {
DRM_ERROR("Failed to initialize connector\n");
return ret;
@@ -258,7 +258,7 @@ EXPORT_SYMBOL(drm_bridge_is_panel);
* drm_mode_config_cleanup() if the bridge has already been attached), then
* drm_panel_bridge_remove() to free it.
*
- * The connector type is set to @panel->connector_type, which must be set to a
+ * The connector type is set to @panel->bridge.type, which must be set to a
* known type. Calling this function with a panel whose connector type is
* DRM_MODE_CONNECTOR_Unknown will return ERR_PTR(-EINVAL).
*
@@ -267,7 +267,7 @@ EXPORT_SYMBOL(drm_bridge_is_panel);
*/
struct drm_bridge *drm_panel_bridge_add(struct drm_panel *panel)
{
- if (WARN_ON(panel->connector_type == DRM_MODE_CONNECTOR_Unknown))
+ if (WARN_ON(panel->bridge.type == DRM_MODE_CONNECTOR_Unknown))
return ERR_PTR(-EINVAL);
return drm_bridge_get(&panel->bridge);
@@ -527,7 +527,7 @@ static void drm_panel_init(struct drm_panel *panel, struct device *dev,
mutex_init(&panel->follower_lock);
panel->dev = dev;
panel->funcs = funcs;
- panel->connector_type = connector_type;
+ panel->bridge.type = connector_type;
}
/**
@@ -547,7 +547,6 @@ void drm_panel_add(struct drm_panel *panel)
panel->bridge.of_node = panel->dev->of_node;
panel->bridge.ops = DRM_BRIDGE_OP_MODES;
- panel->bridge.type = panel->connector_type;
panel->bridge.pre_enable_prev_first = panel->prepare_prev_first;
drm_bridge_add(&panel->bridge);
diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
index 07612e9791cd..579b6be855c7 100644
--- a/include/drm/drm_panel.h
+++ b/include/drm/drm_panel.h
@@ -236,15 +236,6 @@ struct drm_panel {
*/
struct drm_connector connector;
- /**
- * @connector_type:
- *
- * Type of the panel as a DRM_MODE_CONNECTOR_* value. This is used to
- * initialise the drm_connector corresponding to the panel with the
- * correct connector type.
- */
- int connector_type;
-
/**
* @list:
*
--
2.47.3