From ff6ed9e159ddeffffc5f7a1d44f5a90b4d66574e Mon Sep 17 00:00:00 2001 From: ZHW Date: Thu, 26 Sep 2013 10:07:54 +0800 Subject: [PATCH] lvds: reduced lvds resume time. --- drivers/mfd/rk616-vif.c | 11 +++++++++-- drivers/video/rockchip/transmitter/rk616_lvds.c | 5 +++-- include/linux/mfd/rk616.h | 1 + 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/rk616-vif.c b/drivers/mfd/rk616-vif.c index d6e0ed199584..ebc719066da1 100755 --- a/drivers/mfd/rk616-vif.c +++ b/drivers/mfd/rk616-vif.c @@ -757,8 +757,15 @@ int rk616_display_router_cfg(struct mfd_rk616 *rk616,rk_screen *screen,bool enab if(ret < 0) return ret; ret = rk616_router_cfg(rk616); - ret = rk616_vif_cfg(rk616,hdmi_screen,0); - ret = rk616_vif_cfg(rk616,hdmi_screen,1); + + /* + If wake up, does not execute the rk616_vif_cfg can save 50ms time + */ + if(rk616->resume != 1){ + ret = rk616_vif_cfg(rk616,hdmi_screen,0); + ret = rk616_vif_cfg(rk616,hdmi_screen,1); + } + ret = rk616_scaler_cfg(rk616,screen); ret = rk616_dither_cfg(rk616,screen,enable); return 0; diff --git a/drivers/video/rockchip/transmitter/rk616_lvds.c b/drivers/video/rockchip/transmitter/rk616_lvds.c index 904283d74047..f08740f3e831 100755 --- a/drivers/video/rockchip/transmitter/rk616_lvds.c +++ b/drivers/video/rockchip/transmitter/rk616_lvds.c @@ -61,7 +61,6 @@ static int rk616_lvds_cfg(struct mfd_rk616 *rk616,rk_screen *screen) ret = rk616->write_dev(rk616,CRU_LVDS_CON0,&val); rk616_dbg(rk616->dev,"rk616 use single lvds channel.......\n"); - } } @@ -132,7 +131,9 @@ static void rk616_lvds_late_resume(struct early_suspend *h) { struct rk616_lvds *lvds = container_of(h, struct rk616_lvds,early_suspend); struct mfd_rk616 *rk616 = lvds->rk616; - rk616_lvds_init_cfg(rk616,lvds->screen); + rk616->resume = 1; + rk616_lvds_init_cfg(rk616,lvds->screen); + rk616->resume = 0; } #endif diff --git a/include/linux/mfd/rk616.h b/include/linux/mfd/rk616.h index f598fef64fc4..4e3cef8d389a 100755 --- a/include/linux/mfd/rk616.h +++ b/include/linux/mfd/rk616.h @@ -281,6 +281,7 @@ struct mfd_rk616 { struct clk *mclk; u64 pll0_rate; u64 pll1_rate; + unsigned int resume; struct dentry *debugfs_dir; int (*read_dev)(struct mfd_rk616 *rk616,u16 reg,u32 *pval); int (*write_dev)(struct mfd_rk616 *rk616,u16 reg,u32 *pval); -- 2.34.1