mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Horton <pdh@berserk.demon.co.uk>
To: benh@kernel.crashing.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Radeon frame buffer driver
Date: Wed, 10 Apr 2002 10:40:55 +0100	[thread overview]
Message-ID: <20020410094055.GA789@berserk.demon.co.uk> (raw)
In-Reply-To: <20020410001249.GA2010@berserk.demon.co.uk> <20020410090638.1550@mailhost.mipsys.com>

On Wed, Apr 10, 2002 at 11:06:38AM +0200, benh@kernel.crashing.org wrote:
> >Another installment of the Radeon frame buffer driver patch (still
> >against 2.4.19-pre2).
> >
> >* All colour modes > 8bpp are now DIRECTCOLOR (Geert inspired).
> >
> >* Driver now uses 'ypan' to speed up scrolling even further.
> >
> >* Fix CRTC pitch to match accelerator pitch (800x600x256 works again).
> >
> >Driver seems okay now, plays nicely with X etc. etc. Please test if you
> >can
> >
> >P.
> 
> I really don't like all the hacks related to the palette in 15/16/32bpp 
> mode. You shouldn't affect whatever palette gets passed from userland or
> apps that rely on full access to the gamma table will fail. Also, iirc,
> the chip's palette in 16 bits mode is 64 entries and 32 in 15 bpp, you
> can verify this by seeing how much entries get passed by xfbdev when
> it configures the 1:1 color ramp. The old code worked except for the
> cursor in console mode which tends to have crazy colors, I think due to
> fbdev code brokenness but I'm too sure about that last one.
> 

Please look at code.

In 32bpp mode user space can set all 256 palette indices.

In 15 bit mode user space can set all 32 palette indices.

In 16bpp mode user space can set all 32 palette indices for red and
blue, and all 64 palette indices for green.

The reason 16bpp mode fails when using "fbtv" is that "fbtv" only
initialises the first 32 palette indices for green, but the captured
video uses all 64 values. I patched "fbtv" to initialise all 64 indices
and it worked fine. I think this is a bug in "fbtv" (and other such
apps).

There is a hack in the code to support "fbtv" in 16bpp mode, but it is
only used if you pass the driver the "fb16fix" flag, and it limits the
green component to 5 bits. I used it for testing but it doesn't need to
live any longer. If people want to use "fbtv" they should use 15 or 32
bit mode.

Test it, in all modes, I have.

The other hack is one that sets the top indices in the palette to white
when palette index 0 is set. This is needed for the soft cursor to work
as the soft cursor just flips all the bits in each pixel, which doesn't
work in DIRECTCOLOR modes. Other drivers do similiar things. I've
started to look at using the accelerator engine for flipping the cursor
but there are locking issues involved which I want to get right.

P.

  reply	other threads:[~2002-04-10  9:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-10  0:12 Peter Horton
2002-04-10  2:31 ` Jonathan A. Davis
2002-04-10  6:04 ` Ani Joshi
2002-04-10  9:06 ` benh
2002-04-10  9:40   ` Peter Horton [this message]
2002-04-10 10:57     ` benh
2002-04-10 10:19       ` Peter Horton
2002-04-10 11:06         ` Geert Uytterhoeven
2002-04-10 13:01           ` benh
2002-04-10 12:22             ` Geert Uytterhoeven
2002-04-10 13:27               ` benh
2002-04-10 13:03           ` Peter Horton
2002-04-10 13:14             ` Geert Uytterhoeven
2002-04-10 23:09           ` Peter Horton
2002-04-10 13:00         ` benh

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=20020410094055.GA789@berserk.demon.co.uk \
    --to=pdh@berserk.demon.co.uk \
    --cc=benh@kernel.crashing.org \
    --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

all inboxes | Powered by JetHome®