From: Geert Uytterhoeven <geert@linux-m68k.org>
To: spock@gentoo.org
Cc: linux-kernel@vger.kernel.org,
"Krzysztof Helt" <krzysztof.h1@poczta.fm>,
"Ville Syrjälä" <syrjala@sci.fi>,
linux-fbdev-devel@lists.sourceforge.net
Subject: Re: [PATCH] fbdev: fix color component field length documentation
Date: Tue, 31 Mar 2009 09:18:09 +0200 [thread overview]
Message-ID: <10f740e80903310018v7e12de88m696f07e40dc617e3@mail.gmail.com> (raw)
In-Reply-To: <20090330220007.GC6540@spock.one.pl>
On Tue, Mar 31, 2009 at 00:00, Michal Januszewski <spock@gentoo.org> wrote:
> The documentation about the meaning of the color component bitfield lengths
> in pseudocolor modes is inconsistent. Fix it, so that it indicates the
> correct interpretation everywhere, i.e. that the 1 << length is the number
> of palette entries.
>
> Signed-off-by: Michal Januszewski <spock@gentoo.org>
> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
> Cc: Ville Syrjälä <syrjala@sci.fi>
> Cc: Geert Uytterhoeven <geert.uytterhoeven@gmail.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Except for this:
> --- a/include/linux/fb.h
> +++ b/include/linux/fb.h
> @@ -172,8 +172,11 @@ struct fb_fix_screeninfo {
> /* Interpretation of offset for color fields: All offsets are from the right,
> * inside a "pixel" value, which is exactly 'bits_per_pixel' wide (means: you
> * can use the offset as right argument to <<). A pixel afterwards is a bit
> - * stream and is written to video memory as that unmodified. This implies
> - * big-endian byte order if bits_per_pixel is greater than 8.
> + * stream and is written to video memory as that unmodified.
> + *
> + * For pseudocolor, offset is always 0 and length, which should be the same
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is not correct. Offset can be non-zero, e.g. for a 8 bpp frame buffer with
64 palette entries, where the palette index is stored in the upper 6 bits of the
8-bit pixel value, offset would be 2, and length would be 6.
Not that I've seen that (so far)...
> + * for all color components, indicates the number of available palette entries
> + * (i.e. # of entries = 1 << length).
> */
> struct fb_bitfield {
> __u32 offset; /* beginning of bitfield */
>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2009-03-31 7:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-30 22:00 Michal Januszewski
2009-03-31 7:18 ` Geert Uytterhoeven [this message]
2009-03-31 22:28 ` Michal Januszewski
2009-04-01 16:50 ` Krzysztof Helt
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=10f740e80903310018v7e12de88m696f07e40dc617e3@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=krzysztof.h1@poczta.fm \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=spock@gentoo.org \
--cc=syrjala@sci.fi \
/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®