[U-Boot] [PATCH v2] Add 16bpp BMP support

Wolfgang Denk wd at denx.de
Tue Jan 27 13:15:34 CET 2009


Dear Mark Jackson,

In message <497EF0C4.3060907 at mimc.co.uk> you wrote:
> This patch adds 16bpp BMP support to the common lcd code.
> 
> At the moment it's only been tested on the MIMC200 AVR32 board, but the hooks 
> are in place to extend this to other platforms.
...

> +#if defined(CONFIG_PXA250)
> +#error 16 bpp support not added for PXA250
> +#elif defined(CONFIG_ATMEL_LCD)
> +	case 16:
> +		for (i = 0; i < height; ++i) {
> +			WATCHDOG_RESET();
> +			for (j = 0; j < width; j++) {
> +#if defined(CONFIG_ATMEL_LCD_BGR555)
> +				*(fb++) = ((bmap[0] & 0x1f) << 2) | (bmap[1] & 0x03);
> +				*(fb++) = (bmap[0] & 0xe0) | ((bmap[1] & 0x7c) >> 2);
> +				bmap += 2;
> +#else
> +				*(fb++) = *(bmap++);
> +				*(fb++) = *(bmap++);
> +#endif
> +			}
> +			bmap += (padded_line - width) * 2;
> +			fb   -= (width * 2 + lcd_line_length);
> +		}
> +		break;
> +#elif defined(CONFIG_MPC823)
> +#error 16 bpp support not added for MPC823
> +#elif defined(CONFIG_MCC200)
> +#error 16 bpp support not added for MCC200
> +#endif

No, this still makes no sense to me. Listing all the accrhitectures
where this is implemented or not is error prone, and this file should
definitely be as independent from specific hardware properties as
possible.

Can we not agree on some generic name (like CONFIG_BMP_16BPP) and
#define this only on those boards that can do it / need it? Then we
can omit all the "elif" ... lists.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If a man had a child who'd gone  anti-social,  killed  perhaps,  he'd
still tend to protect that child.
	-- McCoy, "The Ultimate Computer", stardate 4731.3


More information about the U-Boot mailing list