]> git.neil.brown.name Git - history.git/commit
[PATCH] fbcon: ifferentiate bits_per_pixel from color depth
authorAntonino Daplas <adaplas@hotpop.com>
Mon, 23 Aug 2004 05:50:00 +0000 (22:50 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 23 Aug 2004 05:50:00 +0000 (22:50 -0700)
commit37709b416f023bb0a20553b01e21b14d6e2214c9
treea6122e4162ea5de7d87acfabca65de433990f595
parented4a3514919baa1849d5d7f48951f3ccdc008012
[PATCH] fbcon: ifferentiate bits_per_pixel from color depth

1. If you remember this thread (HP300 support checked in), one concern
   was how to support framebuffers with bpp == 8 but color depth < 8
   (chunky layout).  I suggested to use the fields in var->{red|green|blue}
   to differentiate between bits_per_pixel and depth.  Included is a patch
   that does that.

   (The above assumes background/foreground of 0/1.  If hardware needs a
   different value, such as 0 - black, 0xff - white, just indicate
   TRUECOLOR or DIRECTCOLOR and set info->pseudopalette correctly in
   xxxfb_setcolreg().)

   The patch will break the following drivers when in monochrome since
   they do not set the proper color bitfields.  I've included a fix in
   patch #2.

   68328fb
   bw2fb
   cirrusfb
   dnfb
   macfb
   stifb
   tx3912fb

2. Besides the change above, support for the inverse and underline
   attribute is added in monochrome mode.  One should get text which are
   underlined/reversed if the corresponding attribute is set.

3. Because vt.c uses a 16-color palette, use fbcon_default_cmap if
   framebuffer can do less than 16 colors.  In 4 colors, display will be
   grayscaled.  In 8 colors, display should have the same colors as a
   16-color console but will lack brightness/ intensity.

4. Fix monochrome logo drawing.

5. Reduce code of fbcon_putc so it just calls fbcon_putcs.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/vt.c
drivers/video/cfbimgblt.c
drivers/video/console/fbcon.c
drivers/video/fbmem.c
include/linux/fb.h