diff options
author | David Hollister <david.hollister@amd.com> | 2006-06-26 00:26:41 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 09:58:30 -0700 |
commit | 4ee1acce49d616e0e3fbff76fa1dea0c7350535d (patch) | |
tree | 55e4f15b64263681205e2eabf9749be761dd2362 /drivers/char/vt.c | |
parent | 6dbde380ca525bbfedd65e11402f345e1d64cba9 (diff) | |
download | op-kernel-dev-4ee1acce49d616e0e3fbff76fa1dea0c7350535d.zip op-kernel-dev-4ee1acce49d616e0e3fbff76fa1dea0c7350535d.tar.gz |
[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: David Hollister <david.hollister@amd.com>
Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r-- | drivers/char/vt.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 6c94879..eb27eed 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -2665,7 +2665,7 @@ int __init vty_init(void) 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; struct module *owner; @@ -2701,8 +2701,11 @@ int take_over_console(const struct consw *csw, int first, int last, int deflt) continue; j = i; - if (CON_IS_VISIBLE(vc)) + if (CON_IS_VISIBLE(vc)) { + k = i; save_screen(vc); + } + old_was_color = vc->vc_can_do_color; vc->vc_sw->con_deinit(vc); 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) */ if (old_was_color != vc->vc_can_do_color) clear_buffer_attributes(vc); - - if (CON_IS_VISIBLE(vc)) - update_screen(vc); } + printk("Console: switching "); if (!deflt) 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", - vc_cons[j].d->vc_can_do_color ? "colour" : "mono", - desc, vc_cons[j].d->vc_cols, vc_cons[j].d->vc_rows); - else + vc->vc_can_do_color ? "colour" : "mono", + desc, vc->vc_cols, vc->vc_rows); + + if (k >= 0) { + vc = vc_cons[k].d; + update_screen(vc); + } + } else printk("to %s\n", desc); release_console_sem(); |