Re: [PATCH] atmel_lcdfb: wiring BGR to RGB color mode

From: Haavard Skinnemoen
Date: Thu Mar 13 2008 - 11:36:16 EST


On Mon, 10 Mar 2008 15:26:18 +0100
Nicolas Ferre <nicolas.ferre@xxxxxxxxx> wrote:

> The legacy atmel LCDC IP uses a non standard color mode,
> "BGR-555.1" instead "RGB-565". The major part of graphic stacks
> for embedded systems uses only "RGB-565". It is possible to swap
> LCD IOs instead of doing this bit swapping by software (See
> application note AT91SAM9 LCD Controller
> http://www.atmel.com/dyn/resources/prod_documents/doc6300.pdf)

> - var->red.offset = 0;
> + if (sinfo->lcd_wiring_mode == ATMEL_LCDC_WIRING_RGB) {
> + /* RGB:888 mode */
> + var->red.offset = 16;
> + var->blue.offset = 0;
> + } else {
> + /* BGR:888 mode */
> + var->red.offset = 0;
> + var->blue.offset = 16;
> + }

Does RGB:565 always imply RGB:888 and vice versa?

If not, I think it would be better with separate flags for the possible
wirings:
* 18-bit BGR-555.1 / 24-bit BGR-888
* 16-bit RGB-565
* 24-bit RGB-888

Or maybe I misunderstand something?

Haavard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/