Commit 89cdd4de authored by Dmitry Baryshkov's avatar Dmitry Baryshkov

drm/msm/dsi: remove msm_dsi::encoder

There is no need anymore to stop the drm_encoder instance in struct
msm_dsi. Remove corresponding field.
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: default avatarAbhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/561697/
Link: https://lore.kernel.org/r/20231009205727.2781802-5-dmitry.baryshkov@linaro.org
parent 51c13961
......@@ -236,9 +236,7 @@ int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev,
return 0;
}
msm_dsi->encoder = encoder;
bridge = msm_dsi_manager_bridge_init(msm_dsi);
bridge = msm_dsi_manager_bridge_init(msm_dsi, encoder);
if (IS_ERR(bridge)) {
ret = PTR_ERR(bridge);
DRM_DEV_ERROR(dev->dev, "failed to create dsi bridge: %d\n", ret);
......
......@@ -41,14 +41,12 @@ struct msm_dsi {
struct device *phy_dev;
bool phy_enabled;
/* the encoder we are hooked to (outside of dsi block) */
struct drm_encoder *encoder;
int id;
};
/* dsi manager */
struct drm_bridge *msm_dsi_manager_bridge_init(struct msm_dsi *msm_dsi);
struct drm_bridge *msm_dsi_manager_bridge_init(struct msm_dsi *msm_dsi,
struct drm_encoder *encoder);
int msm_dsi_manager_ext_bridge_init(u8 id, struct drm_bridge *int_bridge);
int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg);
bool msm_dsi_manager_cmd_xfer_trigger(int id, u32 dma_base, u32 len);
......
......@@ -431,11 +431,11 @@ static const struct drm_bridge_funcs dsi_mgr_bridge_funcs = {
};
/* initialize bridge */
struct drm_bridge *msm_dsi_manager_bridge_init(struct msm_dsi *msm_dsi)
struct drm_bridge *msm_dsi_manager_bridge_init(struct msm_dsi *msm_dsi,
struct drm_encoder *encoder)
{
struct drm_bridge *bridge;
struct dsi_bridge *dsi_bridge;
struct drm_encoder *encoder;
int ret;
dsi_bridge = devm_kzalloc(msm_dsi->dev->dev,
......@@ -445,8 +445,6 @@ struct drm_bridge *msm_dsi_manager_bridge_init(struct msm_dsi *msm_dsi)
dsi_bridge->id = msm_dsi->id;
encoder = msm_dsi->encoder;
bridge = &dsi_bridge->base;
bridge->funcs = &dsi_mgr_bridge_funcs;
......@@ -474,7 +472,7 @@ int msm_dsi_manager_ext_bridge_init(u8 id, struct drm_bridge *int_bridge)
if (IS_ERR(ext_bridge))
return PTR_ERR(ext_bridge);
encoder = msm_dsi->encoder;
encoder = int_bridge->encoder;
/*
* Try first to create the bridge without it creating its own
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment