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>
This commit is contained in:
parent
b20f86625d
commit
787f9fd232
|
@ -421,24 +421,18 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var,
|
||||||
var->red.length = var->green.length = var->blue.length
|
var->red.length = var->green.length = var->blue.length
|
||||||
= var->bits_per_pixel;
|
= var->bits_per_pixel;
|
||||||
break;
|
break;
|
||||||
case 15:
|
|
||||||
case 16:
|
case 16:
|
||||||
if (sinfo->lcd_wiring_mode == ATMEL_LCDC_WIRING_RGB) {
|
if (sinfo->lcd_wiring_mode == ATMEL_LCDC_WIRING_RGB) {
|
||||||
/* RGB:565 mode */
|
/* RGB:565 mode */
|
||||||
var->red.offset = 11;
|
var->red.offset = 11;
|
||||||
var->blue.offset = 0;
|
var->blue.offset = 0;
|
||||||
var->green.length = 6;
|
|
||||||
} else if (sinfo->lcd_wiring_mode == ATMEL_LCDC_WIRING_RGB555) {
|
|
||||||
var->red.offset = 10;
|
|
||||||
var->blue.offset = 0;
|
|
||||||
var->green.length = 5;
|
|
||||||
} else {
|
} else {
|
||||||
/* BGR:555 mode */
|
/* BGR:565 mode */
|
||||||
var->red.offset = 0;
|
var->red.offset = 0;
|
||||||
var->blue.offset = 10;
|
var->blue.offset = 11;
|
||||||
var->green.length = 5;
|
|
||||||
}
|
}
|
||||||
var->green.offset = 5;
|
var->green.offset = 5;
|
||||||
|
var->green.length = 6;
|
||||||
var->red.length = var->blue.length = 5;
|
var->red.length = var->blue.length = 5;
|
||||||
break;
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
|
|
Loading…
Reference in New Issue