2003-06-16 03:23:35

by

[permalink] [raw]
Subject: [PATCH][2.5] fbcon.c complement_mask bug

When using a frame buffer console with a 512-character font, the mouse
pointer starts using the wrong complement_mask after a console reset.

This patch is against 2.5.71. It fixes s_complement_mask so that it is
always a valid default value for complement_mask.

Chris


--- a/drivers/video/console/fbcon.c 2003-06-01 09:56:46.000000000 -0400
+++ b/drivers/video/console/fbcon.c 2003-06-15 22:54:47.000000000 -0400
@@ -1826,8 +1826,10 @@
vc->vc_font.height = h;
if (vc->vc_hi_font_mask && cnt == 256) {
vc->vc_hi_font_mask = 0;
- if (vc->vc_can_do_color)
+ if (vc->vc_can_do_color) {
vc->vc_complement_mask >>= 1;
+ vc->vc_s_complement_mask >>= 1;
+ }

/* ++Edmund: reorder the attribute bits */
if (vc->vc_can_do_color) {
@@ -1847,8 +1849,10 @@
}
} else if (!vc->vc_hi_font_mask && cnt == 512) {
vc->vc_hi_font_mask = 0x100;
- if (vc->vc_can_do_color)
+ if (vc->vc_can_do_color) {
vc->vc_complement_mask <<= 1;
+ vc->vc_s_complement_mask <<= 1;
+ }

/* ++Edmund: reorder the attribute bits */
{