Commit fe729639 authored by Sudhakar Rajashekhara's avatar Sudhakar Rajashekhara Committed by James Toy

Following are the changes since the previous version(v4):

 a. An if loop check while returning from lcd_disable_raster()
    function has been removed.
 b. "invert_pxl_clock" variable has been renamed as "invert_pxl_clk"
    and moved from lcd_ctrl_config structure in include/video/da8xx-fb.h
    file to da8xx_panel structure in drivers/video/da8xx-fb.c file.
    Appropriate changes in source code as a result of moving this
    variable has also been done.
Signed-off-by: default avatarSudhakar Rajashekhara <sudhakar.raj@ti.com>
Cc: Pavel Kiryukhin <pkiryukhin@ru.mvista.com>
Cc: Steve Chen <schen@mvista.com>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 6d6050dd
......@@ -158,6 +158,7 @@ struct da8xx_panel {
int vbp; /* Vertical back porch */
int vsw; /* Vertical Sync Pulse Width */
int pxl_clk; /* Pixel clock */
unsigned char invert_pxl_clk; /* Invert Pixel clock */
};
static struct da8xx_panel known_lcd_panels[] = {
......@@ -173,6 +174,7 @@ static struct da8xx_panel known_lcd_panels[] = {
.vbp = 2,
.vsw = 0,
.pxl_clk = 0x10,
.invert_pxl_clk = 1,
},
/* Sharp LK043T1DG01 */
[1] = {
......@@ -186,6 +188,7 @@ static struct da8xx_panel known_lcd_panels[] = {
.vbp = 2,
.vsw = 10,
.pxl_clk = 0x12,
.invert_pxl_clk = 0,
},
};
......@@ -204,7 +207,6 @@ static int lcd_disable_raster(struct da8xx_fb_par *par)
if (ret == 0)
ret = -ETIMEDOUT;
}
return ret;
}
......@@ -339,11 +341,6 @@ static int lcd_cfg_display(const struct lcd_ctrl_config *cfg)
else
reg &= ~LCD_SYNC_EDGE;
if (cfg->invert_pxl_clock)
reg |= LCD_INVERT_PIXEL_CLOCK;
else
reg &= ~LCD_INVERT_PIXEL_CLOCK;
if (cfg->invert_line_clock)
reg |= LCD_INVERT_LINE_CLOCK;
else
......@@ -482,6 +479,13 @@ static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg,
lcdc_write(LCD_CLK_DIVISOR(panel->pxl_clk) |
(LCD_RASTER_MODE & 0x1), LCD_CTRL_REG);
if (panel->invert_pxl_clk)
lcdc_write((lcdc_read(LCD_RASTER_TIMING_2_REG) |
LCD_INVERT_PIXEL_CLOCK), LCD_RASTER_TIMING_2_REG);
else
lcdc_write((lcdc_read(LCD_RASTER_TIMING_2_REG) &
~LCD_INVERT_PIXEL_CLOCK), LCD_RASTER_TIMING_2_REG);
/* Configure the DMA burst size. */
ret = lcd_cfg_dma(cfg->dma_burst_sz);
if (ret < 0)
......
......@@ -67,9 +67,6 @@ struct lcd_ctrl_config {
/* Mono 8-bit Mode: 1=D0-D7 or 0=D0-D3 */
unsigned char mono_8bit_mode;
/* Invert pixel clock */
unsigned char invert_pxl_clock;
/* Invert line clock */
unsigned char invert_line_clock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment