aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorManjunathappa, Prakash <prakash.pm@ti.com>2012-07-18 11:33:36 -0400
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2012-07-28 21:11:09 -0400
commitfb8fa9431971b9847aafaf89281570ca41bd0b40 (patch)
tree952b060a48b8c08ce013ee6f434e6260a6adfa82 /drivers/video
parentdeb95c6c958f5ba97b6b89ab18917bf79cb8ce7b (diff)
video: da8xx-fb: configure FIFO threshold to reduce underflow errors
Patch works around the below silicon errata: During LCDC initialization, there is the potential for a FIFO underflow condition to occur. A FIFO underflow condition occurs when the input FIFO is completely empty and the LCDC raster controller logic that drives data to the output pins attempts to fetch data from the FIFO. When a FIFO underflow condition occurs, incorrect data will be driven out on the LCDC data pins. Software should poll the FUF bit field in the LCD_STAT register to check if an error condition has occurred or service the interrupt if FUF_EN is enabled when FUF occurs. If the FUF bit field has been set to 1, this will indicate an underflow condition has occurred and then the software should execute a reset of the LCDC via the LPSC. This problem may occur if the LCDC FIFO threshold size (LCDDMA_CTRL[TH_FIFO_READY]) is left at its default value after reset. Increasing the FIFO threshold size will reduce or eliminate underflows. Setting the threshold size to 256 double words or larger is recommended. Above issue is described in section 2.1.3 of silicon errata http://www.ti.com/lit/er/sprz313e/sprz313e.pdf Signed-off-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com> Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/da8xx-fb.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index 6b7f2da6f907..6f0fb2d50c28 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -353,8 +353,8 @@ static void lcd_blit(int load_mode, struct da8xx_fb_par *par)
353 lcd_enable_raster(); 353 lcd_enable_raster();
354} 354}
355 355
356/* Configure the Burst Size of DMA */ 356/* Configure the Burst Size and fifo threhold of DMA */
357static int lcd_cfg_dma(int burst_size) 357static int lcd_cfg_dma(int burst_size, int fifo_th)
358{ 358{
359 u32 reg; 359 u32 reg;
360 360
@@ -378,6 +378,9 @@ static int lcd_cfg_dma(int burst_size)
378 default: 378 default:
379 return -EINVAL; 379 return -EINVAL;
380 } 380 }
381
382 reg |= (fifo_th << 8);
383
381 lcdc_write(reg, LCD_DMA_CTRL_REG); 384 lcdc_write(reg, LCD_DMA_CTRL_REG);
382 385
383 return 0; 386 return 0;
@@ -679,8 +682,8 @@ static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg,
679 lcdc_write((lcdc_read(LCD_RASTER_TIMING_2_REG) & 682 lcdc_write((lcdc_read(LCD_RASTER_TIMING_2_REG) &
680 ~LCD_INVERT_PIXEL_CLOCK), LCD_RASTER_TIMING_2_REG); 683 ~LCD_INVERT_PIXEL_CLOCK), LCD_RASTER_TIMING_2_REG);
681 684
682 /* Configure the DMA burst size. */ 685 /* Configure the DMA burst size and fifo threshold. */
683 ret = lcd_cfg_dma(cfg->dma_burst_sz); 686 ret = lcd_cfg_dma(cfg->dma_burst_sz, cfg->fifo_th);
684 if (ret < 0) 687 if (ret < 0)
685 return ret; 688 return ret;
686 689