ARM: tegra: enterprise: DC one-shot mode
Animesh Kishore [Thu, 14 Jul 2011 11:52:11 +0000 (16:52 +0530)]
Send command to panel to enable TE signal.
Disable/enable TE signal from panel in suspend/resume.

Bug 851754

Original-Change-Id: I16017250788057a49f36e2ba01d09c66cc00dd85
Reviewed-on: http://git-master/r/40628
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R204168cdbac84a732e4e30efc31f8e8094d57d94

arch/arm/mach-tegra/board-enterprise-panel.c

index 06e1df1..9438f86 100644 (file)
@@ -38,6 +38,8 @@
 #include "devices.h"
 #include "gpio-names.h"
 
+#define DC_CTRL_MODE   TEGRA_DC_OUT_CONTINUOUS_MODE
+
 /* Select panel to be used. */
 #define AVDD_LCD PMU_TCA6416_GPIO_PORT17
 #define DSI_PANEL_RESET 0
@@ -430,6 +432,25 @@ static int enterprise_dsi_panel_postsuspend(void)
 static struct tegra_dsi_cmd dsi_init_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
+       DSI_CMD_SHORT(0x05, 0x29, 0x00),
+       DSI_DLY_MS(20),
+};
+
+static struct tegra_dsi_cmd dsi_early_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
+};
+
+static struct tegra_dsi_cmd dsi_late_resume_cmd[] = {
+#if(DC_CTRL_MODE == TEGRA_DC_OUT_ONE_SHOT_MODE)
+       DSI_CMD_SHORT(0x15, 0x35, 0x00),
+#endif
        DSI_CMD_SHORT(0x05, 0x29, 0x00),
        DSI_DLY_MS(20),
 };
@@ -437,6 +458,9 @@ static struct tegra_dsi_cmd dsi_init_cmd[]= {
 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),
 };
@@ -455,8 +479,15 @@ struct tegra_dsi_out enterprise_dsi = {
        .n_init_cmd = ARRAY_SIZE(dsi_init_cmd),
        .dsi_init_cmd = dsi_init_cmd,
 
+       .n_early_suspend_cmd = ARRAY_SIZE(dsi_early_suspend_cmd),
+       .dsi_early_suspend_cmd = dsi_early_suspend_cmd,
+
+       .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,
 };
@@ -497,6 +528,8 @@ static struct tegra_dc_out enterprise_disp1_out = {
        .order          = TEGRA_DC_ORDER_RED_BLUE,
        .sd_settings    = &enterprise_sd_settings,
 
+       .flags          = DC_CTRL_MODE,
+
        .type           = TEGRA_DC_OUT_DSI,
 
        .modes          = enterprise_dsi_modes,