mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Adrian McMenamin" <lkmladrian@gmail.com>
To: "Ondrej Zajicek" <santiago@crfreenet.org>,
	linux-kernel@vger.kernel.org,
	"Antonino A. Daplas" <adaplas@gmail.com>,
	lethal@linux-sh.org
Subject: Re: [PATCH] Framebuffer: Fix 16bpp colour output in Dreamcast pvr2fb
Date: Sat, 28 Jul 2007 18:59:17 +0100	[thread overview]
Message-ID: <8b67d60707281059te706d4agc7923291021a0ffe@mail.gmail.com> (raw)
In-Reply-To: <20070728171226.GA7247@localhost.localdomain>

On 28/07/07, Ondrej Zajicek <santiago@crfreenet.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.

      parent reply	other threads:[~2007-07-28 17:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-28 14:51 Adrian McMenamin
     [not found] ` <20070728171226.GA7247@localhost.localdomain>
2007-07-28 17:59   ` Adrian McMenamin [this message]

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=8b67d60707281059te706d4agc7923291021a0ffe@mail.gmail.com \
    --to=lkmladrian@gmail.com \
    --cc=adaplas@gmail.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=santiago@crfreenet.org \
    /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

all inboxes | Powered by JetHome®