linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ville Syrjala <syrjala@sci.fi>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: ben@simtec.co.uk, vince@simtec.co.uk, Ville Syrjala <syrjala@sci.fi>
Subject: [PATCH 2/7] sm501fb: RGB offsets are reversed in 16bpp modes
Date: Sun, 25 Nov 2007 22:01:27 +0200	[thread overview]
Message-ID: <11960208923806-git-send-email-syrjala@sci.fi> (raw)
In-Reply-To: <1196020892591-git-send-email-syrjala@sci.fi>

The RGB offsets were reversed in 16bpp modes. Simply trying to reverse
the offsets when endianness differs is clearly the wrong thing to do but
that is an issue for another patch.

Signed-off-by: Ville Syrjala <syrjala@sci.fi>
---
 drivers/video/sm501fb.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index 5ddd0fa..ea05676 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -286,13 +286,13 @@ static int sm501fb_check_var(struct fb_var_screeninfo *var,
 
 	case 16:
 		if (sm->pdata->flags & SM501_FBPD_SWAP_FB_ENDIAN) {
-			var->red.offset		= 11;
-			var->green.offset	= 5;
-			var->blue.offset	= 0;
-		} else {
 			var->blue.offset	= 11;
 			var->green.offset	= 5;
 			var->red.offset		= 0;
+		} else {
+			var->red.offset		= 11;
+			var->green.offset	= 5;
+			var->blue.offset	= 0;
 		}
 
 		var->red.length		= 5;
-- 
1.5.2.5


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  parent reply	other threads:[~2007-11-25 20:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-25 20:01 [PATCH 0/7] sm501 patches Ville Syrjala
2007-11-25 20:01 ` [PATCH 1/7] sm501fb: Direct color visual does not work Ville Syrjala
2007-12-28  3:21   ` Magnus Damm
2007-11-25 20:01 ` Ville Syrjala [this message]
2007-11-25 20:01 ` [PATCH 3/7] sm501fb: Set transp.offset to 0 in 8bpp and 16bpp modes Ville Syrjala
2007-11-25 20:01 ` [PATCH 4/7] sm501fb: Fix timing limits Ville Syrjala
2007-11-25 20:01 ` [PATCH 5/7] sm501: Remove a duplicated table Ville Syrjala
2007-11-25 20:01 ` [PATCH 6/7] sm501: Remove a misplaced x character Ville Syrjala
2007-11-26 16:18   ` Ben Dooks
2007-11-25 20:01 ` [PATCH 7/7] sm501: Add support for the SM502 programmable PLL Ville Syrjala
2007-12-07 18:35 ` [PATCH 0/7] sm501 patches Ben Dooks

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11960208923806-git-send-email-syrjala@sci.fi \
    --to=syrjala@sci.fi \
    --cc=ben@simtec.co.uk \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=vince@simtec.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).