mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bill Nottingham <notting@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org
Subject: [PATCH] vgacon: set vc_hi_font_mask correctly
Date: Thu, 14 Apr 2005 15:42:39 -0400	[thread overview]
Message-ID: <20050414194239.GA29239@nostromo.devel.redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

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.

Bill

[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 582 bytes --]

diff -ru linux-2.6.11-orig/drivers/video/console/vgacon.c linux-2.6.11/drivers/video/console/vgacon.c
--- linux-2.6.11-orig/drivers/video/console/vgacon.c	2005-04-08 23:52:59.000000000 -0400
+++ linux-2.6.11/drivers/video/console/vgacon.c	2005-04-14 14:54:29.000000000 -0400
@@ -337,6 +337,8 @@
 	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])

                 reply	other threads:[~2005-04-14 19:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050414194239.GA29239@nostromo.devel.redhat.com \
    --to=notting@redhat.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®