From patchwork Tue Jun 18 08:44:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hector Palacios X-Patchwork-Id: 2739951 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 49CBAC0AB1 for ; Tue, 18 Jun 2013 08:50:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1B22B20353 for ; Tue, 18 Jun 2013 08:50:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DA02620348 for ; Tue, 18 Jun 2013 08:49:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755052Ab3FRIov (ORCPT ); Tue, 18 Jun 2013 04:44:51 -0400 Received: from mail1.bemta7.messagelabs.com ([216.82.254.107]:40800 "EHLO mail1.bemta7.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755034Ab3FRIos (ORCPT ); Tue, 18 Jun 2013 04:44:48 -0400 Received: from [216.82.254.211:46602] by server-11.bemta-7.messagelabs.com id BC/6F-23312-CFD10C15; Tue, 18 Jun 2013 08:44:44 +0000 X-Env-Sender: Hector.Palacios@digi.com X-Msg-Ref: server-8.tower-201.messagelabs.com!1371545084!12406574!1 X-Originating-IP: [66.77.174.13] X-StarScan-Received: X-StarScan-Version: 6.9.6; banners=-,-,- X-VirusChecked: Checked Received: (qmail 16700 invoked from network); 18 Jun 2013 08:44:44 -0000 Received: from mail.mx3.digi.com (HELO mcl-sms-ns1.digi.com) (66.77.174.13) by server-8.tower-201.messagelabs.com with RC4-SHA encrypted SMTP; 18 Jun 2013 08:44:44 -0000 Received: from MTK-SMS-XCH03.digi.com (10.10.8.197) by mail.mx1.digi.com (172.16.1.13) with Microsoft SMTP Server (TLS) id 8.3.298.1; Tue, 18 Jun 2013 03:44:42 -0500 Received: from dor-sms-exch01.digi.com (10.49.8.100) by MTK-SMS-XCH03.digi.com (10.10.8.197) with Microsoft SMTP Server (TLS) id 14.3.123.3; Tue, 18 Jun 2013 03:44:36 -0500 Received: from [10.101.1.187] (10.101.1.187) by dor-sms-exch01.digi.com (10.49.8.100) with Microsoft SMTP Server (TLS) id 8.3.298.1; Tue, 18 Jun 2013 10:44:33 +0200 Message-ID: <51C01DE1.8030300@digi.com> Date: Tue, 18 Jun 2013 10:44:17 +0200 From: Hector Palacios Organization: Digi International User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: , CC: , "linux-arm-kernel@lists.infradead.org" , "fabio.estevam@freescale.com" , "linux-kernel@vger.kernel.org" , "shawn.guo@linaro.org" , Alexandre Belloni , "brian@crystalfontz.com" , "maxime.ripard@free-electrons.com" Subject: [PATCH RESEND] video: mxsfb: fix color settings for 18bit data bus and 32bpp Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Juergen Beisert Acked-by: Maxime Ripard --- drivers/video/mxsfb.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 21223d4..d2c5105 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -239,24 +239,6 @@ static const struct fb_bitfield def_rgb565[] = { } }; -static const struct fb_bitfield def_rgb666[] = { - [RED] = { - .offset = 16, - .length = 6, - }, - [GREEN] = { - .offset = 8, - .length = 6, - }, - [BLUE] = { - .offset = 0, - .length = 6, - }, - [TRANSP] = { /* no support for transparency */ - .length = 0, - } -}; - static const struct fb_bitfield def_rgb888[] = { [RED] = { .offset = 16, @@ -309,9 +291,6 @@ static int mxsfb_check_var(struct fb_var_screeninfo *var, break; case STMLCDIF_16BIT: case STMLCDIF_18BIT: - /* 24 bit to 18 bit mapping */ - rgb = def_rgb666; - break; case STMLCDIF_24BIT: /* real 24 bit */ rgb = def_rgb888; @@ -453,11 +432,6 @@ static int mxsfb_set_par(struct fb_info *fb_info) return -EINVAL; case STMLCDIF_16BIT: case STMLCDIF_18BIT: - /* 24 bit to 18 bit mapping */ - ctrl |= CTRL_DF24; /* ignore the upper 2 bits in - * each colour component - */ - break; case STMLCDIF_24BIT: /* real 24 bit */ break;