public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vt: do not update when the console is blanked
@ 2008-07-11 14:50 Stefano Stabellini
  2008-07-13  5:11 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Stefano Stabellini @ 2008-07-11 14:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: Stefano Stabellini

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)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] vt: do not update when the console is blanked
  2008-07-11 14:50 [PATCH] vt: do not update when the console is blanked Stefano Stabellini
@ 2008-07-13  5:11 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2008-07-13  5:11 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: linux-kernel, linux-fbdev-devel

(cc linux-fbdev-devel)

On Fri, 11 Jul 2008 15:50:18 +0100 Stefano Stabellini <stefano.stabellini@eu.citrix.com> wrote:

> 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)
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-13  5:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-11 14:50 [PATCH] vt: do not update when the console is blanked Stefano Stabellini
2008-07-13  5:11 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox