[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>