diff options
| -rw-r--r-- | drivers/video/da8xx-fb.c | 11 | ||||
| -rw-r--r-- | include/video/da8xx-fb.h | 3 |
2 files changed, 10 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 */ |
| 357 | static int lcd_cfg_dma(int burst_size) | 357 | static 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 | ||
diff --git a/include/video/da8xx-fb.h b/include/video/da8xx-fb.h index 89d43b3d4cb9..5a0e4f9efb53 100644 --- a/include/video/da8xx-fb.h +++ b/include/video/da8xx-fb.h | |||
| @@ -82,6 +82,9 @@ struct lcd_ctrl_config { | |||
| 82 | 82 | ||
| 83 | /* Raster Data Order Select: 1=Most-to-least 0=Least-to-most */ | 83 | /* Raster Data Order Select: 1=Most-to-least 0=Least-to-most */ |
| 84 | unsigned char raster_order; | 84 | unsigned char raster_order; |
| 85 | |||
| 86 | /* DMA FIFO threshold */ | ||
| 87 | int fifo_th; | ||
| 85 | }; | 88 | }; |
| 86 | 89 | ||
| 87 | struct lcd_sync_arg { | 90 | struct lcd_sync_arg { |
