diff options
| author | Mark Jackson <mpfj@mimc.co.uk> | 2008-07-31 16:09:00 +0100 | 
|---|---|---|
| committer | Wolfgang Denk <wd@denx.de> | 2008-07-31 17:48:50 +0200 | 
| commit | a48311557db6e7e9473a6163b44bb1e6c6ed64c4 (patch) | |
| tree | 8a3740af505ce0875a5cd1a4a613850d425e2397 /common/lcd.c | |
| parent | a5bcb01fbde6b1f1c9863cd86e5c4c369f0121ac (diff) | |
| download | olio-uboot-2014.01-a48311557db6e7e9473a6163b44bb1e6c6ed64c4.tar.xz olio-uboot-2014.01-a48311557db6e7e9473a6163b44bb1e6c6ed64c4.zip | |
Add gzipped logo support
The README file states that CONFIG_VIDEO_BMP_GZIP behaves as follows:
  If this option is set, additionally to standard BMP
  images, gzipped BMP images can be displayed via the
  splashscreen support or the bmp command.
However, the splashscreen function *only* supports standard BMP images.
This patch adds the documented gzip support.
Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
Diffstat (limited to 'common/lcd.c')
| -rw-r--r-- | common/lcd.c | 13 | 
1 files changed, 13 insertions, 0 deletions
| diff --git a/common/lcd.c b/common/lcd.c index eec1f53b0..3bbc7bafa 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -740,6 +740,9 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)  }  #endif +#ifdef CONFIG_VIDEO_BMP_GZIP +extern bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp); +#endif  static void *lcd_logo (void)  { @@ -761,6 +764,16 @@ static void *lcd_logo (void)  		addr = simple_strtoul(s, NULL, 16);  		do_splash = 0; +#ifdef CONFIG_VIDEO_BMP_GZIP +		bmp_image_t *bmp = (bmp_image_t *)addr; +		unsigned long len; + +		if (!((bmp->header.signature[0]=='B') && +		      (bmp->header.signature[1]=='M'))) { +			addr = (ulong)gunzip_bmp(addr, &len); +		} +#endif +  		if (lcd_display_bitmap (addr, 0, 0) == 0) {  			return ((void *)lcd_base);  		} |