From: "Jordan Crouse" <jordan.crouse@amd.com>
To: linux-fbdev-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Cc: david.hollister@amd.com
Subject: [PATCH] vt: Delay the update of the visible framebuffer console
Date: Tue, 2 May 2006 17:12:39 -0600 [thread overview]
Message-ID: <20060502231239.GB23644@cosmic.amd.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 258 bytes --]
This is a patch that delays updating the visible framebuffer console
until the other consoles have been initialized in order to avoid losing
output lines. This problem was discovered when loading a framebuffer driver
as a module. Comments welcome.
Jordan
[-- Attachment #2: vt.patch --]
[-- Type: text/plain, Size: 1730 bytes --]
[PATCH] vt: Delay the update of the visible framebuffer console
From: David Hollister <david.hollister@amd.com>
This patch delays 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>
---
drivers/char/vt.c | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index acc5d47..30f0f24 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -2700,9 +2700,11 @@ int take_over_console(const struct consw
if (!vc || !vc->vc_sw)
continue;
- j = i;
- if (CON_IS_VISIBLE(vc))
+ if (CON_IS_VISIBLE(vc)) {
+ j = 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,17 +2720,21 @@ int take_over_console(const struct consw
*/
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);
+ vc->vc_can_do_color ? "colour" : "mono",
+ desc, vc->vc_cols, vc->vc_rows);
+
+ if (CON_IS_VISIBLE(vc))
+ update_screen(vc);
+ }
else
printk("to %s\n", desc);
next reply other threads:[~2006-05-02 22:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-02 23:12 Jordan Crouse [this message]
2006-05-02 23:22 ` [Linux-fbdev-devel] [PATCH] vt: Delay the update of the visible framebuffer console Antonino A. Daplas
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=20060502231239.GB23644@cosmic.amd.com \
--to=jordan.crouse@amd.com \
--cc=david.hollister@amd.com \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).