Messages in this thread Patch in this message | | | Subject | Some small console fixes (kmsg_redirect), small fix for vesafb | From | Claus-Justus Heine <> | Date | 19 Jul 1998 01:41:54 +0200 |
| |
Hi,
drivers/char/console.c: 2.1.109 has still some small bugs in drivers/char/console.c that are related to kernel message redirection. If kernel messages are redirected to a specific VT, then the VT for the kernel messages need not be the foreground console. Hence all calls that modify the video memory should be protected by "if (DO_UPDATE)". Or we remove the kernel message redirection feature ...
init/main.c: if CONFIG_VGA_CONSOLE is not defined, then there is no "no_scroll()" setup function.
drivers/video/vesafb.c: The current scheme of USE_REDRAW just can't work. vesafb.c tries to fake a special "bmove()" function that redraws the screen instead of moving video memory around. However, at the time the fbcon.c driver calls the bmove function to scroll vertically the screen hasn't been scrolled yet. Therefore vertical scrolling with vesafb + USE_REDRAW doesn't work. A fix is to use the SCROLL_YREDRAW flag for display->scrollmode. This causes the fbcon.c driver to redraw the screen itself when it scrolls vertically. No more vesafb specific hacks are needed.
drivers/video/fbcon.c: Setting the scroll region appropriately keeps the logo visible until the first console switch takes place. The drawback is that one has to reset the scroll region at some place ... Just for fun. I like it.
About the logo: At least with a Matrox Millenium using 8bit color depth the colors are not correct. High- and truecolor just works fine.
Patches for the above mentioned things are included below (with the exception of the wrong colors of the logo)
Please accept my apologies if all this already had been discussed.
Cheers
Claus
###############################################################################
diff -u --recursive --new-file linux-2.1.109-orig/drivers/char/console.c linux-2.1.109/drivers/char/console.c --- linux-2.1.109-orig/drivers/char/console.c Fri Jul 17 15:56:01 1998 +++ linux-2.1.109/drivers/char/console.c Fri Jul 17 16:28:12 1998 @@ -1884,8 +1884,9 @@ return; } - /* undraw cursor first */ - hide_cursor(currcons); + if (DO_UPDATE) + /* undraw cursor first */ + hide_cursor(currcons); start = (ushort *)pos; @@ -1895,7 +1896,8 @@ c = *b++; if (c == 10 || c == 13 || c == 8 || need_wrap) { if (cnt > 0) { - sw->con_putcs(vc_cons[currcons].d, start, cnt, y, x); + if (DO_UPDATE) + sw->con_putcs(vc_cons[currcons].d, start, cnt, y, x); x += cnt; if (need_wrap) x--; @@ -1925,7 +1927,8 @@ myx++; } if (cnt > 0) { - sw->con_putcs(vc_cons[currcons].d, start, cnt, y, x); + if (DO_UPDATE) + sw->con_putcs(vc_cons[currcons].d, start, cnt, y, x); x += cnt; if (x == video_num_columns) { x--; diff -u --recursive --new-file linux-2.1.109-orig/init/main.c linux-2.1.109/init/main.c --- linux-2.1.109-orig/init/main.c Fri Jul 17 15:55:52 1998 +++ linux-2.1.109/init/main.c Fri Jul 17 16:45:16 1998 @@ -88,7 +88,9 @@ #ifdef __i386__ extern void ioapic_pirq_setup(char *str, int *ints); #endif +#ifdef CONFIG_VGA_CONSOLE extern void no_scroll(char *str, int *ints); +#endif extern void kbd_reset_setup(char *str, int *ints); extern void panic_setup(char *str, int *ints); extern void bmouse_setup(char *str, int *ints); @@ -536,7 +538,9 @@ { "panic=", panic_setup }, { "console=", console_setup }, #ifdef CONFIG_VT +#ifdef CONFIG_VGA_CONSOLE { "no-scroll", no_scroll }, +#endif { "kbd-reset", kbd_reset_setup }, #endif #ifdef CONFIG_BUGi386 diff -u --recursive --new-file linux-2.1.109-orig/drivers/video/vesafb.c linux-2.1.109/drivers/video/vesafb.c --- linux-2.1.109-orig/drivers/video/vesafb.c Fri Jul 17 15:56:09 1998 +++ linux-2.1.109/drivers/video/vesafb.c Fri Jul 17 16:26:32 1998 @@ -101,6 +101,8 @@ static vesafb_scroll = USE_REDRAW; static struct display_switch vesafb_sw; +#if 0 +Yes, but use SCROLL_YREDRAW flag! void vesafb_bmove(struct display *p, int sy, int sx, int dy, int dx, int height, int width) { @@ -110,6 +112,7 @@ */ update_screen(currcon); } +#endif /* --------------------------------------------------------------------- */ @@ -241,11 +244,17 @@ display->dispsw = NULL; break; } +#if 0 if (vesafb_scroll == USE_REDRAW) { memcpy(&vesafb_sw,display->dispsw,sizeof(vesafb_sw)); vesafb_sw.bmove = vesafb_bmove; display->dispsw = &vesafb_sw; } +#else + if (vesafb_scroll == USE_REDRAW) { + display->scrollmode = SCROLL_YREDRAW; + } +#endif } static int vesafb_set_var(struct fb_var_screeninfo *var, int con, diff -u --recursive --new-file linux-2.1.109-orig/drivers/video/fbcon.c linux-2.1.109/drivers/video/fbcon.c --- linux-2.1.109-orig/drivers/video/fbcon.c Fri Jul 17 15:56:09 1998 +++ linux-2.1.109/drivers/video/fbcon.c Fri Jul 17 16:29:38 1998 @@ -470,8 +470,13 @@ update_screen(con); /* So that we set origin correctly */ } - if (logo) - fbcon_show_logo(); /* This is protected above by initmem_freed */ + if (logo) { + /* hack: set scroll region of fg_console. This makes the logo stay + * until the first VC switch happens. + */ + vc_cons[fg_console].d->vc_top = + fbcon_show_logo(); /* This is protected above by initmem_freed */ + } } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
| |