drm/tegra: Relocate some output-specific code
Some of the code in the CRTC's mode setting code is specific to the RGB output or needs to be called slightly differently depending on the type of output. Push that code down into the output drivers. Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
8620fc629a
commit
72d3028615
5 changed files with 97 additions and 35 deletions
|
@ -669,20 +669,6 @@ static int tegra_crtc_mode_set(struct drm_crtc *crtc,
|
|||
tegra_dc_writel(dc, value, DC_DISP_INTERLACE_CONTROL);
|
||||
}
|
||||
|
||||
value = DE_SELECT_ACTIVE | DE_CONTROL_NORMAL;
|
||||
tegra_dc_writel(dc, value, DC_DISP_DATA_ENABLE_OPTIONS);
|
||||
|
||||
value = tegra_dc_readl(dc, DC_COM_PIN_OUTPUT_POLARITY(1));
|
||||
value &= ~LVS_OUTPUT_POLARITY_LOW;
|
||||
value &= ~LHS_OUTPUT_POLARITY_LOW;
|
||||
tegra_dc_writel(dc, value, DC_COM_PIN_OUTPUT_POLARITY(1));
|
||||
|
||||
value = DISP_DATA_FORMAT_DF1P1C | DISP_ALIGNMENT_MSB |
|
||||
DISP_ORDER_RED_BLUE;
|
||||
tegra_dc_writel(dc, value, DC_DISP_DISP_INTERFACE_CONTROL);
|
||||
|
||||
tegra_dc_writel(dc, 0x00010001, DC_DISP_SHIFT_CLOCK_OPTIONS);
|
||||
|
||||
value = SHIFT_CLK_DIVIDER(div) | PIXEL_CLK_DIVIDER_PCD1;
|
||||
tegra_dc_writel(dc, value, DC_DISP_DISP_CLOCK_CONTROL);
|
||||
|
||||
|
@ -746,10 +732,6 @@ static void tegra_crtc_prepare(struct drm_crtc *crtc)
|
|||
PW4_ENABLE | PM0_ENABLE | PM1_ENABLE;
|
||||
tegra_dc_writel(dc, value, DC_CMD_DISPLAY_POWER_CONTROL);
|
||||
|
||||
value = tegra_dc_readl(dc, DC_CMD_DISPLAY_COMMAND);
|
||||
value |= DISP_CTRL_MODE_C_DISPLAY;
|
||||
tegra_dc_writel(dc, value, DC_CMD_DISPLAY_COMMAND);
|
||||
|
||||
/* initialize timer */
|
||||
value = CURSOR_THRESHOLD(0) | WINDOW_A_THRESHOLD(0x20) |
|
||||
WINDOW_B_THRESHOLD(0x20) | WINDOW_C_THRESHOLD(0x20);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue