From: hjc Date: Tue, 25 Mar 2014 03:53:59 +0000 (+0800) Subject: rk3288 lcdc: fix resume and suspend X-Git-Tag: firefly_0821_release~5858 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d5042d103c03addd35f17e0926eb6d957fee5668;p=firefly-linux-kernel-4.4.55.git rk3288 lcdc: fix resume and suspend --- diff --git a/drivers/video/rockchip/lcdc/rk3288_lcdc.c b/drivers/video/rockchip/lcdc/rk3288_lcdc.c index 7c52273cc0eb..1884e6f3fa7c 100755 --- a/drivers/video/rockchip/lcdc/rk3288_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk3288_lcdc.c @@ -785,7 +785,7 @@ static int rk3288_lcdc_reg_update(struct rk_lcdc_driver *dev_drv) static int rk3288_lcdc_reg_restore(struct lcdc_device *lcdc_dev) { - memcpy((u8 *) lcdc_dev->regs, (u8 *) lcdc_dev->regsbak, 0x84); + memcpy((u8 *) lcdc_dev->regs, (u8 *) lcdc_dev->regsbak, 0x1f8); return 0; } @@ -2065,18 +2065,16 @@ static int rk3288_lcdc_blank(struct rk_lcdc_driver *dev_drv, struct lcdc_device *lcdc_dev = container_of(dev_drv, struct lcdc_device, driver); - if (likely(lcdc_dev->clk_on)) { - switch (blank_mode) { - case FB_BLANK_UNBLANK: - rk3288_lcdc_early_resume(dev_drv); - break; - case FB_BLANK_NORMAL: - rk3288_lcdc_early_suspend(dev_drv); - break; - default: - rk3288_lcdc_early_suspend(dev_drv); - break; - } + switch (blank_mode) { + case FB_BLANK_UNBLANK: + rk3288_lcdc_early_resume(dev_drv); + break; + case FB_BLANK_NORMAL: + rk3288_lcdc_early_suspend(dev_drv); + break; + default: + rk3288_lcdc_early_suspend(dev_drv); + break; } dev_info(dev_drv->dev, "blank mode:%d\n", blank_mode); diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c index 7037b7ac2542..6a8626676b4c 100755 --- a/drivers/video/rockchip/rk_fb.c +++ b/drivers/video/rockchip/rk_fb.c @@ -1517,7 +1517,7 @@ static int rk_fb_set_win_config(struct fb_info *info, mutex_lock(&dev_drv->output_lock); if(!(dev_drv->suspend_flag == 0)){ rk_fb_update_reg(dev_drv,regs); - printk("suspend_flag == 0\n"); + printk("suspend_flag = 1\n"); goto err; } mutex_lock(&dev_drv->update_regs_list_lock);