Commit 4ee1acce authored by David Hollister's avatar David Hollister Committed by Linus Torvalds

[PATCH] vt: Delay the update of the visible console

Delay the update of the visible framebuffer console until all other consoles
have been initialized in order to avoid losing information.  This only seems
to be a problem with modules, not with built-in drivers.
Signed-off-by: default avatarDavid Hollister <david.hollister@amd.com>
Signed-off-by: default avatarJordan Crouse <jordan.crouse@amd.com>
Signed-off-by: default avatarAntonino Daplas <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6dbde380
...@@ -2665,7 +2665,7 @@ int __init vty_init(void) ...@@ -2665,7 +2665,7 @@ int __init vty_init(void)
int take_over_console(const struct consw *csw, int first, int last, int deflt) int take_over_console(const struct consw *csw, int first, int last, int deflt)
{ {
int i, j = -1; int i, j = -1, k = -1;
const char *desc; const char *desc;
struct module *owner; struct module *owner;
...@@ -2701,8 +2701,11 @@ int take_over_console(const struct consw *csw, int first, int last, int deflt) ...@@ -2701,8 +2701,11 @@ int take_over_console(const struct consw *csw, int first, int last, int deflt)
continue; continue;
j = i; j = i;
if (CON_IS_VISIBLE(vc)) if (CON_IS_VISIBLE(vc)) {
k = i;
save_screen(vc); save_screen(vc);
}
old_was_color = vc->vc_can_do_color; old_was_color = vc->vc_can_do_color;
vc->vc_sw->con_deinit(vc); vc->vc_sw->con_deinit(vc);
vc->vc_origin = (unsigned long)vc->vc_screenbuf; vc->vc_origin = (unsigned long)vc->vc_screenbuf;
...@@ -2718,18 +2721,23 @@ int take_over_console(const struct consw *csw, int first, int last, int deflt) ...@@ -2718,18 +2721,23 @@ int take_over_console(const struct consw *csw, int first, int last, int deflt)
*/ */
if (old_was_color != vc->vc_can_do_color) if (old_was_color != vc->vc_can_do_color)
clear_buffer_attributes(vc); clear_buffer_attributes(vc);
if (CON_IS_VISIBLE(vc))
update_screen(vc);
} }
printk("Console: switching "); printk("Console: switching ");
if (!deflt) if (!deflt)
printk("consoles %d-%d ", first+1, last+1); printk("consoles %d-%d ", first+1, last+1);
if (j >= 0) if (j >= 0) {
struct vc_data *vc = vc_cons[j].d;
printk("to %s %s %dx%d\n", printk("to %s %s %dx%d\n",
vc_cons[j].d->vc_can_do_color ? "colour" : "mono", vc->vc_can_do_color ? "colour" : "mono",
desc, vc_cons[j].d->vc_cols, vc_cons[j].d->vc_rows); desc, vc->vc_cols, vc->vc_rows);
else
if (k >= 0) {
vc = vc_cons[k].d;
update_screen(vc);
}
} else
printk("to %s\n", desc); printk("to %s\n", desc);
release_console_sem(); release_console_sem();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment