From 676d319ef5f450ca7845555f75de496b96cd688e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 17 Oct 2012 13:24:54 +0000 Subject: lcd: Add CONFIG_LCD_ALIGNMENT to select frame buffer alignment The normal alignment is PAGE_SIZE, but if this is defined, we can support other alignments. The motivation for this change is to make the display section-aligned on ARM so that we can easily turn off data caching for the frame buffer region without resorting to level 2 page tables. Signed-off-by: Simon Glass Signed-off-by: Tom Warren --- include/lcd.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/lcd.h') diff --git a/include/lcd.h b/include/lcd.h index 42070d7636..6a600eece4 100644 --- a/include/lcd.h +++ b/include/lcd.h @@ -297,6 +297,9 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y); /* Allow boards to customize the information displayed */ void lcd_show_board_info(void); +/* Return the size of the LCD frame buffer, and the line length */ +int lcd_get_size(int *line_length); + /************************************************************************/ /* ** BITMAP DISPLAY SUPPORT */ /************************************************************************/ -- cgit From 9a8efc4604b32221ea362ea41b38d714e4b4ab7a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 30 Oct 2012 13:40:18 +0000 Subject: lcd: Add support for flushing LCD fb from dcache after update This provides an option for the LCD to flush the dcache after each update (puts, scroll or clear). Signed-off-by: Simon Glass Signed-off-by: Tom Warren --- include/lcd.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/lcd.h') diff --git a/include/lcd.h b/include/lcd.h index 6a600eece4..8f84741961 100644 --- a/include/lcd.h +++ b/include/lcd.h @@ -57,6 +57,14 @@ extern void lcd_initcolregs (void); extern struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp); extern int bmp_display(ulong addr, int x, int y); +/** + * Set whether we need to flush the dcache when changing the LCD image. This + * defaults to off. + * + * @param flush non-zero to flush cache after update, 0 to skip + */ +void lcd_set_flush_dcache(int flush); + #if defined CONFIG_MPC823 /* * LCD controller stucture for MPC823 CPU -- cgit