[<prev] [next>] [day] [month] [year] [list]
Message-ID: <8b67d60707281059te706d4agc7923291021a0ffe@mail.gmail.com>
Date: Sat, 28 Jul 2007 18:59:17 +0100
From: "Adrian McMenamin" <lkmladrian@...il.com>
To: "Ondrej Zajicek" <santiago@...reenet.org>,
linux-kernel@...r.kernel.org,
"Antonino A. Daplas" <adaplas@...il.com>, lethal@...ux-sh.org
Subject: Re: [PATCH] Framebuffer: Fix 16bpp colour output in Dreamcast pvr2fb
On 28/07/07, Ondrej Zajicek <santiago@...reenet.org> wrote:
> On Sat, Jul 28, 2007 at 03:51:38PM +0100, Adrian McMenamin wrote:
> > Tony,
> >
> > This patch - on top of your others - fixes the colour output for 16bpp
> > RGB565 output in the Dreamcast - it was a simple out by one error in
> > the bit shift.
>
> > @@ -330,27 +331,28 @@ static int pvr2fb_setcolreg(unsigned int regno, unsigned int red,
> > case 16: /* RGB 565 */
> > tmp = (red & 0xf800) |
> > ((green & 0xfc00) >> 5) |
> > - ((blue & 0xf800) >> 11);
> > + ((blue & 0xf800) >> 10);
>
> This mixes lsb of green with msb of blue. If you want RGB 565,
> then >> 11 is correct. If you want RGB 555, green should
> be anded with 0xf800.
>
You are, of course, quite right, which makes it all the more the
strange that it appeared to fix the problem. Back to the drawing board
then.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists