return ERR_PTR(rc);
}
- if (dp_display->panel_bridge) {
+ if (dp_display->next_bridge) {
rc = drm_bridge_attach(dp_display->encoder,
- dp_display->panel_bridge, bridge,
+ dp_display->next_bridge, bridge,
DRM_BRIDGE_ATTACH_NO_CONNECTOR);
if (rc < 0) {
DRM_ERROR("failed to attach panel bridge: %d\n", rc);
return 0;
}
-static int dp_parser_find_panel(struct dp_parser *parser)
+static int dp_parser_find_next_bridge(struct dp_parser *parser)
{
struct device *dev = &parser->pdev->dev;
- struct drm_panel *panel;
- int rc;
+ struct drm_bridge *bridge;
- rc = drm_of_find_panel_or_bridge(dev->of_node, 1, 0, &panel, NULL);
- if (rc) {
- DRM_ERROR("failed to acquire DRM panel: %d\n", rc);
- return rc;
- }
+ bridge = devm_drm_of_get_bridge(dev, dev->of_node, 1, 0);
+ if (IS_ERR(bridge))
+ return PTR_ERR(bridge);
- parser->panel_bridge = devm_drm_panel_bridge_add(dev, panel);
- if (IS_ERR(parser->panel_bridge)) {
- DRM_ERROR("failed to create panel bridge\n");
- return PTR_ERR(parser->panel_bridge);
- }
+ parser->next_bridge = bridge;
return 0;
}
if (rc)
return rc;
+ /*
+ * Currently we support external bridges only for eDP connectors.
+ *
+ * No external bridges are expected for the DisplayPort connector,
+ * it is physically present in a form of a DP or USB-C connector.
+ */
if (connector_type == DRM_MODE_CONNECTOR_eDP) {
- rc = dp_parser_find_panel(parser);
- if (rc)
+ rc = dp_parser_find_next_bridge(parser);
+ if (rc) {
+ DRM_ERROR("DP: failed to find next bridge\n");
return rc;
+ }
}
/* Map the corresponding regulator information according to
struct dp_display_data disp_data;
const struct dp_regulator_cfg *regulator_cfg;
u32 max_dp_lanes;
- struct drm_bridge *panel_bridge;
+ struct drm_bridge *next_bridge;
int (*parse)(struct dp_parser *parser, int connector_type);
};