From: Jackie Li <[email protected]> execute "xrandr --output MIPI0 --rotate left" then "xrandr --output MIPI0 --rotate normal" will lead to MIPI1 crash. the root cause for this issue was that X will do mode-setting following a sequence like MIPI1 -> MIPI0. current kernel driver will reject mode setting to MIPI1 if MIPI0 was power off.
the reason that we rejected mode setting to MIPI1 before MIPI0 was to force KMS driver into a stable state which is aligned with the state set by FW, or KMS driver will be failed. this fix moved this checking into dsi output init, and remove the check in dsi mode setting callback. this will make sure X mode setting sequence change won't have any impacts as long as the KMS driver was initialized correctly. NOTE: we still have no way to detect MIPI port status during KMS driver loading. so current driver only hard-coded to force driver get into a certain state. this may be a problem if some changes happend in FW. Signed-off-by: Jackie Li <[email protected]> Signed-off-by: Justin Dou <[email protected]> Signed-off-by: Hitesh K. Patel <[email protected]> --- drivers/staging/mrst/drv/mdfld_dsi_output.c | 10 +++++++--- drivers/staging/mrst/drv/pyr_cmd.c | 5 ----- drivers/staging/mrst/drv/tpo_cmd.c | 5 ----- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/staging/mrst/drv/mdfld_dsi_output.c b/drivers/staging/mrst/drv/mdfld_dsi_output.c index 42c7b17..ecc8046 100644 --- a/drivers/staging/mrst/drv/mdfld_dsi_output.c +++ b/drivers/staging/mrst/drv/mdfld_dsi_output.c @@ -921,11 +921,15 @@ void mdfld_dsi_output_init(struct drm_device * dev, goto dsi_init_err0; } - if(pipe) + if(pipe && dev_priv->dsi_configs[0]) dev_priv->dsi_configs[1] = dsi_config; - else + else if(pipe == 0) dev_priv->dsi_configs[0] = dsi_config; - + else { + DRM_ERROR("Trying to init MIPI1 before MIPI0\n"); + goto dsi_init_err0; + } + /*init drm connector object*/ psb_output = &dsi_connector->base; diff --git a/drivers/staging/mrst/drv/pyr_cmd.c b/drivers/staging/mrst/drv/pyr_cmd.c index 06618a1..b152711 100644 --- a/drivers/staging/mrst/drv/pyr_cmd.c +++ b/drivers/staging/mrst/drv/pyr_cmd.c @@ -271,11 +271,6 @@ static void pyr_dsi_dbi_mode_set(struct drm_encoder * encoder, PSB_DEBUG_ENTRY("h %d v %d\n", mode->hdisplay, mode->vdisplay); if(pipe == 2) { - if(!dev_priv->dbi_panel_on) { - DRM_ERROR("bad thing happened\n"); - return; - } - mipi_reg = MIPI_C; dspcntr_reg = DSPCCNTR; pipeconf_reg = PIPECCONF; diff --git a/drivers/staging/mrst/drv/tpo_cmd.c b/drivers/staging/mrst/drv/tpo_cmd.c index b159ac7..27b5b6a 100644 --- a/drivers/staging/mrst/drv/tpo_cmd.c +++ b/drivers/staging/mrst/drv/tpo_cmd.c @@ -249,11 +249,6 @@ static void mdfld_dsi_dbi_mode_set(struct drm_encoder * encoder, PSB_DEBUG_ENTRY("h %d v %d\n", mode->hdisplay, mode->vdisplay); if(pipe == 2) { - if(!dev_priv->dbi_panel_on) { - DRM_ERROR("bad thing happened\n"); - return; - } - mipi_reg = MIPI_C; dspcntr_reg = DSPCCNTR; pipeconf_reg = PIPECCONF; -- 1.7.1 _______________________________________________ MeeGo-kernel mailing list [email protected] http://lists.meego.com/listinfo/meego-kernel
