[PATCH] vt: do not update when the console is blanked - Kernel

This is a discussion on [PATCH] vt: do not update when the console is blanked - Kernel ; 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 ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: [PATCH] vt: do not update when the console is blanked

  1. [PATCH] vt: do not update when the console is blanked

    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)

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: [PATCH] vt: do not update when the console is blanked

    (cc linux-fbdev-devel)

    On Fri, 11 Jul 2008 15:50:18 +0100 Stefano Stabellini 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)
    >


    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread