mipi dsi: dcs commmand sent by command mode in HS mode
authorhhb <hhb@rock-chips.com>
Tue, 9 Jul 2013 03:38:09 +0000 (11:38 +0800)
committerhhb <hhb@rock-chips.com>
Tue, 9 Jul 2013 03:38:44 +0000 (11:38 +0800)
drivers/video/rockchip/screen/lcd_LD089WU1_mipi.c
drivers/video/rockchip/transmitter/rk616_mipi_dsi.c

index e5abb0d499ea1f4c90c51e64a6ed8832d3682d9c..cef35493db9b3dee8da8cb54d87b6adc4feb8fdb 100644 (file)
@@ -62,13 +62,16 @@ int rk_lcd_init(void) {
                
        /*below is changeable*/
        dsi_enable_hs_clk(1);
-       dsi_enable_video_mode(1);
+       dsi_enable_video_mode(0);
+       dsi_enable_command_mode(1);
        dcs[0] = dcs_exit_sleep_mode; 
        dsi_send_dcs_packet(dcs, 1);
        msleep(1);
        dcs[0] = dcs_set_display_on;
        dsi_send_dcs_packet(dcs, 1);
        msleep(10);
+       dsi_enable_command_mode(0);
+       dsi_enable_video_mode(1);
        //printk("++++++++++++++++%s:%d\n", __func__, __LINE__);
 };
 
@@ -81,6 +84,8 @@ int rk_lcd_standby(u8 enable) {
                return -1;
                
        if(enable) {
+               dsi_enable_video_mode(0);
+               dsi_enable_command_mode(1);
                /*below is changeable*/
                dcs[0] = dcs_set_display_off; 
                dsi_send_dcs_packet(dcs, 1);
index 3c414f7ea136d1e49e03c1b42bdb3b622444cbd8..55ea2c94a76e1a6ab8420298c5d0af699aceefaf 100644 (file)
@@ -624,13 +624,16 @@ static int rk_mipi_dsi_init(void *array, u32 n) {
        
        if(!screen->init) { 
                rk_mipi_dsi_enable_hs_clk(1);
-               rk_mipi_dsi_enable_video_mode(1);
+               rk_mipi_dsi_enable_video_mode(0);
+               rk_mipi_dsi_enable_command_mode(1);
                dcs[0] = dcs_exit_sleep_mode; 
                rk_mipi_dsi_send_dcs_packet(dcs, 1);
                msleep(1);
                dcs[0] = dcs_set_display_on;
                rk_mipi_dsi_send_dcs_packet(dcs, 1);
                msleep(10);
+               rk_mipi_dsi_enable_command_mode(0);
+               rk_mipi_dsi_enable_video_mode(1);
        } else {
                screen->init();
        }
@@ -998,17 +1001,16 @@ static void rk616_mipi_dsi_late_resume(struct early_suspend *h)
        rk_mipi_dsi_phy_init(g_screen, 0);
        rk_mipi_dsi_host_init(g_screen, 0);
 
-       
        if(!g_screen->standby) {
                rk_mipi_dsi_enable_hs_clk(1);
-               rk_mipi_dsi_enable_video_mode(1);
+               rk_mipi_dsi_enable_video_mode(0);
+               rk_mipi_dsi_enable_command_mode(1);
                dcs[0] = dcs_exit_sleep_mode; 
                rk_mipi_dsi_send_dcs_packet(dcs, 1);
                msleep(1);
                dcs[0] = dcs_set_display_on;
                rk_mipi_dsi_send_dcs_packet(dcs, 1);
                msleep(10);
-               
        } else {
                g_screen->standby(0);
        }