From: Thomas Zimmermann <tzimmermann@suse.de>
To: gregkh@linuxfoundation.org, jirislaby@kernel.org, deller@gmx.de,
James.Bottomley@HansenPartnership.com, simona@ffwll.ch
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
linux-fbdev@vger.kernel.org, linux-parisc@vger.kernel.org,
sashiko-reviews@lists.linux.dev,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH v3 7/7] vt: Remove old-style con_blank
Date: Fri, 23 Oct 2026 15:16:17 +0200 [thread overview]
Message-ID: <20261023132448.115747-8-tzimmermann@suse.de> (raw)
In-Reply-To: <20261023132448.115747-1-tzimmermann@suse.de>
All consoles implement the new con_blank plus con_unblank. Remove
the old semantics from con_blank. Always pass a VESA blank mode to
the blank parameter.
v3:
- keep con_blank's mode_switch parameter
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/tty/vt/vt.c | 31 ++++++++-----------------------
1 file changed, 8 insertions(+), 23 deletions(-)
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 82885f357f76..7dbc0072a40a 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -4788,10 +4788,7 @@ void do_blank_screen(int entering_gfx)
if (console_blanked) {
if (blank_state == blank_vesa_wait) {
blank_state = blank_off;
- if (vc->vc_sw->con_unblank)
- vc->vc_sw->con_blank(vc, vesa_blank_mode, 0);
- else
- vc->vc_sw->con_blank(vc, vesa_blank_mode + 1, 0);
+ vc->vc_sw->con_blank(vc, vesa_blank_mode, false);
}
return;
}
@@ -4800,10 +4797,7 @@ void do_blank_screen(int entering_gfx)
if (entering_gfx) {
hide_cursor(vc);
save_screen(vc);
- if (vc->vc_sw->con_unblank)
- vc->vc_sw->con_blank(vc, VESA_NO_BLANKING, 1);
- else
- vc->vc_sw->con_blank(vc, VESA_VSYNC_SUSPEND, 1);
+ vc->vc_sw->con_blank(vc, VESA_NO_BLANKING, true);
console_blanked = fg_console + 1;
blank_state = blank_off;
set_origin(vc);
@@ -4824,12 +4818,9 @@ void do_blank_screen(int entering_gfx)
save_screen(vc);
/* In case we need to reset origin, blanking hook returns 1 */
- if (vc->vc_sw->con_unblank)
- i = vc->vc_sw->con_blank(vc, vesa_off_interval ? VESA_NO_BLANKING :
- vesa_blank_mode, 0);
- else
- i = vc->vc_sw->con_blank(vc, vesa_off_interval ? VESA_VSYNC_SUSPEND :
- (vesa_blank_mode + 1), 0);
+ i = vc->vc_sw->con_blank(vc,
+ vesa_off_interval ? VESA_NO_BLANKING : vesa_blank_mode,
+ false);
console_blanked = fg_console + 1;
if (i)
set_origin(vc);
@@ -4880,15 +4871,9 @@ void do_unblank_screen(int leaving_gfx)
}
console_blanked = 0;
- if (vc->vc_sw->con_unblank) {
- if (vc->vc_sw->con_unblank(vc, leaving_gfx))
- /* Low-level driver cannot restore -> do it ourselves */
- update_screen(vc);
- } else {
- if (vc->vc_sw->con_blank(vc, VESA_NO_BLANKING, leaving_gfx))
- /* Low-level driver cannot restore -> do it ourselves */
- update_screen(vc);
- }
+ if (vc->vc_sw->con_unblank(vc, leaving_gfx))
+ /* Low-level driver cannot restore -> do it ourselves */
+ update_screen(vc);
if (console_blank_hook)
console_blank_hook(0);
set_palette(vc);
--
2.56.0
next prev parent reply other threads:[~2026-10-23 13:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 13:16 [PATCH v3 0/7] vt: Simplify console-blanking interface Thomas Zimmermann
2026-10-23 13:16 ` [PATCH v3 1/7] vt: Add con_unblank callback to struct consw Thomas Zimmermann
2026-10-23 13:16 ` [PATCH v3 2/7] dummycon: Implement struct consw.con_unblank Thomas Zimmermann
2026-10-23 13:16 ` [PATCH v3 3/7] fbcon: " Thomas Zimmermann
2026-10-23 13:16 ` [PATCH v3 4/7] newport_con: " Thomas Zimmermann
2026-10-23 13:16 ` [PATCH v3 5/7] sticon: " Thomas Zimmermann
2026-10-23 13:16 ` [PATCH v3 6/7] vgacon: " Thomas Zimmermann
2026-10-23 13:16 ` Thomas Zimmermann [this message]
2026-10-23 13:37 ` [PATCH v3 7/7] vt: Remove old-style con_blank Greg KH
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=20261023132448.115747-8-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=James.Bottomley@HansenPartnership.com \
--cc=deller@gmx.de \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=simona@ffwll.ch \
/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
all inboxes | Powered by JetHome®