diff options
author | Thomas Pfaff <tpfaff@pcs.com> | 2008-02-06 04:39:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:41:18 -0500 |
commit | 91c4313206e4409871e2ddd13c29508afe1c8834 (patch) | |
tree | a37ae47c38b3f1fa119f141d546c000f58502eb9 /drivers/video/console/tileblit.c | |
parent | e8973637bd49de225130f9c04ceb388d48969d98 (diff) |
fbcon: fix color generation for monochrome framebuffer
The current attr_fgcol_ec / attr_bgcol_ec macros do a simple shift of bits
to get the color from vc_video_erase_char. For a monochrome display
however the attribute does not contain any color, only attribute bits.
Furthermore the reverse bit is lost because it is shifted out, the
resulting color is always 0.
This can bee seen on a monochrome console either directly or by setting it
to inverse mode via "setterm -inversescreen on" . Text is written with
correct color, fb_fillrects from a bit_clear / bit_clear_margins will get
wrong colors.
Signed-off-by: Thomas Pfaff <tpfaff@pcs.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/console/tileblit.c')
-rw-r--r-- | drivers/video/console/tileblit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/console/tileblit.c b/drivers/video/console/tileblit.c index d981fe4d86c6..0056a41e5c35 100644 --- a/drivers/video/console/tileblit.c +++ b/drivers/video/console/tileblit.c | |||
@@ -40,8 +40,8 @@ static void tile_clear(struct vc_data *vc, struct fb_info *info, int sy, | |||
40 | 40 | ||
41 | rect.index = vc->vc_video_erase_char & | 41 | rect.index = vc->vc_video_erase_char & |
42 | ((vc->vc_hi_font_mask) ? 0x1ff : 0xff); | 42 | ((vc->vc_hi_font_mask) ? 0x1ff : 0xff); |
43 | rect.fg = attr_fgcol_ec(fgshift, vc); | 43 | rect.fg = attr_fgcol_ec(fgshift, vc, info); |
44 | rect.bg = attr_bgcol_ec(bgshift, vc); | 44 | rect.bg = attr_bgcol_ec(bgshift, vc, info); |
45 | rect.sx = sx; | 45 | rect.sx = sx; |
46 | rect.sy = sy; | 46 | rect.sy = sy; |
47 | rect.width = width; | 47 | rect.width = width; |