summaryrefslogtreecommitdiffstats
path: root/drivers/video/console/bitblit.c
diff options
context:
space:
mode:
authorAntonino A. Daplas2005-09-09 22:04:37 +0200
committerLinus Torvalds2005-09-09 22:58:00 +0200
commitb8c909454f046b59065c6997b651fe20cd90c0f4 (patch)
tree2a8e03fe69c1b02dc610f57208d693e05b95969c /drivers/video/console/bitblit.c
parent[PATCH] nvidiafb: Fallback to firmware EDID (diff)
downloadkernel-qcow2-linux-b8c909454f046b59065c6997b651fe20cd90c0f4.tar.gz
kernel-qcow2-linux-b8c909454f046b59065c6997b651fe20cd90c0f4.tar.xz
kernel-qcow2-linux-b8c909454f046b59065c6997b651fe20cd90c0f4.zip
[PATCH] fbdev: Fix greater than 1 bit monochrome color handling
Currently, fbcon assumes that the visual FB_VISUAL_MONO* is always 1 bit. According to Geert, there are old hardware where it's possible to have monochrome at 8-bit, but has only 2 colors, black - 0x00 and white - 0xff. Fix color handlers (fb_get_color_depth, and get_color) for this special case. 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 'drivers/video/console/bitblit.c')
-rw-r--r--drivers/video/console/bitblit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c
index 3c731577fed6..12eaf0aa87e6 100644
--- a/drivers/video/console/bitblit.c
+++ b/drivers/video/console/bitblit.c
@@ -39,7 +39,7 @@ static inline int get_attribute(struct fb_info *info, u16 c)
{
int attribute = 0;
- if (fb_get_color_depth(&info->var) == 1) {
+ if (fb_get_color_depth(&info->var, &info->fix) == 1) {
if (attr_underline(c))
attribute |= FBCON_ATTRIBUTE_UNDERLINE;
if (attr_reverse(c))