Skip to content

Commit

Permalink
vt: do not update when the console is blanked
Browse files Browse the repository at this point in the history
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 <stefano.stabellini@eu.citrix.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Stefano Stabellini authored and Linus Torvalds committed Jul 24, 2008
1 parent e0426e6 commit f700d6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f700d6e

Please sign in to comment.