Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/582209/
Link: https://lore.kernel.org/r/20240309-fd-dsi-cleanup-bridges-v1-1-962ebdba82ed@linaro.org

+11 -25
+11 -25
drivers/gpu/drm/msm/dsi/dsi_manager.c
··· 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, ··· 475 474 476 475 encoder = int_bridge->encoder; 477 476 478 - /* 479 - * Try first to create the bridge without it creating its own 480 - * connector.. currently some bridges support this, and others 481 - * do not (and some support both modes) 482 - */ 483 477 ret = drm_bridge_attach(encoder, ext_bridge, int_bridge, 484 478 DRM_BRIDGE_ATTACH_NO_CONNECTOR); 485 - if (ret == -EINVAL) { 486 - /* 487 - * link the internal dsi bridge to the external bridge, 488 - * connector is created by the next bridge. 489 - */ 490 - ret = drm_bridge_attach(encoder, ext_bridge, int_bridge, 0); 491 - if (ret < 0) 492 - return ret; 493 - } else { 494 - struct drm_connector *connector; 479 + if (ret) 480 + return ret; 495 481 496 - /* We are in charge of the connector, create one now. */ 497 - connector = drm_bridge_connector_init(dev, encoder); 498 - if (IS_ERR(connector)) { 499 - DRM_ERROR("Unable to create bridge connector\n"); 500 - return PTR_ERR(connector); 501 - } 502 - 503 - ret = drm_connector_attach_encoder(connector, encoder); 504 - if (ret < 0) 505 - return ret; 482 + connector = drm_bridge_connector_init(dev, encoder); 483 + if (IS_ERR(connector)) { 484 + DRM_ERROR("Unable to create bridge connector\n"); 485 + return PTR_ERR(connector); 506 486 } 487 + 488 + ret = drm_connector_attach_encoder(connector, encoder); 489 + if (ret < 0) 490 + return ret; 507 491 508 492 return 0; 509 493 }