Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Tested-by: Helge Deller <deller@gmx.de> # parisc STI console
Link: https://lore.kernel.org/r/20240122110401.7289-32-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
735a5194 8d5cc8ee

+1 -2
+1 -1
drivers/tty/vt/vt.c
··· 4347 4347 if (entering_gfx) { 4348 4348 hide_cursor(vc); 4349 4349 save_screen(vc); 4350 - vc->vc_sw->con_blank(vc, -1, 1); 4350 + vc->vc_sw->con_blank(vc, 1, 1); 4351 4351 console_blanked = fg_console + 1; 4352 4352 blank_state = blank_off; 4353 4353 set_origin(vc);
-1
drivers/video/console/vgacon.c
··· 814 814 /* Tell console.c that it has to restore the screen itself */ 815 815 return 1; 816 816 case 1: /* Normal blanking */ 817 - case -1: /* Obsolete */ 818 817 if (!mode_switch && vga_video_type == VIDEO_TYPE_VGAC) { 819 818 vga_pal_blank(&vgastate); 820 819 vga_palette_blanked = true;