[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <nycvar.YSQ.7.76.1902251314490.1971@knanqh.ubzr>
Date: Mon, 25 Feb 2019 13:29:12 -0500 (EST)
From: Nicolas Pitre <nicolas.pitre@...aro.org>
To: Yifeng Li <tomli@...li.me>
cc: linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>,
Adam Borowski <kilobyte@...band.pl>,
Mikulas Patocka <mpatocka@...hat.com>,
Alexander Potapenko <glider@...gle.com>,
Mike Frysinger <vapier@...omium.org>,
Daniel Vetter <daniel.vetter@...ll.ch>
Subject: Re: [RFC 1/1] tty: vt.c: Fix TIOCL_BLANKSCREEN VT console blanking
if blankinterval == 0
On Tue, 26 Feb 2019, Yifeng Li wrote:
> In vt.c, "blank_state" will be initialized to "blank_normal_wait" in
> con_init() if AND ONLY IF ("blankinterval" > 0). If "blankinterval" is 0,
> "blank_state" will be "blank_off" (== 0), and a call to do_blank_screen()
> will always abort. Even if a forced blanking is required from the user by
> calling TIOCL_BLANKSCREEN, the console won't be blanked.
>
> In this commit, we introduce a 4th "blank_state" - "blank_normal_notimer",
> it indicates the console can be blanked, but not automatically by a timer.
> Then, we made a change to "con_init()" - if (blankinterval == 0),
> "blank_state" will be set to "blank_normal_notimer" (we have similar
> changes to "do_unblank_screen()" and "poke_blanked_console()"). Finally,
> we change do_blank_screen() - now it will return if "blank_state" is
> neither "blank_normal_wait" nor "blank_normal_notimer", thus allowing
> the console to be blanked even if there's no timed autoblanking.
>
> Signed-off-by: Yifeng Li <tomli@...li.me>
Wouldn't this problem be fixed simply by the following:
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 9646ff63e7..41b17c4b5a 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -4151,8 +4151,6 @@ void do_blank_screen(int entering_gfx)
return;
}
- if (blank_state != blank_normal_wait)
- return;
blank_state = blank_off;
/* don't blank graphics */
I just can't find a logical reason for that conditional return.
Nicolas
Powered by blists - more mailing lists