summaryrefslogtreecommitdiff
path: root/common/lcd.c
diff options
context:
space:
mode:
authorPeng Fan <Peng.Fan@freescale.com>2015-03-14 18:17:06 +0800
committerPeng Fan <Peng.Fan@freescale.com>2015-04-29 15:00:31 +0800
commit2b899b9c52fb82ce9a8f3599c8e4799c974bc68b (patch)
tree9915e7480b9a6cdbdde7f87b88d94fc1a4d7e1f9 /common/lcd.c
parentfe02c2c77fa7b29b1a073cc08ecea34af6d87fd2 (diff)
downloadu-boot-imx-2b899b9c52fb82ce9a8f3599c8e4799c974bc68b.zip
u-boot-imx-2b899b9c52fb82ce9a8f3599c8e4799c974bc68b.tar.gz
u-boot-imx-2b899b9c52fb82ce9a8f3599c8e4799c974bc68b.tar.bz2
MLK-10774-31 lcd: add LCD_MONOCHROME
LCD_MONOCHROME is removed in commit f4469f50b0367820121ef2d313517d422ed70e1d. Add related code back to support epdc. In this patch, also include crm_regs.h in mx6slevk.c to make epdc code be compiled ok. COLOR_MASK is also added from commit a7de2953f51e70754190d3516167d58d27d17219 Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Diffstat (limited to 'common/lcd.c')
-rw-r--r--common/lcd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/common/lcd.c b/common/lcd.c
index f33942c..408937d 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -38,11 +38,6 @@
#define CONFIG_LCD_ALIGNMENT PAGE_SIZE
#endif
-#if (LCD_BPP != LCD_COLOR8) && (LCD_BPP != LCD_COLOR16) && \
- (LCD_BPP != LCD_COLOR32)
-#error Unsupported LCD BPP.
-#endif
-
DECLARE_GLOBAL_DATA_PTR;
static int lcd_init(void *lcdbase);
@@ -172,7 +167,11 @@ void lcd_clear(void)
char *s;
ulong addr;
static int do_splash = 1;
-#if LCD_BPP == LCD_COLOR8
+#if LCD_BPP == LCD_MONOCHROME
+ /* Setting the palette */
+ lcd_initcolregs();
+
+#elif LCD_BPP == LCD_COLOR8
/* Setting the palette */
lcd_setcolreg(CONSOLE_COLOR_BLACK, 0, 0, 0);
lcd_setcolreg(CONSOLE_COLOR_RED, 0xFF, 0, 0);
@@ -200,14 +199,15 @@ void lcd_clear(void)
#else
/* set framebuffer to background color */
#if (LCD_BPP != LCD_COLOR32)
- memset((char *)lcd_base, bg_color, lcd_line_length * panel_info.vl_row);
+ memset((char *)lcd_base, COLOR_MASK(lcd_getbgcolor()),
+ lcd_line_length * panel_info.vl_row);
#else
u32 *ppix = lcd_base;
u32 i;
for (i = 0;
i < (lcd_line_length * panel_info.vl_row)/NBYTES(panel_info.vl_bpix);
i++) {
- *ppix++ = bg_color;
+ *ppix++ = COLOR_MASK(lcd_getbgcolor());
}
#endif
#endif