diff options
author | Wolfgang Denk <wd@pollux.denx.de> | 2006-08-30 23:09:00 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@pollux.denx.de> | 2006-08-30 23:09:00 +0200 |
commit | e8143e72e1cbe2f771258533e26ee2105a8768a7 (patch) | |
tree | 5e21bf4d8661a4437c67aa55b43cf19565d1d3fd /common/lcd.c | |
parent | 0fd30252c840ee54d2a80475d6504766d43b8add (diff) | |
download | bootable_bootloader_goldelico_gta04-e8143e72e1cbe2f771258533e26ee2105a8768a7.zip bootable_bootloader_goldelico_gta04-e8143e72e1cbe2f771258533e26ee2105a8768a7.tar.gz bootable_bootloader_goldelico_gta04-e8143e72e1cbe2f771258533e26ee2105a8768a7.tar.bz2 |
Add splashscreen support for MCC200 board.
Diffstat (limited to 'common/lcd.c')
-rw-r--r-- | common/lcd.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/common/lcd.c b/common/lcd.c index 0be1912..d79350f 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -585,6 +585,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) uchar *bmap; ushort padded_line; unsigned long width, height; + unsigned long pwidth = panel_info.vl_col; unsigned colors,bpix; unsigned long compression; #if defined(CONFIG_PXA250) @@ -628,6 +629,8 @@ 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_MCC200) + /* MCC200 LCD doesn't need CMAP, supports 1bpp b&w only */ #else # error "Don't know location of color map" #endif @@ -652,9 +655,28 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) } } + /* + * BMP format for Monochrome assumes that the state of a + * pixel is described on a per Bit basis, not per Byte. + * So, in case of Monochrome BMP we should align widths + * on a byte boundary and convert them from Bit to Byte + * units. + * Probably, PXA250 and MPC823 process 1bpp BMP images in + * their own ways, so make the converting to be MCC200 + * specific. + */ +#if defined(CONFIG_MCC200) + if (bpix==1) + { + width = ((width + 7) & ~7) >> 3; + x = ((x + 7) & ~7) >> 3; + pwidth= ((pwidth + 7) & ~7) >> 3; + } +#endif + padded_line = (width&0x3) ? ((width&~0x3)+4) : (width); - if ((x + width)>panel_info.vl_col) - width = panel_info.vl_col - x; + if ((x + width)>pwidth) + width = pwidth - x; if ((y + height)>panel_info.vl_row) height = panel_info.vl_row - y; @@ -666,7 +688,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) for (j = 0; j < width ; j++) #if defined(CONFIG_PXA250) *(fb++)=*(bmap++); -#elif defined(CONFIG_MPC823) +#elif defined(CONFIG_MPC823) || defined(CONFIG_MCC200) *(fb++)=255-*(bmap++); #endif bmap += (width - padded_line); |