diff options
author | Antonino Daplas <adaplas@hotpop.com> | 2004-08-22 22:50:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-22 22:50:00 -0700 |
commit | 37709b416f023bb0a20553b01e21b14d6e2214c9 (patch) | |
tree | a6122e4162ea5de7d87acfabca65de433990f595 /include | |
parent | ed4a3514919baa1849d5d7f48951f3ccdc008012 (diff) | |
download | history-37709b416f023bb0a20553b01e21b14d6e2214c9.tar.gz |
[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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fb.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h index 9186883fcb0f76..14b34bee7d07e8 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -380,6 +380,8 @@ struct fb_cursor { __u16 set; /* what to set */ __u16 enable; /* cursor on/off */ __u16 rop; /* bitop operation */ + __u16 ul; /* underlined? */ + __u16 rev; /* reversed? */ const char *mask; /* cursor mask bits */ struct fbcurpos hot; /* cursor hot spot */ struct fb_image image; /* Cursor image */ @@ -687,6 +689,7 @@ extern void fb_sysmove_buf_aligned(struct fb_info *info, struct fb_pixmap *buf, u32 height); extern void fb_load_cursor_image(struct fb_info *); extern void fb_set_suspend(struct fb_info *info, int state); +extern int fb_get_color_depth(struct fb_info *info); extern struct fb_info *registered_fb[FB_MAX]; extern int num_registered_fb; |