From d5042d103c03addd35f17e0926eb6d957fee5668 Mon Sep 17 00:00:00 2001 From: hjc Date: Tue, 25 Mar 2014 11:53:59 +0800 Subject: [PATCH] rk3288 lcdc: fix resume and suspend --- drivers/video/rockchip/lcdc/rk3288_lcdc.c | 24 +++++++++++------------ drivers/video/rockchip/rk_fb.c | 2 +- 2 files changed, 12 insertions(+), 14 deletions(-) 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); -- 2.34.1