[Display]: Fix slideshow chaos issue after suspend/resume.
authorPan Zhenjie <zhenjie.pan@intel.com>
Sat, 31 Mar 2012 01:57:22 +0000 (09:57 +0800)
committerbuildbot <buildbot@intel.com>
Wed, 11 Apr 2012 01:05:51 +0000 (18:05 -0700)
BZ: 29803

The default display mode is 32-bitBGRX. When play slideshow,
it will change to 16-bitBGRX mode. But when suspend, display driver
do not save the lastest DSPACNTR(0x70180) and DSPASTRIDE(0x70188) registers.
So in resume process, old values will be set into the registers.

Change-Id: I4699cd38d730e5323c86c0f5561e5d27469ebb6a
Signed-off-by: Pan Zhenjie <zhenjie.pan@intel.com>
Reviewed-on: http://android.intel.com:8080/41934
Reviewed-by: Shi, Yang A <yang.a.shi@intel.com>
Reviewed-by: Xu, Randy <randy.xu@intel.com>
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Reviewed-by: Ai, Ke <ke.ai@intel.com>
Tested-by: Xu, Randy <randy.xu@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/staging/mrst/drv/mdfld_dsi_dpi.c

index 35774b0..8da20a1 100644 (file)
@@ -1647,11 +1647,13 @@ static int __dpi_panel_power_off(struct mdfld_dsi_config *dsi_config,
        ctx->dspsurf = dev_priv->init_screen_start;
        ctx->dsplinoff = dev_priv->init_screen_offset;
        ctx->pipestat = REG_READ(regs->pipestat_reg);
+       ctx->dspcntr = REG_READ(regs->dspcntr_reg);
+       ctx->dspstride= REG_READ(regs->dspstride_reg);
 
        tmp = REG_READ(regs->pipeconf_reg);
 
        /*Disable panel*/
-       val = REG_READ(regs->dspcntr_reg);
+       val = ctx->dspcntr;
        REG_WRITE(regs->dspcntr_reg, (val & ~BIT31));
        /*Disable overlay & cursor panel assigned to this pipe*/
        REG_WRITE(regs->pipeconf_reg, (tmp | (0x000c0000)));