summaryrefslogtreecommitdiffstats
path: root/common/lcd.c
diff options
context:
space:
mode:
authorMark Jackson <mpfj@mimc.co.uk>2008-08-01 09:48:29 +0100
committerWolfgang Denk <wd@denx.de>2008-08-01 12:42:50 +0200
commit1464eff77e7fdaed609ecf263a2423c9dcf96b1f (patch)
treecca0d9fc4386db4fd82ac4f614f82933752a7a2c /common/lcd.c
parent2a433c66b1e2770349fe4911be23c375f053ebd8 (diff)
downloadtalos-obmc-uboot-1464eff77e7fdaed609ecf263a2423c9dcf96b1f.tar.gz
talos-obmc-uboot-1464eff77e7fdaed609ecf263a2423c9dcf96b1f.zip
Fix bitmap display for atmel lcd controller
The current lcd_display_bitmap() function does not work properly for the Atmel LCD controller. 2 fixes need to be done:- (a) when setting the colour map, use the lcd_setcolreg() function as provided by the Atmel driver (b) the data is never actually written to the lcd framebuffer !! Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
Diffstat (limited to 'common/lcd.c')
-rw-r--r--common/lcd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/lcd.c b/common/lcd.c
index 3bbc7bafaf..e3347ec93c 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -678,6 +678,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
/* Set color map */
for (i=0; i<colors; ++i) {
bmp_color_table_entry_t cte = bmp->color_table[i];
+#if !defined(CONFIG_ATMEL_LCD)
ushort colreg =
( ((cte.red) << 8) & 0xf800) |
( ((cte.green) << 3) & 0x07e0) |
@@ -692,6 +693,9 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
#elif defined(CONFIG_MPC823)
cmap--;
#endif
+#else /* CONFIG_ATMEL_LCD */
+ lcd_setcolreg(i, cte.red, cte.green, cte.blue);
+#endif
}
}
#endif
@@ -727,7 +731,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
for (i = 0; i < height; ++i) {
WATCHDOG_RESET();
for (j = 0; j < width ; j++)
-#if defined(CONFIG_PXA250)
+#if defined(CONFIG_PXA250) || defined(CONFIG_ATMEL_LCD)
*(fb++) = *(bmap++);
#elif defined(CONFIG_MPC823) || defined(CONFIG_MCC200)
*(fb++)=255-*(bmap++);
OpenPOWER on IntegriCloud