From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: linux-kernel@vger.kernel.org
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [PATCH] vt: do not update when the console is blanked
Date: Fri, 11 Jul 2008 15:50:18 +0100 [thread overview]
Message-ID: <4877732A.5030106@eu.citrix.com> (raw)
Hi all,
vt.c DO_UPDATE macro checks if the console is visible but doesn't check if
the console is blanked.
In fact updating fbcon while the console is blanked is not only unnecessary
but can even cause screen corruption.
Therefore I am adding a simple check on console_blanked in DO_UPDATE.
Signed-off-by: stefano.stabellini@eu.citrix.com
---
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 935f1c2..8d4bd3c 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -261,7 +261,7 @@ static void notify_update(struct vc_data *vc)
#ifdef VT_BUF_VRAM_ONLY
#define DO_UPDATE(vc) 0
#else
-#define DO_UPDATE(vc) CON_IS_VISIBLE(vc)
+#define DO_UPDATE(vc) (CON_IS_VISIBLE(vc) && !console_blanked)
#endif
static inline unsigned short *screenpos(struct vc_data *vc, int offset, int viewed)
next reply other threads:[~2008-07-11 14:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-11 14:50 Stefano Stabellini [this message]
2008-07-13 5:11 ` [PATCH] vt: do not update when the console is blanked Andrew Morton
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=4877732A.5030106@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.com \
--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