mirror of https://gitee.com/openkylin/linux.git
drm/msm/dsi: Use the new setup_encoder function in attach_dsi_device
Now that we have a function to call set_encoder_mode() for us, use it. Reviewed-by: Rob Clark <robdclark@chromium.org> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190617201301.133275-8-sean@poorly.run
This commit is contained in:
parent
faccd71cec
commit
970524b07a
|
@ -96,7 +96,7 @@ struct drm_connector *msm_dsi_manager_connector_init(u8 id);
|
||||||
struct drm_connector *msm_dsi_manager_ext_bridge_init(u8 id);
|
struct drm_connector *msm_dsi_manager_ext_bridge_init(u8 id);
|
||||||
int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg);
|
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);
|
bool msm_dsi_manager_cmd_xfer_trigger(int id, u32 dma_base, u32 len);
|
||||||
void msm_dsi_manager_attach_dsi_device(int id, u32 device_flags);
|
void msm_dsi_manager_attach_dsi_device(int id);
|
||||||
int msm_dsi_manager_register(struct msm_dsi *msm_dsi);
|
int msm_dsi_manager_register(struct msm_dsi *msm_dsi);
|
||||||
void msm_dsi_manager_unregister(struct msm_dsi *msm_dsi);
|
void msm_dsi_manager_unregister(struct msm_dsi *msm_dsi);
|
||||||
bool msm_dsi_manager_validate_current_config(u8 id);
|
bool msm_dsi_manager_validate_current_config(u8 id);
|
||||||
|
|
|
@ -1598,7 +1598,7 @@ static int dsi_host_attach(struct mipi_dsi_host *host,
|
||||||
msm_host->format = dsi->format;
|
msm_host->format = dsi->format;
|
||||||
msm_host->mode_flags = dsi->mode_flags;
|
msm_host->mode_flags = dsi->mode_flags;
|
||||||
|
|
||||||
msm_dsi_manager_attach_dsi_device(msm_host->id, dsi->mode_flags);
|
msm_dsi_manager_attach_dsi_device(msm_host->id);
|
||||||
|
|
||||||
/* Some gpios defined in panel DT need to be controlled by host */
|
/* Some gpios defined in panel DT need to be controlled by host */
|
||||||
ret = dsi_host_init_panel_gpios(msm_host, &dsi->dev);
|
ret = dsi_host_init_panel_gpios(msm_host, &dsi->dev);
|
||||||
|
|
|
@ -787,14 +787,10 @@ bool msm_dsi_manager_cmd_xfer_trigger(int id, u32 dma_base, u32 len)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void msm_dsi_manager_attach_dsi_device(int id, u32 device_flags)
|
void msm_dsi_manager_attach_dsi_device(int id)
|
||||||
{
|
{
|
||||||
struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
|
struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
|
||||||
struct drm_device *dev;
|
struct drm_device *dev;
|
||||||
struct msm_drm_private *priv;
|
|
||||||
struct msm_kms *kms;
|
|
||||||
struct drm_encoder *encoder;
|
|
||||||
bool cmd_mode;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* drm_device pointer is assigned to msm_dsi only in the modeset_init
|
* drm_device pointer is assigned to msm_dsi only in the modeset_init
|
||||||
|
@ -816,14 +812,7 @@ void msm_dsi_manager_attach_dsi_device(int id, u32 device_flags)
|
||||||
if (!dev)
|
if (!dev)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
priv = dev->dev_private;
|
msm_dsi_manager_setup_encoder(id);
|
||||||
kms = priv->kms;
|
|
||||||
encoder = msm_dsi_get_encoder(msm_dsi);
|
|
||||||
cmd_mode = !(device_flags &
|
|
||||||
MIPI_DSI_MODE_VIDEO);
|
|
||||||
|
|
||||||
if (encoder && kms->funcs->set_encoder_mode)
|
|
||||||
kms->funcs->set_encoder_mode(kms, encoder, cmd_mode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int msm_dsi_manager_register(struct msm_dsi *msm_dsi)
|
int msm_dsi_manager_register(struct msm_dsi *msm_dsi)
|
||||||
|
|
Loading…
Reference in New Issue