All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben@simtec.co.uk>
To: krzysztof.h1@wp.p, akpm@linux-foundation.org
Cc: dilinger@debian.org, Vincent Sanders <vince@simtec.co.uk>,
	lethal@linux-sh.org, linux-fbdev-devel@lists.sourceforge.net,
	Simtec Linux Team <linux@simtec.co.uk>
Subject: [PATCH 1/4] FRAMEBUFFER: Fix cfbfillrect for non-zero colours.
Date: Mon, 23 Nov 2009 16:01:25 +0000	[thread overview]
Message-ID: <20091123160144.804049553@fluff.org.uk> (raw)
In-Reply-To: 20091123160124.403392586@fluff.org.uk

[-- Attachment #1: simtec/ready/cfbrectfill-colorfix.patch --]
[-- Type: text/plain, Size: 1459 bytes --]

From: Vincent Sanders <vince@simtec.co.uk>

The cfbfillrect routine was incorrectly using the palette to lookup true and
direct colours, but using indexed colours directly. This was simply the
inversion of the sense of an 'if' statement. This patch fixes that so that
colours other than black work properly for cfbfillrect.

Signed-off-by: Vincent Sanders <vince@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>

---
 drivers/video/cfbfillrect.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: b/drivers/video/cfbfillrect.c
===================================================================
--- a/drivers/video/cfbfillrect.c	2009-05-10 14:11:19.000000000 +0100
+++ b/drivers/video/cfbfillrect.c	2009-05-10 14:16:33.000000000 +0100
@@ -289,9 +289,9 @@ void cfb_fillrect(struct fb_info *p, con
 
 	if (p->fix.visual == FB_VISUAL_TRUECOLOR ||
 	    p->fix.visual == FB_VISUAL_DIRECTCOLOR )
-		fg = ((u32 *) (p->pseudo_palette))[rect->color];
-	else
 		fg = rect->color;
+	else
+		fg = ((u32 *) (p->pseudo_palette))[rect->color];
 
 	pat = pixel_to_pat(bpp, fg);
 


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

       reply	other threads:[~2009-11-23 16:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20091123160124.403392586@fluff.org.uk>
2009-11-23 16:01 ` Ben Dooks [this message]
2009-11-23 16:01 ` [PATCH 2/4] SM501: Fix missing uses of resource_size() Ben Dooks
2009-11-23 16:01 ` [PATCH 3/4] SM501: Fix use of old <asm/io.h> instead of <linux/io.h> Ben Dooks
2009-11-23 16:01 ` [PATCH 4/4] SM501: Implement acceleration features Ben Dooks
2009-11-23 20:40   ` Andrew Morton

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=20091123160144.804049553@fluff.org.uk \
    --to=ben@simtec.co.uk \
    --cc=akpm@linux-foundation.org \
    --cc=dilinger@debian.org \
    --cc=krzysztof.h1@wp.p \
    --cc=lethal@linux-sh.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux@simtec.co.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.