aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap
diff options
context:
space:
mode:
authorJanusz Krzysztofik <jkrzysz@tis.icnet.pl>2010-01-14 15:25:43 -0500
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-02-12 05:46:07 -0500
commit3e9ff04408483b7972240cf433c7fb4b6b88cf0a (patch)
tree45cbf083a6f46585e0a14339d75cb926c947cb15 /drivers/video/omap
parent60596045ac3d73ab6aac85d1eca617ba4c97b020 (diff)
omapfb: Fix 12-bit display (RGB444 color mode) handling
Support for RGB444 (12-bit) pixel format has been introduced into omapfb/lcdc by Mark Underwood on 2006-05-26 (commit f74edb6668aad9fc8e81585861b18f996c78a574) in preparation for Amstrad Delta (E3) videophone LCD display support. Before the Amstrad Delta LCD patch by Jonathan McDowell was applied (on 2006-08-04, commit 8d22fb2ea004cdb6379b54c1a8fd1546cfe40ed7), omapfb and lcdc code was changed substantially (commit e563dc81aa01bd8bbb01bc53975a15c398715f62 dated 2006-06-26) in a way that broke Mark's 12-bit display support. Than, a patch by Jonathan, that supposed to correct the problem, was introduced immediatelly (on 2006-08-04, commit e10a75b49e7a57ae17c28b705153c70eba15a8ef). As a result, the Amstrad Delta display was working correctly at boot time, with fbset reporting: geometry 480 320 480 320 16 ... rgba 4/8,4/4,4/0,0/0 However, after first framebuffer reinitialization, colors were no longer being displayed correctly and fbset was reporting: rgba 5/11,6/5,5/0,0/0 The patch tries to correct the issue by setting plane->color_mode depending on panel->bpp, not var->bits_per_pixel. Created and tested on Amstrad Delta against linux-2.6.33-rc3. Signed-off-by: Janusz Krzysztofik <jkrzysz@tis.icnet.pl> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video/omap')
-rw-r--r--drivers/video/omap/omapfb_main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index 2c4f470fa086..8ce60e1b220a 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -486,10 +486,11 @@ static int set_color_mode(struct omapfb_plane_struct *plane,
486 return 0; 486 return 0;
487 case 12: 487 case 12:
488 var->bits_per_pixel = 16; 488 var->bits_per_pixel = 16;
489 plane->color_mode = OMAPFB_COLOR_RGB444;
490 return 0;
491 case 16: 489 case 16:
492 plane->color_mode = OMAPFB_COLOR_RGB565; 490 if (plane->fbdev->panel->bpp == 12)
491 plane->color_mode = OMAPFB_COLOR_RGB444;
492 else
493 plane->color_mode = OMAPFB_COLOR_RGB565;
493 return 0; 494 return 0;
494 default: 495 default:
495 return -EINVAL; 496 return -EINVAL;