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

Configure Feed

Select the types of activity you want to include in your feed.

tty: vt: use VESA blanking constants

There are VESA blanking constants defined in vesa.h. So use them in the
console code instead of constant values.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-parisc@vger.kernel.org
Tested-by: Helge Deller <deller@gmx.de> # parisc STI console
Link: https://lore.kernel.org/r/20240122110401.7289-34-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
15d0fff7 ace4ebf9

+10 -9
+5 -4
drivers/tty/vt/vt.c
··· 4320 4320 return -EFAULT; 4321 4321 4322 4322 console_lock(); 4323 - vesa_blank_mode = (mode < 4) ? mode : 0; 4323 + vesa_blank_mode = (mode < 4) ? mode : VESA_NO_BLANKING; 4324 4324 console_unlock(); 4325 4325 4326 4326 return 0; ··· 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, VESA_VSYNC_SUSPEND, 1); 4351 4351 console_blanked = fg_console + 1; 4352 4352 blank_state = blank_off; 4353 4353 set_origin(vc); ··· 4368 4368 4369 4369 save_screen(vc); 4370 4370 /* In case we need to reset origin, blanking hook returns 1 */ 4371 - i = vc->vc_sw->con_blank(vc, vesa_off_interval ? 1 : (vesa_blank_mode + 1), 0); 4371 + i = vc->vc_sw->con_blank(vc, vesa_off_interval ? VESA_VSYNC_SUSPEND : 4372 + (vesa_blank_mode + 1), 0); 4372 4373 console_blanked = fg_console + 1; 4373 4374 if (i) 4374 4375 set_origin(vc); ··· 4420 4419 } 4421 4420 4422 4421 console_blanked = 0; 4423 - if (vc->vc_sw->con_blank(vc, 0, leaving_gfx)) 4422 + if (vc->vc_sw->con_blank(vc, VESA_NO_BLANKING, leaving_gfx)) 4424 4423 /* Low-level driver cannot restore -> do it ourselves */ 4425 4424 update_screen(vc); 4426 4425 if (console_blank_hook)
+1 -1
drivers/video/console/newport_con.c
··· 480 480 { 481 481 unsigned short treg; 482 482 483 - if (blank == 0) { 483 + if (blank == VESA_NO_BLANKING) { 484 484 /* unblank console */ 485 485 treg = newport_vc2_get(npregs, VC2_IREG_CONTROL); 486 486 newport_vc2_set(npregs, VC2_IREG_CONTROL,
+1 -1
drivers/video/console/sticon.c
··· 300 300 301 301 static int sticon_blank(struct vc_data *c, int blank, int mode_switch) 302 302 { 303 - if (blank == 0) { 303 + if (blank == VESA_NO_BLANKING) { 304 304 if (mode_switch) 305 305 vga_is_gfx = 0; 306 306 return 1;
+3 -3
drivers/video/console/vgacon.c
··· 800 800 static int vgacon_blank(struct vc_data *c, int blank, int mode_switch) 801 801 { 802 802 switch (blank) { 803 - case 0: /* Unblank */ 803 + case VESA_NO_BLANKING: /* Unblank */ 804 804 if (vga_vesa_blanked) { 805 805 vga_vesa_unblank(&vgastate); 806 - vga_vesa_blanked = 0; 806 + vga_vesa_blanked = VESA_NO_BLANKING; 807 807 } 808 808 if (vga_palette_blanked) { 809 809 vga_set_palette(c, color_table); ··· 813 813 vga_is_gfx = false; 814 814 /* Tell console.c that it has to restore the screen itself */ 815 815 return 1; 816 - case 1: /* Normal blanking */ 816 + case VESA_VSYNC_SUSPEND: /* Normal blanking */ 817 817 if (!mode_switch && vga_video_type == VIDEO_TYPE_VGAC) { 818 818 vga_pal_blank(&vgastate); 819 819 vga_palette_blanked = true;