summaryrefslogtreecommitdiff
path: root/common/lcd.c
diff options
context:
space:
mode:
authorDonghwa Lee <dh09.lee@samsung.com>2012-05-09 19:23:37 +0000
committerAnatolij Gustschin <agust@denx.de>2012-05-25 09:15:10 +0200
commitfb6a9aab7ae78c03f9e9c6724ee40d8a384644ad (patch)
tree665ce5aa9a322c1538ca0329c5ada51f9a833ed7 /common/lcd.c
parent2b5cb3d33109a67ad25d74a98f1da92a1c637ee6 (diff)
downloadu-boot-imx-fb6a9aab7ae78c03f9e9c6724ee40d8a384644ad.zip
u-boot-imx-fb6a9aab7ae78c03f9e9c6724ee40d8a384644ad.tar.gz
u-boot-imx-fb6a9aab7ae78c03f9e9c6724ee40d8a384644ad.tar.bz2
LCD: display 32bpp decompressed bitmap image
This patch supports drawing 32bpp decompressed bitmap image. Signed-off-by: Donghwa Lee <dh09.lee@samsung.com> Signed-off-by: Kyungmin.park <kyungmin.park@samsung.com>
Diffstat (limited to 'common/lcd.c')
-rw-r--r--common/lcd.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/common/lcd.c b/common/lcd.c
index fe3545a..85c6cf4 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -643,14 +643,14 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
bpix = NBITS(panel_info.vl_bpix);
- if ((bpix != 1) && (bpix != 8) && (bpix != 16)) {
+ if ((bpix != 1) && (bpix != 8) && (bpix != 16) && (bpix != 32)) {
printf ("Error: %d bit/pixel mode, but BMP has %d bit/pixel\n",
bpix, bmp_bpix);
return 1;
}
/* We support displaying 8bpp BMPs on 16bpp LCDs */
- if (bpix != bmp_bpix && (bmp_bpix != 8 || bpix != 16)) {
+ if (bpix != bmp_bpix && (bmp_bpix != 8 || bpix != 16 || bpix != 32)) {
printf ("Error: %d bit/pixel mode, but BMP has %d bit/pixel\n",
bpix,
le16_to_cpu(bmp->header.bit_count));
@@ -667,7 +667,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
cmap = (ushort *)fbi->palette;
#elif defined(CONFIG_MPC823)
cmap = (ushort *)&(cp->lcd_cmap[255*sizeof(ushort)]);
-#elif !defined(CONFIG_ATMEL_LCD)
+#elif !defined(CONFIG_ATMEL_LCD) && !defined(CONFIG_EXYNOS_FB)
cmap = panel_info.cmap;
#endif
@@ -789,6 +789,19 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
break;
#endif /* CONFIG_BMP_16BPP */
+#if defined(CONFIG_BMP_32BPP)
+ case 32:
+ for (i = 0; i < height; ++i) {
+ for (j = 0; j < width; j++) {
+ *(fb++) = *(bmap++);
+ *(fb++) = *(bmap++);
+ *(fb++) = *(bmap++);
+ *(fb++) = *(bmap++);
+ }
+ fb -= (lcd_line_length + width * (bpix / 8));
+ }
+ break;
+#endif /* CONFIG_BMP_32BPP */
default:
break;
};