aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/atmel_lcdfb.c
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2011-10-13 10:52:50 -0400
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2012-01-28 14:54:10 -0500
commit787f9fd23283d7103c65371f7b108ecf1020cddf (patch)
tree9232c7700bc3cb6e5e86faa109b9b672b249dec9 /drivers/video/atmel_lcdfb.c
parentb20f86625de738658c74f2ecfe4050416d2252cc (diff)
atmel_lcdfb: support 16bit BGR:565 mode, remove unsupported 15bit modes
Allow framebuffer to be configured in 16bit mode when panel is wired in (the default) BGR configuration, and don't claim to support 15bit input modes, which the LCD controller cannot handle. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/atmel_lcdfb.c')
-rw-r--r--drivers/video/atmel_lcdfb.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index e40c00f2c2ba..d99505b16374 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -421,24 +421,18 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var,
421 var->red.length = var->green.length = var->blue.length 421 var->red.length = var->green.length = var->blue.length
422 = var->bits_per_pixel; 422 = var->bits_per_pixel;
423 break; 423 break;
424 case 15:
425 case 16: 424 case 16:
426 if (sinfo->lcd_wiring_mode == ATMEL_LCDC_WIRING_RGB) { 425 if (sinfo->lcd_wiring_mode == ATMEL_LCDC_WIRING_RGB) {
427 /* RGB:565 mode */ 426 /* RGB:565 mode */
428 var->red.offset = 11; 427 var->red.offset = 11;
429 var->blue.offset = 0; 428 var->blue.offset = 0;
430 var->green.length = 6;
431 } else if (sinfo->lcd_wiring_mode == ATMEL_LCDC_WIRING_RGB555) {
432 var->red.offset = 10;
433 var->blue.offset = 0;
434 var->green.length = 5;
435 } else { 429 } else {
436 /* BGR:555 mode */ 430 /* BGR:565 mode */
437 var->red.offset = 0; 431 var->red.offset = 0;
438 var->blue.offset = 10; 432 var->blue.offset = 11;
439 var->green.length = 5;
440 } 433 }
441 var->green.offset = 5; 434 var->green.offset = 5;
435 var->green.length = 6;
442 var->red.length = var->blue.length = 5; 436 var->red.length = var->blue.length = 5;
443 break; 437 break;
444 case 32: 438 case 32: