From c19945cd9eea9d588d785753d150d745bf0e2586 Mon Sep 17 00:00:00 2001 From: Luke Huang Date: Sat, 30 Jul 2011 00:51:25 -0700 Subject: arm: tegra: dsi: war to fix dsi issue on suspend DO NOT MERGE 1. Fix the command for early-suspend/late-resume 2. Disable dsi syncpt, since it is not working reliably Change-Id: I1a1ffc6302b3436c2e3ada328fd3dfd53489d95e Reviewed-on: http://git-master/r/44192 Reviewed-by: Chih-Lung Huang Tested-by: Chih-Lung Huang Reviewed-by: Ryan Wong --- arch/arm/mach-tegra/board-enterprise-panel.c | 18 +++++------------- drivers/video/tegra/dc/dsi.c | 7 ++++++- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-tegra/board-enterprise-panel.c b/arch/arm/mach-tegra/board-enterprise-panel.c index a9367877dfd0..180b47f9f9fa 100644 --- a/arch/arm/mach-tegra/board-enterprise-panel.c +++ b/arch/arm/mach-tegra/board-enterprise-panel.c @@ -460,9 +460,14 @@ static struct tegra_dsi_cmd dsi_early_suspend_cmd[] = { #if(DC_CTRL_MODE == TEGRA_DC_OUT_ONE_SHOT_MODE) DSI_CMD_SHORT(0x05, 0x34, 0x00), #endif + DSI_CMD_SHORT(0x05, 0x10, 0x00), + DSI_DLY_MS(5), }; + static struct tegra_dsi_cmd dsi_late_resume_cmd[] = { + DSI_CMD_SHORT(0x05, 0x11, 0x00), + DSI_DLY_MS(150), #if(DC_CTRL_MODE == TEGRA_DC_OUT_ONE_SHOT_MODE) DSI_CMD_SHORT(0x15, 0x35, 0x00), #endif @@ -470,16 +475,6 @@ static struct tegra_dsi_cmd dsi_late_resume_cmd[] = { DSI_DLY_MS(20), }; -static struct tegra_dsi_cmd dsi_suspend_cmd[] = { - DSI_CMD_SHORT(0x05, 0x28, 0x00), - DSI_DLY_MS(20), -#if(DC_CTRL_MODE == TEGRA_DC_OUT_ONE_SHOT_MODE) - DSI_CMD_SHORT(0x05, 0x34, 0x00), -#endif - DSI_CMD_SHORT(0x05, 0x10, 0x00), - DSI_DLY_MS(5), -}; - struct tegra_dsi_out enterprise_dsi = { .n_data_lanes = 2, .pixel_format = TEGRA_DSI_PIXEL_FORMAT_24BIT_P, @@ -500,9 +495,6 @@ struct tegra_dsi_out enterprise_dsi = { .n_late_resume_cmd = ARRAY_SIZE(dsi_late_resume_cmd), .dsi_late_resume_cmd = dsi_late_resume_cmd, - .n_suspend_cmd = ARRAY_SIZE(dsi_suspend_cmd), - .dsi_suspend_cmd = dsi_suspend_cmd, - .video_data_type = TEGRA_DSI_VIDEO_TYPE_COMMAND_MODE, .lp_cmd_mode_freq_khz = 20000, }; diff --git a/drivers/video/tegra/dc/dsi.c b/drivers/video/tegra/dc/dsi.c index 66281a39f419..6615d145d7f9 100644 --- a/drivers/video/tegra/dc/dsi.c +++ b/drivers/video/tegra/dc/dsi.c @@ -38,7 +38,7 @@ #include "dsi_regs.h" #include "dsi.h" -#define DSI_USE_SYNC_POINTS 1 +#define DSI_USE_SYNC_POINTS 0 #define DSI_STOP_DC_DURATION_MSEC 1000 @@ -1080,6 +1080,11 @@ static int tegra_dsi_init_hw(struct tegra_dc *dc, u32 val; u32 i; + val = DSI_POWER_CONTROL_LEG_DSI_ENABLE(TEGRA_DSI_DISABLE); + tegra_dsi_writel(dsi, val, DSI_POWER_CONTROL); + + udelay(5); + tegra_dsi_set_dsi_clk(dc, dsi, dsi->target_lp_clk_khz); if (dsi->info.dsi_instance) { /* TODO:Set the misc register*/ -- cgit v1.2.3