GFX-Display: fix flip flash when do display resume
authorshi yang <yang.a.shi@intel.com>
Thu, 22 Mar 2012 03:33:11 +0000 (11:33 +0800)
committerbuildbot <buildbot@intel.com>
Wed, 11 Apr 2012 01:05:02 +0000 (18:05 -0700)
BZ: 28372

when do display resume, the sceen will flash to the former app ui
screen. So save the init black screen base value to hardware context
of MIPI. And resume will not show flash now.

Change-Id: Ia31a1e68983bfeffc193c52919da1acb8439b0b0
Signed-off-by: shi yang <yang.a.shi@intel.com>
Reviewed-on: http://android.intel.com:8080/40092
Reviewed-by: Liu, Chuansheng <chuansheng.liu@intel.com>
Reviewed-by: Pan, Zhenjie <zhenjie.pan@intel.com>
Reviewed-by: Tu, Yun <yun.tu@intel.com>
Reviewed-by: Ai, Ke <ke.ai@intel.com>
Reviewed-by: Xu, Randy <randy.xu@intel.com>
Tested-by: Tong, BoX <box.tong@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/staging/mrst/drv/mdfld_dsi_dpi.c

index ee4dfe9..35774b0 100644 (file)
@@ -1621,6 +1621,7 @@ static int __dpi_panel_power_off(struct mdfld_dsi_config *dsi_config,
        struct mdfld_dsi_hw_registers *regs;
        struct mdfld_dsi_hw_context *ctx;
        struct drm_device *dev;
+       struct drm_psb_private *dev_priv;
        int retry;
        int pipe0_enabled;
        int pipe2_enabled;
@@ -1632,6 +1633,7 @@ static int __dpi_panel_power_off(struct mdfld_dsi_config *dsi_config,
        regs = &dsi_config->regs;
        ctx = &dsi_config->dsi_hw_context;
        dev = dsi_config->dev;
+       dev_priv = dev->dev_private;
 
        if (!ospm_power_using_hw_begin(OSPM_DISPLAY_ISLAND,
                                        OSPM_UHB_FORCE_POWER_ON))
@@ -1642,8 +1644,8 @@ static int __dpi_panel_power_off(struct mdfld_dsi_config *dsi_config,
                DRM_ERROR("Failed to set panel brightness\n");
 
        /*save the plane informaton, for it will updated*/
-       ctx->dspsurf = REG_READ(regs->dspsurf_reg);
-       ctx->dsplinoff = REG_READ(regs->dsplinoff_reg);
+       ctx->dspsurf = dev_priv->init_screen_start;
+       ctx->dsplinoff = dev_priv->init_screen_offset;
        ctx->pipestat = REG_READ(regs->pipestat_reg);
 
        tmp = REG_READ(regs->pipeconf_reg);