From patchwork Thu May 26 09:09:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damian Hobson-Garcia X-Patchwork-Id: 820232 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4Q96D9b024983 for ; Thu, 26 May 2011 09:06:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756988Ab1EZJGN (ORCPT ); Thu, 26 May 2011 05:06:13 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:53561 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756902Ab1EZJGM (ORCPT ); Thu, 26 May 2011 05:06:12 -0400 Received: by pvg12 with SMTP id 12so216745pvg.19 for ; Thu, 26 May 2011 02:06:11 -0700 (PDT) Received: by 10.143.68.18 with SMTP id v18mr76765wfk.340.1306400771758; Thu, 26 May 2011 02:06:11 -0700 (PDT) Received: from localhost.localdomain (mailhost.igel.co.jp [219.106.231.130]) by mx.google.com with ESMTPS id t15sm494626wfh.4.2011.05.26.02.06.09 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 May 2011 02:06:11 -0700 (PDT) From: Damian Hobson-Garcia To: linux-sh@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: lethal@linux-sh.org, magnus.damm@gmail.com, taki@igel.co.jp, matsu@igel.co.jp, Damian Hobson-Garcia Subject: [PATCH] fbdev: sh_mobile_lcdcfb: Change BGR24 to RGB24 Date: Thu, 26 May 2011 18:09:02 +0900 Message-Id: <1306400942-26956-1-git-send-email-dhobsong@igel.co.jp> X-Mailer: git-send-email 1.7.1 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 26 May 2011 09:06:14 +0000 (UTC) The ordering of the bytes in the 24 bpp RGB colour mode was being set to BGR. This now matches the values returned in the struct fb_var_screeninfo .red, .green, and .blue offsets as well as the output format of other blocs, such as the VEU Signed-off-by: Damian Hobson-Garcia --- drivers/video/sh_mobile_lcdcfb.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 04f2260..a442471 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c @@ -590,7 +590,7 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv) tmp |= 0x03; break; case 24: - tmp |= 0x0b; + tmp |= 0x02; break; case 32: break; @@ -1178,7 +1178,7 @@ static int sh_mobile_lcdc_set_bpp(struct fb_var_screeninfo *var, int bpp, var->transp.length = 0; break; - case 24: /* PKF[4:0] = 01011 - RGB 888 */ + case 24: /* PKF[4:0] = 00010 - RGB 888 */ var->red.offset = 16; var->red.length = 8; var->green.offset = 8;