Skip to content

Commit 9febe4a

Browse files
committed
drm/msm/dsi: remove the drm_bridge_attach fallback
All the bridges that are being used with the MSM DSI hosts have been converted to support DRM_BRIDGE_ATTACH_NO_CONNECTOR. Drop the fallback code and require DRM_BRIDGE_ATTACH_NO_CONNECTOR to be supported by the downstream bridges. Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/582209/ Link: https://lore.kernel.org/r/[email protected]
1 parent 0efadfb commit 9febe4a

File tree

1 file changed

+11
-25
lines changed

1 file changed

+11
-25
lines changed

drivers/gpu/drm/msm/dsi/dsi_manager.c

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ int msm_dsi_manager_ext_bridge_init(u8 id, struct drm_bridge *int_bridge)
465465
struct drm_device *dev = msm_dsi->dev;
466466
struct drm_encoder *encoder;
467467
struct drm_bridge *ext_bridge;
468+
struct drm_connector *connector;
468469
int ret;
469470

470471
ext_bridge = devm_drm_of_get_bridge(&msm_dsi->pdev->dev,
@@ -474,36 +475,21 @@ int msm_dsi_manager_ext_bridge_init(u8 id, struct drm_bridge *int_bridge)
474475

475476
encoder = int_bridge->encoder;
476477

477-
/*
478-
* Try first to create the bridge without it creating its own
479-
* connector.. currently some bridges support this, and others
480-
* do not (and some support both modes)
481-
*/
482478
ret = drm_bridge_attach(encoder, ext_bridge, int_bridge,
483479
DRM_BRIDGE_ATTACH_NO_CONNECTOR);
484-
if (ret == -EINVAL) {
485-
/*
486-
* link the internal dsi bridge to the external bridge,
487-
* connector is created by the next bridge.
488-
*/
489-
ret = drm_bridge_attach(encoder, ext_bridge, int_bridge, 0);
490-
if (ret < 0)
491-
return ret;
492-
} else {
493-
struct drm_connector *connector;
494-
495-
/* We are in charge of the connector, create one now. */
496-
connector = drm_bridge_connector_init(dev, encoder);
497-
if (IS_ERR(connector)) {
498-
DRM_ERROR("Unable to create bridge connector\n");
499-
return PTR_ERR(connector);
500-
}
480+
if (ret)
481+
return ret;
501482

502-
ret = drm_connector_attach_encoder(connector, encoder);
503-
if (ret < 0)
504-
return ret;
483+
connector = drm_bridge_connector_init(dev, encoder);
484+
if (IS_ERR(connector)) {
485+
DRM_ERROR("Unable to create bridge connector\n");
486+
return PTR_ERR(connector);
505487
}
506488

489+
ret = drm_connector_attach_encoder(connector, encoder);
490+
if (ret < 0)
491+
return ret;
492+
507493
return 0;
508494
}
509495

0 commit comments

Comments
 (0)