* [PATCH 2.6] fbcon font cloning fix
@ 2004-03-18 21:57 Petr Baudis
0 siblings, 0 replies; only message in thread
From: Petr Baudis @ 2004-03-18 21:57 UTC (permalink / raw)
To: linux-kernel, linux-fbdev-devel
Hello,
this patch (against 2.6.4) fixes a bug which I hit when migrating from 2.4.
Basically, when I do setfont during the system boot, the then-spawned ttys do
not retain the new font but fall back to the default one.
I've tracked that down to a clearly bogus test in fbcon_set_display(),
because vc->vc_font.width is not set at that time yet (no font has been loaded
for the new vc). But even if it would (or this was meant to test against
tmp->vc_font.width), it would mean only *HUGE* fonts would be retained. And
even if there were *two* bugs there and it was supposed to be less-than there,
I couldn't make a sense of the test.
Please consider applying.
drivers/video/console/fbcon.c | 22 ++++++++++------------
1 files changed, 10 insertions(+), 12 deletions(-)
Kind regards,
Petr Baudis
diff -rup linux/drivers/video/console/fbcon.c linux+pasky/drivers/video/console/fbcon.c
--- linux/drivers/video/console/fbcon.c Thu Mar 18 22:14:28 2004
+++ linux+pasky/drivers/video/console/fbcon.c Thu Mar 18 21:32:01 2004
@@ -746,19 +746,17 @@ static void fbcon_set_display(struct vc_
struct display *q = &fb_display[i];
struct vc_data *tmp = vc_cons[i].d;
- if (vc->vc_font.width > 32) {
- /* If we are not the first console on this
- fb, copy the font from that console */
- vc->vc_font.width = tmp->vc_font.width;
- vc->vc_font.height = tmp->vc_font.height;
- vc->vc_font.data = p->fontdata = q->fontdata;
- p->userfont = q->userfont;
- if (p->userfont) {
- REFCOUNT(p->fontdata)++;
- charcnt = FNTCHARCNT(p->fontdata);
- }
- con_copy_unimap(vc->vc_num, i);
+ /* If we are not the first console on this
+ fb, copy the font from that console */
+ vc->vc_font.width = tmp->vc_font.width;
+ vc->vc_font.height = tmp->vc_font.height;
+ vc->vc_font.data = p->fontdata = q->fontdata;
+ p->userfont = q->userfont;
+ if (p->userfont) {
+ REFCOUNT(p->fontdata)++;
+ charcnt = FNTCHARCNT(p->fontdata);
}
+ con_copy_unimap(vc->vc_num, i);
}
if (!p->fontdata) {
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-03-18 21:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-18 21:57 [PATCH 2.6] fbcon font cloning fix Petr Baudis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).