diff options
author | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2024-03-09 18:09:05 +0300 |
---|---|---|
committer | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2024-04-22 16:22:50 +0300 |
commit | 9febe4a015b97952bd086a21062a55c49f31a117 (patch) | |
tree | 76bc55735f4c0d6aa8a3638f9b5cc1ae643b03d2 /drivers/gpu/drm | |
parent | 0efadfb0050e1b65c14650406d8c7e5126c08b69 (diff) | |
download | linux-9febe4a015b97952bd086a21062a55c49f31a117.tar.xz |
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
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/msm/dsi/dsi_manager.c | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c index af2a287cb3bd..a7c7f85b73e4 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c @@ -465,6 +465,7 @@ int msm_dsi_manager_ext_bridge_init(u8 id, struct drm_bridge *int_bridge) struct drm_device *dev = msm_dsi->dev; struct drm_encoder *encoder; struct drm_bridge *ext_bridge; + struct drm_connector *connector; int ret; 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) encoder = int_bridge->encoder; - /* - * Try first to create the bridge without it creating its own - * connector.. currently some bridges support this, and others - * do not (and some support both modes) - */ ret = drm_bridge_attach(encoder, ext_bridge, int_bridge, DRM_BRIDGE_ATTACH_NO_CONNECTOR); - if (ret == -EINVAL) { - /* - * link the internal dsi bridge to the external bridge, - * connector is created by the next bridge. - */ - ret = drm_bridge_attach(encoder, ext_bridge, int_bridge, 0); - if (ret < 0) - return ret; - } else { - struct drm_connector *connector; - - /* We are in charge of the connector, create one now. */ - connector = drm_bridge_connector_init(dev, encoder); - if (IS_ERR(connector)) { - DRM_ERROR("Unable to create bridge connector\n"); - return PTR_ERR(connector); - } + if (ret) + return ret; - ret = drm_connector_attach_encoder(connector, encoder); - if (ret < 0) - return ret; + connector = drm_bridge_connector_init(dev, encoder); + if (IS_ERR(connector)) { + DRM_ERROR("Unable to create bridge connector\n"); + return PTR_ERR(connector); } + ret = drm_connector_attach_encoder(connector, encoder); + if (ret < 0) + return ret; + return 0; } |