summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKevin Huang <kevinh@nvidia.com>2011-07-12 12:33:36 -0700
committerRyan Wong <ryanw@nvidia.com>2011-07-28 17:44:41 -0700
commit188c1125a7490d5853335e2570cc3eb641623f25 (patch)
tree7777148a5dcc2a1e9ff36ff7c70243bb16d50615 /drivers
parentb3d30abe2f6116871edff242011b5f792c33d2f7 (diff)
video:tegra:dsi Add dsi one-shot mode support DO NOT MERGE
Add support for DSI one-shot mode in dsi driver. Change-Id: Ie6762e1a0ea7c32e9a4c3a4642205da639386402 Reviewed-on: http://git-master/r/43808 Reviewed-by: Chih-Lung Huang <lhuang@nvidia.com> Tested-by: Chih-Lung Huang <lhuang@nvidia.com> Reviewed-by: Ryan Wong <ryanw@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/tegra/dc/dc.c3
-rw-r--r--drivers/video/tegra/dc/dsi.c37
2 files changed, 24 insertions, 16 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index 973be578297b..7ccf53516ced 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -980,6 +980,9 @@ int tegra_dc_update_windows(struct tegra_dc_win *windows[], int n)
tegra_dc_writel(dc, update_mask, DC_CMD_STATE_CONTROL);
+ if (dc->out->flags & TEGRA_DC_OUT_ONE_SHOT_MODE)
+ tegra_dc_writel(dc, NC_HOST_TRIG, DC_CMD_STATE_CONTROL);
+
mutex_unlock(&dc->lock);
return 0;
diff --git a/drivers/video/tegra/dc/dsi.c b/drivers/video/tegra/dc/dsi.c
index dedbd7d55f81..66281a39f419 100644
--- a/drivers/video/tegra/dc/dsi.c
+++ b/drivers/video/tegra/dc/dsi.c
@@ -857,30 +857,35 @@ static void tegra_dsi_start_dc_stream(struct tegra_dc *dc,
tegra_dc_writel(dc, DSI_ENABLE, DC_DISP_DISP_WIN_OPTIONS);
/* TODO: clean up */
- val = PIN_INPUT_LSPI_INPUT_EN;
- tegra_dc_writel(dc, val, DC_COM_PIN_INPUT_ENABLE3);
-
- val = PIN_OUTPUT_LSPI_OUTPUT_DIS;
- tegra_dc_writel(dc, val, DC_COM_PIN_OUTPUT_ENABLE3);
-
tegra_dc_writel(dc, PW0_ENABLE | PW1_ENABLE | PW2_ENABLE | PW3_ENABLE |
PW4_ENABLE | PM0_ENABLE | PM1_ENABLE,
DC_CMD_DISPLAY_POWER_CONTROL);
- val = MSF_POLARITY_HIGH | MSF_ENABLE | MSF_LSPI;
- tegra_dc_writel(dc, val, DC_CMD_DISPLAY_COMMAND_OPTION0);
+ /* Configure one-shot mode or continuous mode */
+ if (dc->out->flags & TEGRA_DC_OUT_ONE_SHOT_MODE) {
+ /* disable LSPI/LCD_DE output */
+ val = PIN_OUTPUT_LSPI_OUTPUT_DIS;
+ tegra_dc_writel(dc, val, DC_COM_PIN_OUTPUT_ENABLE3);
+ /* enable MSF & set MSF polarity */
+ val = MSF_ENABLE | MSF_LSPI;
+ if (!dsi->info.te_polarity_low)
+ val |= MSF_POLARITY_HIGH;
+ else
+ val |= MSF_POLARITY_LOW;
+ tegra_dc_writel(dc, val, DC_CMD_DISPLAY_COMMAND_OPTION0);
- /* TODO: using continuous video mode for now */
- /* if (dsi->info.panel_has_frame_buffer) {*/
- if (0) {
- tegra_dc_writel(dc, DISP_CTRL_MODE_NC_DISPLAY, DC_CMD_DISPLAY_COMMAND);
+ /* set non-continuous mode */
+ tegra_dc_writel(dc, DISP_CTRL_MODE_NC_DISPLAY,
+ DC_CMD_DISPLAY_COMMAND);
tegra_dc_writel(dc, GENERAL_UPDATE, DC_CMD_STATE_CONTROL);
- val = GENERAL_ACT_REQ | NC_HOST_TRIG;
- tegra_dc_writel(dc, val, DC_CMD_STATE_CONTROL);
+ tegra_dc_writel(dc, GENERAL_ACT_REQ | NC_HOST_TRIG,
+ DC_CMD_STATE_CONTROL);
} else {
- tegra_dc_writel(dc, DISP_CTRL_MODE_C_DISPLAY, DC_CMD_DISPLAY_COMMAND);
- tegra_dc_writel(dc, GENERAL_ACT_REQ << 8, DC_CMD_STATE_CONTROL);
+ /* set continuous mode */
+ tegra_dc_writel(dc, DISP_CTRL_MODE_C_DISPLAY,
+ DC_CMD_DISPLAY_COMMAND);
+ tegra_dc_writel(dc, GENERAL_UPDATE, DC_CMD_STATE_CONTROL);
tegra_dc_writel(dc, GENERAL_ACT_REQ, DC_CMD_STATE_CONTROL);
}