On Mon, 10 Mar 2008 15:26:18 +0100
Nicolas Ferre [off-list ref] 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)
quoted hunk ↗ jump to hunk
- 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