linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Kern <alex.kern@gmx.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: fbdev mail-list <linux-fbdev-devel@lists.sourceforge.net>
Subject: [PATCH fbtest] fix blue feet by 24bpp
Date: Mon, 18 Oct 2004 00:25:24 +0200	[thread overview]
Message-ID: <200410180025.24498.alex.kern@gmx.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

Hello, I have investigate, that blue feet by penguin in fbtest and 24bpp deep 
was caused by error in cfb24.c.
This patch fix it for me



But I have steel problems in test 007 and 008

I have posted photo pixs on 
http://home.arcor.de/alexander.khe/atyfb/fbtest-results/

Is it the similar problems with byte separation?

Cheers
Alex

[-- Attachment #2: fbtest24bppfix.patch --]
[-- Type: text/x-diff, Size: 717 bytes --]

--- drawops/cfb24.c.orig	2002-10-08 16:20:27.000000000 +0200
+++ drawops/cfb24.c	2004-10-17 15:08:02.000000000 +0200
@@ -33,9 +33,9 @@ static void cfb24_setpixel(u32 x, u32 y,
     u8 *dst;
 
     dst = &screen[y*screen_width+x*3];
-    dst[0] = (pixel >> 16) & 0xff;
+    dst[2] = (pixel >> 16) & 0xff;
     dst[1] = (pixel >> 8) & 0xff;
-    dst[2] = pixel & 0xff;
+    dst[0] = pixel & 0xff;
 }
 
 static pixel_t cfb24_getpixel(u32 x, u32 y)
@@ -43,7 +43,7 @@ static pixel_t cfb24_getpixel(u32 x, u32
     const u8 *src;
 
     src = &screen[y*screen_width+x*3];
-    return (src[0] << 16) | (src[1] << 8) | src[2];
+    return (src[2] << 16) | (src[1] << 8) | src[0];
 }
 
 const struct drawops cfb24_drawops = {

                 reply	other threads:[~2004-10-17 22:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200410180025.24498.alex.kern@gmx.de \
    --to=alex.kern@gmx.de \
    --cc=geert@linux-m68k.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /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).