summaryrefslogtreecommitdiffstats
path: root/drivers/tty/vt
diff options
context:
space:
mode:
authorJiri Slaby (SUSE) <jirislaby@kernel.org>2024-01-22 12:03:47 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-28 03:08:54 +0100
commit15d0fff7d688b9b2a975a17308e4d7c6be75aa8f (patch)
tree4d4dbc67aefa69ac2b36e9bc00e0188b407a80c0 /drivers/tty/vt
parenttty: vt: define a common enum for VESA blanking constants (diff)
downloadlinux-15d0fff7d688b9b2a975a17308e4d7c6be75aa8f.tar.xz
linux-15d0fff7d688b9b2a975a17308e4d7c6be75aa8f.zip
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>
Diffstat (limited to 'drivers/tty/vt')
-rw-r--r--drivers/tty/vt/vt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 13be125a06aa..0d5d7b5074a4 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -4320,7 +4320,7 @@ static int set_vesa_blanking(u8 __user *mode_user)
return -EFAULT;
console_lock();
- vesa_blank_mode = (mode < 4) ? mode : 0;
+ vesa_blank_mode = (mode < 4) ? mode : VESA_NO_BLANKING;
console_unlock();
return 0;
@@ -4347,7 +4347,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, VESA_VSYNC_SUSPEND, 1);
console_blanked = fg_console + 1;
blank_state = blank_off;
set_origin(vc);
@@ -4368,7 +4368,8 @@ void do_blank_screen(int entering_gfx)
save_screen(vc);
/* In case we need to reset origin, blanking hook returns 1 */
- i = vc->vc_sw->con_blank(vc, vesa_off_interval ? 1 : (vesa_blank_mode + 1), 0);
+ i = vc->vc_sw->con_blank(vc, vesa_off_interval ? VESA_VSYNC_SUSPEND :
+ (vesa_blank_mode + 1), 0);
console_blanked = fg_console + 1;
if (i)
set_origin(vc);
@@ -4419,7 +4420,7 @@ void do_unblank_screen(int leaving_gfx)
}
console_blanked = 0;
- if (vc->vc_sw->con_blank(vc, 0, leaving_gfx))
+ if (vc->vc_sw->con_blank(vc, VESA_NO_BLANKING, leaving_gfx))
/* Low-level driver cannot restore -> do it ourselves */
update_screen(vc);
if (console_blank_hook)