aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorHector Palacios <hector.palacios@digi.com>2013-08-01 04:40:35 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-08-02 06:13:33 -0400
commit208df1e4cbb13140d2f822cd2b15c00b51978776 (patch)
tree7e48dbae4423d6bd59754214bffd69437c239f99 /drivers/video
parent005358c8c05998bef5e136ca7e7d6b1dc5326b49 (diff)
video: mxsfb: fix color settings for 18bit data bus and 32bpp
For a combination of 18bit LCD data bus width and a color mode of 32bpp, the driver was setting the color mapping to rgb666, which is wrong, as the color in memory realy has an rgb888 layout. This patch also removes the setting of flag CTRL_DF24 that makes the driver dimiss the upper 2 bits when handling 32/24bpp colors in a diplay with 18bit data bus width. This flag made true color images display wrong in such configurations. Finally, the color mapping rgb666 has also been removed as nobody is using it and high level applications like Qt5 cannot work with it either. Reference: https://lkml.org/lkml/2013/5/23/220 Signed-off-by: Hector Palacios <hector.palacios@digi.com> Acked-by: Juergen Beisert <jbe@pengutronix.de> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/mxsfb.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 3ba37713b1f9..dc09ebe4aba5 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -239,24 +239,6 @@ static const struct fb_bitfield def_rgb565[] = {
239 } 239 }
240}; 240};
241 241
242static const struct fb_bitfield def_rgb666[] = {
243 [RED] = {
244 .offset = 16,
245 .length = 6,
246 },
247 [GREEN] = {
248 .offset = 8,
249 .length = 6,
250 },
251 [BLUE] = {
252 .offset = 0,
253 .length = 6,
254 },
255 [TRANSP] = { /* no support for transparency */
256 .length = 0,
257 }
258};
259
260static const struct fb_bitfield def_rgb888[] = { 242static const struct fb_bitfield def_rgb888[] = {
261 [RED] = { 243 [RED] = {
262 .offset = 16, 244 .offset = 16,
@@ -309,9 +291,6 @@ static int mxsfb_check_var(struct fb_var_screeninfo *var,
309 break; 291 break;
310 case STMLCDIF_16BIT: 292 case STMLCDIF_16BIT:
311 case STMLCDIF_18BIT: 293 case STMLCDIF_18BIT:
312 /* 24 bit to 18 bit mapping */
313 rgb = def_rgb666;
314 break;
315 case STMLCDIF_24BIT: 294 case STMLCDIF_24BIT:
316 /* real 24 bit */ 295 /* real 24 bit */
317 rgb = def_rgb888; 296 rgb = def_rgb888;
@@ -453,11 +432,6 @@ static int mxsfb_set_par(struct fb_info *fb_info)
453 return -EINVAL; 432 return -EINVAL;
454 case STMLCDIF_16BIT: 433 case STMLCDIF_16BIT:
455 case STMLCDIF_18BIT: 434 case STMLCDIF_18BIT:
456 /* 24 bit to 18 bit mapping */
457 ctrl |= CTRL_DF24; /* ignore the upper 2 bits in
458 * each colour component
459 */
460 break;
461 case STMLCDIF_24BIT: 435 case STMLCDIF_24BIT:
462 /* real 24 bit */ 436 /* real 24 bit */
463 break; 437 break;