linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bryan Stillwell <bryan@bokeoa.com>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: radeonfb and 16bit color problem
Date: Thu, 20 Jun 2002 21:29:58 -0600	[thread overview]
Message-ID: <20020620212958.B20756@bokeoa.com> (raw)

I'm using version 0.1.5 of the radeonfb driver that Ani Joshi posted on
this list earlier this month with kernel 2.4.19pre10, and I've run into
a problem with the colors not being right in 16bit color mode.  In 15bit
color mode, everything seems to look good...

Since running `fbset 800x600-75 -depth 16` seems to want to switch to
15bit color and not 16bit color, I had to use `fbset 800x600-75 -depth
16 -rgba 5,6,5,0` to get into 16bit color mode.  However, once I'm in
16bit color and try to view some jpegs using fbi, the colors are messed
up.

Based of of how the colors in the images are changing, I'm guessing
that the video card is only using the lower 5 bits of green instead of
all 6 bits (chopping off the most significant bit.)  This causes colors
that were only 50% green before to become 100% green (and 25% green
before to become 50%.)

Any ideas would be helpful.  I tried looking at the code myself, but I'm
still quite new to the framebuffer code.  However, this part looked kind
of strange to me:

   /* For 565, the green component is mixed one order below */
   if (rinfo->depth == 16) {
      OUTREG(PALETTE_INDEX, pindex>>1);
      OUTREG(PALETTE_DATA, (rinfo->palette[regno>>1].red << 16) |
             (green << 8) | (rinfo->palette[regno>>1].blue));
      green = rinfo->palette[regno<<1].green;
   }


BTW, I have a Radeon 8500 (QL).

Thanks,
Bryan


-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/

             reply	other threads:[~2002-06-21  3:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-21  3:29 Bryan Stillwell [this message]
2002-06-24  3:24 ` radeonfb and 16bit color problem Benjamin Herrenschmidt
2002-06-25 16:41   ` Bryan Stillwell
2002-06-24  5:41     ` Benjamin Herrenschmidt

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=20020620212958.B20756@bokeoa.com \
    --to=bryan@bokeoa.com \
    --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).