]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
[PATCH] vgacon: set vc_hi_font_mask correctly
authorBill Nottingham <notting@redhat.com>
Sun, 1 May 2005 15:59:07 +0000 (08:59 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 1 May 2005 15:59:07 +0000 (08:59 -0700)
When allocating a new VC with vgacon_init(), the font is shared across all
the VGA consoles.  However, the font mask was always set to the default
value of zero in visual_init(), even if we were using 512 character fonts
at the time.

Moreover, code in vgacon.c:vga_do_font_op() didn't reset the mask if the
console driver thinks it's already in 512 character mode.  This means that
to *fix* it, you'd actually have to take the console out of 512 character
mode and then set it back.

The attached sets vc_hi_font_mask in vgacon_init() for any new consoles
opened if the vgacon driver is already in 512 character mode, solving this.

This bug goes back to 2.4.18 at least, probably earlier.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/video/console/vgacon.c

index 7d1ae06667c6404a54205f6132ddbb720da413aa..bcf59b28a14f33953bfc4fc10060ec340d479346 100644 (file)
@@ -337,6 +337,8 @@ static void vgacon_init(struct vc_data *c, int init)
        c->vc_scan_lines = vga_scan_lines;
        c->vc_font.height = vga_video_font_height;
        c->vc_complement_mask = 0x7700;
+       if (vga_512_chars)
+               c->vc_hi_font_mask = 0x0800;
        p = *c->vc_uni_pagedir_loc;
        if (c->vc_uni_pagedir_loc == &c->vc_uni_pagedir ||
            !--c->vc_uni_pagedir_loc[1])