Skip to content

Commit

Permalink
[PATCH] fbcon: fix complement_mask() with 512 character map
Browse files Browse the repository at this point in the history
There is a bug in the complement_mask when you have a 512-character map.
Linux boots to a default 256-character map and most probably your login
profile is loading a 512-character map which results in a bad gpm cursor.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed Dec 13, 2005
1 parent 2f6331f commit 56f0d64
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/video/console/fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -2048,7 +2048,7 @@ static int fbcon_switch(struct vc_data *vc)
struct fbcon_ops *ops;
struct display *p = &fb_display[vc->vc_num];
struct fb_var_screeninfo var;
int i, prev_console;
int i, prev_console, charcnt = 256;

info = registered_fb[con2fb_map[vc->vc_num]];
ops = info->fbcon_par;
Expand Down Expand Up @@ -2120,6 +2120,13 @@ static int fbcon_switch(struct vc_data *vc)

vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1);
vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800;

if (p->userfont)
charcnt = FNTCHARCNT(vc->vc_font.data);

if (charcnt > 256)
vc->vc_complement_mask <<= 1;

updatescrollmode(p, info, vc);

switch (p->scrollmode) {
Expand Down

0 comments on commit 56f0d64

Please sign in to comment.