diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2008-04-28 05:15:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:39 -0400 |
commit | fd0858017eb67aa0d41dd4e8499ca6a7bfb63941 (patch) | |
tree | 782b525181b6cd2f10b4f1307e93a8716c783dd4 /include/video/atmel_lcdc.h | |
parent | cf19a37e0641d975d271a5a30f097dd6b96d232f (diff) |
atmel_lcdfb: wiring BGR to RGB color mode
Adds different wiring mode for the LCD screen.
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)
This wire swapping is done on the at91sam9rl-ek board (board code
using this patch will come later).
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Andrew Victor <avictor.za@gmail.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/video/atmel_lcdc.h')
-rw-r--r-- | include/video/atmel_lcdc.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h index 2fd9fad922e..ed64862c4e1 100644 --- a/include/video/atmel_lcdc.h +++ b/include/video/atmel_lcdc.h | |||
@@ -22,6 +22,15 @@ | |||
22 | #ifndef __ATMEL_LCDC_H__ | 22 | #ifndef __ATMEL_LCDC_H__ |
23 | #define __ATMEL_LCDC_H__ | 23 | #define __ATMEL_LCDC_H__ |
24 | 24 | ||
25 | |||
26 | /* Way LCD wires are connected to the chip: | ||
27 | * Some Atmel chips use BGR color mode (instead of standard RGB) | ||
28 | * A swapped wiring onboard can bring to RGB mode. | ||
29 | */ | ||
30 | #define ATMEL_LCDC_WIRING_BGR 0 | ||
31 | #define ATMEL_LCDC_WIRING_RGB 1 | ||
32 | |||
33 | |||
25 | /* LCD Controller info data structure, stored in device platform_data */ | 34 | /* LCD Controller info data structure, stored in device platform_data */ |
26 | struct atmel_lcdfb_info { | 35 | struct atmel_lcdfb_info { |
27 | spinlock_t lock; | 36 | spinlock_t lock; |
@@ -42,6 +51,7 @@ struct atmel_lcdfb_info { | |||
42 | u8 saved_lcdcon; | 51 | u8 saved_lcdcon; |
43 | 52 | ||
44 | u8 default_bpp; | 53 | u8 default_bpp; |
54 | u8 lcd_wiring_mode; | ||
45 | unsigned int default_lcdcon2; | 55 | unsigned int default_lcdcon2; |
46 | unsigned int default_dmacon; | 56 | unsigned int default_dmacon; |
47 | void (*atmel_lcdfb_power_control)(int on); | 57 | void (*atmel_lcdfb_power_control)(int on); |