@@ -1210,15 +1210,27 @@ static const struct msm_dp_desc *dp_display_get_desc(struct platform_device *pde
1210
1210
return NULL ;
1211
1211
}
1212
1212
1213
- static int dp_auxbus_done_probe (struct drm_dp_aux * aux )
1213
+ static int dp_display_get_next_bridge (struct msm_dp * dp );
1214
+
1215
+ static int dp_display_probe_tail (struct device * dev )
1214
1216
{
1215
- int rc ;
1217
+ struct msm_dp * dp = dev_get_drvdata (dev );
1218
+ int ret ;
1216
1219
1217
- rc = component_add ( aux -> dev , & dp_display_comp_ops );
1218
- if (rc )
1219
- DRM_ERROR ( "eDP component add failed, rc=%d\n" , rc ) ;
1220
+ ret = dp_display_get_next_bridge ( dp );
1221
+ if (ret )
1222
+ return ret ;
1220
1223
1221
- return rc ;
1224
+ ret = component_add (dev , & dp_display_comp_ops );
1225
+ if (ret )
1226
+ DRM_ERROR ("component add failed, rc=%d\n" , ret );
1227
+
1228
+ return ret ;
1229
+ }
1230
+
1231
+ static int dp_auxbus_done_probe (struct drm_dp_aux * aux )
1232
+ {
1233
+ return dp_display_probe_tail (aux -> dev );
1222
1234
}
1223
1235
1224
1236
static int dp_display_probe (struct platform_device * pdev )
@@ -1293,11 +1305,9 @@ static int dp_display_probe(struct platform_device *pdev)
1293
1305
goto err ;
1294
1306
}
1295
1307
} else {
1296
- rc = component_add (& pdev -> dev , & dp_display_comp_ops );
1297
- if (rc ) {
1298
- DRM_ERROR ("component add failed, rc=%d\n" , rc );
1308
+ rc = dp_display_probe_tail (& pdev -> dev );
1309
+ if (rc )
1299
1310
goto err ;
1300
- }
1301
1311
}
1302
1312
1303
1313
return rc ;
@@ -1428,7 +1438,7 @@ static int dp_display_get_next_bridge(struct msm_dp *dp)
1428
1438
* For DisplayPort interfaces external bridges are optional, so
1429
1439
* silently ignore an error if one is not present (-ENODEV).
1430
1440
*/
1431
- rc = devm_dp_parser_find_next_bridge (dp -> drm_dev -> dev , dp_priv -> parser );
1441
+ rc = devm_dp_parser_find_next_bridge (& dp -> pdev -> dev , dp_priv -> parser );
1432
1442
if (!dp -> is_edp && rc == - ENODEV )
1433
1443
return 0 ;
1434
1444
@@ -1448,10 +1458,6 @@ int msm_dp_modeset_init(struct msm_dp *dp_display, struct drm_device *dev,
1448
1458
1449
1459
dp_priv = container_of (dp_display , struct dp_display_private , dp_display );
1450
1460
1451
- ret = dp_display_get_next_bridge (dp_display );
1452
- if (ret )
1453
- return ret ;
1454
-
1455
1461
ret = dp_bridge_init (dp_display , dev , encoder );
1456
1462
if (ret ) {
1457
1463
DRM_DEV_ERROR (dev -> dev ,
0 commit comments