[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240118075756.10541-31-jirislaby@kernel.org>
Date: Thu, 18 Jan 2024 08:57:41 +0100
From: "Jiri Slaby (SUSE)" <jirislaby@...nel.org>
To: gregkh@...uxfoundation.org
Cc: linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org,
"Jiri Slaby (SUSE)" <jirislaby@...nel.org>,
Helge Deller <deller@....de>,
linux-fbdev@...r.kernel.org,
dri-devel@...ts.freedesktop.org
Subject: [PATCH 30/45] tty: vt: stop using -1 for blank mode in consw::con_blank()
-1 is the same as VESA_VSYNC_SUSPEND in all con_blank() implementations.
So we can remove this special case from vgacon now too.
Despite con_blank() of fbcon looks complicated, the "if
(!fbcon_is_inactive(vc, info))" branch is not taken as we set
"ops->graphics = 1;" few lines above. So what matters there (as in all
other blank implementations except vgacon) is if 'blank' is zero or not.
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@...nel.org>
Cc: Helge Deller <deller@....de>
Cc: linux-fbdev@...r.kernel.org
Cc: dri-devel@...ts.freedesktop.org
---
drivers/tty/vt/vt.c | 2 +-
drivers/video/console/vgacon.c | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 88d7b48871fb..279f802aa222 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -4361,7 +4361,7 @@ void do_blank_screen(int entering_gfx)
if (entering_gfx) {
hide_cursor(vc);
save_screen(vc);
- vc->vc_sw->con_blank(vc, -1, 1);
+ vc->vc_sw->con_blank(vc, 1, 1);
console_blanked = fg_console + 1;
blank_state = blank_off;
set_origin(vc);
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index e303098aabab..5025ab501f02 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -814,7 +814,6 @@ static int vgacon_blank(struct vc_data *c, int blank, int mode_switch)
/* Tell console.c that it has to restore the screen itself */
return 1;
case 1: /* Normal blanking */
- case -1: /* Obsolete */
if (!mode_switch && vga_video_type == VIDEO_TYPE_VGAC) {
vga_pal_blank(&vgastate);
vga_palette_blanked = true;
--
2.43.0
Powered by blists - more mailing lists