lvds: reduced lvds resume time.
authorZHW <zhw@rock-chips.com>
Thu, 26 Sep 2013 02:07:54 +0000 (10:07 +0800)
committerZHW <zhw@rock-chips.com>
Thu, 26 Sep 2013 02:07:54 +0000 (10:07 +0800)
drivers/mfd/rk616-vif.c
drivers/video/rockchip/transmitter/rk616_lvds.c
include/linux/mfd/rk616.h

index d6e0ed1995846fe2974ee2f95dfe50883d15de28..ebc719066da1e4b162346cf47c8ab5d4a3c5843d 100755 (executable)
@@ -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;
index 904283d74047dbbcae0401c1f9bf8cf6520015fd..f08740f3e8317d9809da103e341aaa8225e5852a 100755 (executable)
@@ -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
index f598fef64fc43b18a9166b52a25efbcbf0918db2..4e3cef8d389ae6b427a6cf18a2c68500d69f1d33 100755 (executable)
@@ -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);