drm/msm/dsi: stop calling set_split_display
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Mon, 9 Oct 2023 20:57:25 +0000 (23:57 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Sun, 11 Feb 2024 20:38:06 +0000 (22:38 +0200)
Since the commit 8b03ad30e314 ("drm/msm/dsi: Use one connector for dual
DSI mode"), the second DSI host in the bonded pair will not be
associated with the encoder and will not get the bridges, thus making
condition in msm_dsi_manager_set_split_display() always false.

Technically that change broke bonded DSI support in the MDP5 driver. But
since nobody complained in the last 5.5 years, it seems that nobody
cares enough.

Drop the msm_dsi_manager_set_split_display() completely and stop calling
the set_split_display() KMS callback. Also remove the
msm_dsi::external_bridge field which was only used by the mentioned
function.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/561695/
Link: https://lore.kernel.org/r/20231009205727.2781802-4-dmitry.baryshkov@linaro.org
drivers/gpu/drm/msm/dsi/dsi.h
drivers/gpu/drm/msm/dsi/dsi_manager.c

index 3f778d9efba04ce0739b9be25a9db4e1310ee120..de34e7caa5c82a9c5c7da107dff88a1a3dac497a 100644 (file)
@@ -38,11 +38,6 @@ struct msm_dsi {
        struct mipi_dsi_host *host;
        struct msm_dsi_phy *phy;
 
-       /*
-        * external_bridge connected to dsi bridge output
-        */
-       struct drm_bridge *external_bridge;
-
        struct device *phy_dev;
        bool phy_enabled;
 
index 4b49911ec43a350ef1736739092c64f83db6051b..0cf4e301ed2c9f35c2611ccb6942519f24cc79b2 100644 (file)
@@ -198,36 +198,6 @@ static int dsi_mgr_bridge_get_id(struct drm_bridge *bridge)
        return dsi_bridge->id;
 }
 
-static void msm_dsi_manager_set_split_display(u8 id)
-{
-       struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
-       struct msm_dsi *other_dsi = dsi_mgr_get_other_dsi(id);
-       struct msm_drm_private *priv = msm_dsi->dev->dev_private;
-       struct msm_kms *kms = priv->kms;
-       struct msm_dsi *master_dsi, *slave_dsi;
-
-       if (IS_BONDED_DSI() && !IS_MASTER_DSI_LINK(id)) {
-               master_dsi = other_dsi;
-               slave_dsi = msm_dsi;
-       } else {
-               master_dsi = msm_dsi;
-               slave_dsi = other_dsi;
-       }
-
-       if (!msm_dsi->external_bridge || !IS_BONDED_DSI())
-               return;
-
-       /*
-        * Set split display info to kms once bonded DSI panel is connected to
-        * both hosts.
-        */
-       if (other_dsi && other_dsi->external_bridge && kms->funcs->set_split_display) {
-               kms->funcs->set_split_display(kms, master_dsi->encoder,
-                                             slave_dsi->encoder,
-                                             msm_dsi_is_cmd_mode(msm_dsi));
-       }
-}
-
 static int dsi_mgr_bridge_power_on(struct drm_bridge *bridge)
 {
        int id = dsi_mgr_bridge_get_id(bridge);
@@ -504,8 +474,6 @@ int msm_dsi_manager_ext_bridge_init(u8 id, struct drm_bridge *int_bridge)
        if (IS_ERR(ext_bridge))
                return PTR_ERR(ext_bridge);
 
-       msm_dsi->external_bridge = ext_bridge;
-
        encoder = msm_dsi->encoder;
 
        /*
@@ -538,9 +506,6 @@ int msm_dsi_manager_ext_bridge_init(u8 id, struct drm_bridge *int_bridge)
                        return ret;
        }
 
-       /* The pipeline is ready, ping encoders if necessary */
-       msm_dsi_manager_set_split_display(id);
-
        return 0;
 }