aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Etheridge <detheridge@ti.com>2013-08-23 17:52:52 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-08-30 07:51:30 -0400
commit2645ad16218354a87f6154ca4ef0fac70a98486b (patch)
treebda2ac57e702fd9f09762dfcb87267ec0e6aac9f
parent83edd73a9cfd03dad9052abec31d9fb16a28543d (diff)
video: da8xx-fb: support lcdc v2 timing register expansion
TI LCD controller version 2 adds some extra bits in a register to increase the available size to represent horizontal timings. This patch allows the fbdev driver to utilize those extra bits. This will become important for driving an HDMI encoder from the lcd controller where some of the VESA/CEA modes require quite large porches. Signed-off-by: Darren Etheridge <detheridge@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/da8xx-fb.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index 7dfa7a70fcfe..9a05ccbd46c4 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -411,6 +411,21 @@ static void lcd_cfg_horizontal_sync(int back_porch, int pulse_width,
411 | (((front_porch-1) & 0xff) << 16) 411 | (((front_porch-1) & 0xff) << 16)
412 | (((pulse_width-1) & 0x3f) << 10); 412 | (((pulse_width-1) & 0x3f) << 10);
413 lcdc_write(reg, LCD_RASTER_TIMING_0_REG); 413 lcdc_write(reg, LCD_RASTER_TIMING_0_REG);
414
415 /*
416 * LCDC Version 2 adds some extra bits that increase the allowable
417 * size of the horizontal timing registers.
418 * remember that the registers use 0 to represent 1 so all values
419 * that get set into register need to be decremented by 1
420 */
421 if (lcd_revision == LCD_VERSION_2) {
422 /* Mask off the bits we want to change */
423 reg = lcdc_read(LCD_RASTER_TIMING_2_REG) & ~0x780000ff;
424 reg |= ((front_porch-1) & 0x300) >> 8;
425 reg |= ((back_porch-1) & 0x300) >> 4;
426 reg |= ((pulse_width-1) & 0x3c0) << 21;
427 lcdc_write(reg, LCD_RASTER_TIMING_2_REG);
428 }
414} 429}
415 430
416static void lcd_cfg_vertical_sync(int back_porch, int pulse_width, 431static void lcd_cfg_vertical_sync(int back_porch, int pulse_width,