public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Jonathan Campbell <jon@nerdgrounds.com>
Cc: David Miller <davem@davemloft.net>, linux-kernel@vger.kernel.org
Subject: Re: ATI Radeon DIRECTCOLOR -> TRUECOLOR patch
Date: Thu, 26 Feb 2009 13:18:56 +1100	[thread overview]
Message-ID: <1235614736.8805.338.camel@pasglop> (raw)
In-Reply-To: <49A5B150.8070703@nerdgrounds.com>

On Wed, 2009-02-25 at 13:00 -0800, Jonathan Campbell wrote:
> But at the very least could radeonfb default to truecolor-like
> behavior and leave the bizarre ramp mapping for programs that want it?

I don't understand your problem. Radeonfb does like other fbdev's in
that area. It has settable gamma ramp for which there's an API, and the
fbdev core is making use of it....

Just stick a linear ramp in from your program, that's the way to do go.

Cheers,
Ben.

> > On Wed, 2009-02-25 at 03:57 -0800, David Miller wrote:
> >   
> > > From: Jonathan Campbell <jon@nerdgrounds.com>
> > > Date: Wed, 25 Feb 2009 03:24:35 -0800
> > > 
> > > [ Ben H. is the Radeon driver maintainer, as listed in
> > >   linux/MAINTAINERS, you might want to CC: him ]
> > > 
> > >     
> > > > I don't know about you but when I ask the framebuffer to set up
> > > > 16-bit or 32-bit RGB modes I expect a video mode to be set up with
> > > > R, G, and B mapped linearly so that I can display images properly,
> > > > not some odd "directcolor" mode that seems to serve no other purpose
> > > > than to avoid a few shifts converting the fbcon palette to an RGB
> > > > triplet.
> > > >       
> > > It might be using DIRECTCOLOR for compatibility with openfirmware,
> > > BOOTX, or similar on PowerPC.
> > >     
> > 
> > Hrm, the kernel fb layer does seem to do strange things with the palette
> > for >8bpp stuff indeed. I'm not entirely sure why.
> > 
> > The problem if you switch to truecolor is that you remove the ability to
> > set the gamma ramp completely which some apps use.
> > 
> > Normally, I'd say it's the responsibility of your application, when it's
> > displaying pictures, to set an appropriate cmap. If you don't like the
> > one set by fbcon for displaying text, just set another one. Ie. You
> > aren't -supposed- to mix graphics and fbcon text from an application...
> > if you're going to blast to the fb, you should switch to KD_GRAPHICS (ie
> > take ownership of the VT) and set a linear ramp yourself.
> > 
> > Cheers,
> > Ben.
> > 
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/
> > 
> > 
> >   
> 


      parent reply	other threads:[~2009-02-26  2:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-25 11:24 ATI Radeon DIRECTCOLOR -> TRUECOLOR patch Jonathan Campbell
2009-02-25 11:57 ` David Miller
2009-02-25 20:42   ` Benjamin Herrenschmidt
2009-02-25 21:00     ` Jonathan Campbell
     [not found]     ` <49A5B150.8070703@nerdgrounds.com>
2009-02-26  2:18       ` Benjamin Herrenschmidt [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=1235614736.8805.338.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=jon@nerdgrounds.com \
    --cc=linux-kernel@vger.kernel.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