@@ -44,9 +44,21 @@ static int panel_bridge_connector_get_modes(struct drm_connector *connector)
return drm_panel_get_modes(panel_bridge->panel);
}
+static int
+panel_bridge_connector_detect_ctx(struct drm_connector *connector,
+ struct drm_modeset_acquire_ctx *ctx,
+ bool force)
+{
+ struct panel_bridge *panel_bridge =
+ drm_connector_to_panel_bridge(connector);
+
+ return drm_panel_detect(panel_bridge->panel);
+}
+
static const struct drm_connector_helper_funcs
panel_bridge_connector_helper_funcs = {
.get_modes = panel_bridge_connector_get_modes,
+ .detect_ctx = panel_bridge_connector_detect_ctx,
};
static const struct drm_connector_funcs panel_bridge_connector_funcs = {
@@ -68,6 +80,7 @@ static int panel_bridge_attach(struct drm_bridge *bridge)
return -ENODEV;
}
+ connector->polled = panel_bridge->panel->polled;
drm_connector_helper_add(connector,
&panel_bridge_connector_helper_funcs);
The DRM panel framework now exposes a way to know whether a panel is connected or disconnected. Use this panel detection logic to implement the connector->detect_ctx() method and allow one to report when a panel is connected or disconnected which is particularly useful to support panels connected through extension boards. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> --- drivers/gpu/drm/bridge/panel.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)