|
From: Geert U. <ge...@li...> - 2003-01-05 19:00:37
|
On 6 Jan 2003, Antonino Daplas wrote:
> On Mon, 2003-01-06 at 00:38, Geert Uytterhoeven wrote:
> > I have a few questions and comments related to fb_imageblit().
> >
> > 1. Why is the logo data in fb_image.data stored in an `unpacked' way? I.e.
> > each byte of the logo data corresponds to one pixel of the image,
> > irrespective of the depth of the image.
> >
> I asked before what would be the content of the logo data and it was
> agreed that the logo data would either contain indices to the
> pseudo_palette for truecolor and directcolor or the pixel itself for the
> rest so it's consistent with the rest of the soft accel functions.
> Fixing the minimum unit to one byte seems a reasonable compromise
> between maximum number of colors available and size of logo data. Plus,
> it would be simpler to code.
Yes, that's reasonable.
> > However, I do see one good reason: it makes life easier for planar
> > displays, since a fast c2p (chunky-to-planar) convertor doesn't have to
> > care about the image depth, the source data is always 1 byte per pixel.
> >
> > 2. If fb_image.depth == 1, how can fb_imageblit() distinguish between drawing
> > a monochrome image (e.g. penguin logo) and color expanding a monochrome
> > image (e.g. drawing text)? It's not possible to handle them the same, since
> > image data for color expansion is packed, while image data for monochrome
> > image drawing is not.
> I noticed this before but completely forgot about it because I have no
> monochrome graphics card to test :-)
I didn't think about that as well, until I tried all possible depths (1-8) with
amifb.
> > If monochrome image data would be packed as well, it could be handled by
> > setting fb_image.fg_color = 1 and fb_image.bg_color = 0 (or vice versa for
> > mono10), and fb_set_logo() becomes simpler as well.
> >
> > If we retain the unpacked data for images, we need some other flag to
> > indicate color expansion. Perhaps setting fb_image.depth to 0?
> >
> If we change the contents of the logo data, then it makes sense to pack
> the logo data also. However, if we stick to indices, we might as well
> retain the "unpacked" 8-bit format. I think setting fb_image.depth to 0
OK.
> to mean color expansion is more appropriate. Drivers that will need
OK.
> trivial changing would be tgafb, i810fb, rivafb, tdfxfb, atyfb, vga16fb
> and of course cfb_imgblt.c, softcursor.c and fbcon.c.
>
> I'll submit a patch if everyone agrees.
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li...
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
|