@@ -465,6 +465,7 @@ int msm_dsi_manager_ext_bridge_init(u8 id, struct drm_bridge *int_bridge)
465
465
struct drm_device * dev = msm_dsi -> dev ;
466
466
struct drm_encoder * encoder ;
467
467
struct drm_bridge * ext_bridge ;
468
+ struct drm_connector * connector ;
468
469
int ret ;
469
470
470
471
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)
474
475
475
476
encoder = int_bridge -> encoder ;
476
477
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
- */
482
478
ret = drm_bridge_attach (encoder , ext_bridge , int_bridge ,
483
479
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 ;
501
482
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 );
505
487
}
506
488
489
+ ret = drm_connector_attach_encoder (connector , encoder );
490
+ if (ret < 0 )
491
+ return ret ;
492
+
507
493
return 0 ;
508
494
}
509
495
0 commit comments