public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Bader <stefan.bader@canonical.com>
To: linux-kernel@vger.kernel.org
Cc: Jiri Kosina <jkosina@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	Uwe Geuder <ubuntuLp-ugeuder@sneakemail.com>
Subject: [PATCH] vgacon: Return the upper half of 512 character fonts
Date: Tue, 21 Apr 2009 16:43:26 +0200	[thread overview]
Message-ID: <49EDDB8E.5020200@canonical.com> (raw)

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

Not sure who would be considered maintainer for vgacon, so spreading slightly. 
There is a bug in returning the font data for 512 character fonts which seems 
to have evaded all detection. Unlikely to be important enough for stable as it 
won't cause any mayhem.

Regards,
Stefan



[-- Attachment #2: 0001-vgacon-Return-the-upper-half-of-512-character-fonts.patch --]
[-- Type: text/x-diff, Size: 1604 bytes --]

>From e7aa277f2e8d76c4d93991b345a80ef80f461f89 Mon Sep 17 00:00:00 2001
From: Stefan Bader <stefan.bader@canonical.com>
Date: Fri, 17 Apr 2009 23:21:05 +0200
Subject: [PATCH] vgacon: Return the upper half of 512 character fonts

Bug: #355057

Uwe Geuder noted that he gets random bitmaps on a text console if he tried
to type extended characters (like the e acute). For him everything above
unicode 0xa0 was corrupted.

After some digging there seems to be a little culprit in vgacon since the
beginning of ages (well git). The function vgacon_font_get will store the
number of characters correctly in font->charcount but then calls to
vgacon_do_font_op(..., 0, 0). Which means only the lower 256 characters are
actually stored to the fontdata. The rest is left untouched. So the next time
that saved data is used, the garbled font appears. This happens on every
switch between text consoles.

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Tested-by: Uwe Geuder <ubuntuLp-ugeuder@sneakemail.com>
---
 drivers/video/console/vgacon.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index d012edd..38e86b8 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -1282,7 +1282,7 @@ static int vgacon_font_get(struct vc_data *c, struct console_font *font)
 	font->charcount = vga_512_chars ? 512 : 256;
 	if (!font->data)
 		return 0;
-	return vgacon_do_font_op(&state, font->data, 0, 0);
+	return vgacon_do_font_op(&state, font->data, 0, vga_512_chars);
 }
 
 #else
-- 
1.5.4.3


             reply	other threads:[~2009-04-21 14:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-21 14:43 Stefan Bader [this message]
2009-04-21 20:54 ` [PATCH] vgacon: Return the upper half of 512 character fonts Andrew Morton
2009-04-22  5:29   ` Stefan Bader

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=49EDDB8E.5020200@canonical.com \
    --to=stefan.bader@canonical.com \
    --cc=akpm@linux-foundation.org \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ubuntuLp-ugeuder@sneakemail.com \
    /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