Thread (9 messages) 9 messages, 2 authors, 11h ago

[PATCH 0/2] vt: Simplify console-blanking interface

flat view
HOTtoday

From: Thomas Zimmermann <tzimmermann@suse.de>
Date: 2026-10-12 09:41:20
Also in: linux-serial, lkml, sashiko-reviews

The vt subsystem calls con_blank with what appears to be non-sensical
value. This is because the values and the type of the blank argument
do not match: it mixes up console blank state and monitor DPMS levels
for powersaving. The implmentations of con_blank in various consoles
suffer from the same problem. Update con_blank to a clearer interface.
Also update the consoles.

Patch 1 does a bit of preparation. It converts a boolean parameter
from int to bool, so that its meaning is clearer.

Patch 2 updates con_blank. The callback's blank parameter now controls
blanking in general. The new blank_mode parameter controls the monitor
status and related powersaving.

Tested with vgacon on a SiS 6202 VGA and with fbcon on a Matrox G200
VGA device. The latter also ran fbcon via DRM fbdev emulation. Its easy
to test this with setterm, like this

  setterm --blank force                        # blank
  setterm --blank poke                         # unblank
  setterm --blank force --powersave powerdown  # blank and turn off monitor

Blanking and unblanking still works in all tested cases.

Thomas Zimmermann (2):
  vt: Use boolean as parameter to do_blank_screen() and
    do_unblank_screen()
  vt: Distinguish between blanking and VESA blank mode in con_blank

 drivers/tty/vt/vt.c                 | 25 ++++++++--------
 drivers/tty/vt/vt_ioctl.c           | 12 ++++----
 drivers/video/console/dummycon.c    |  4 +--
 drivers/video/console/newport_con.c |  4 +--
 drivers/video/console/sticon.c      |  4 +--
 drivers/video/console/vgacon.c      | 44 +++++++++++++++--------------
 drivers/video/fbdev/core/fbcon.c    | 23 +++++++--------
 include/linux/console.h             |  9 ++++--
 include/linux/vt_kern.h             |  5 ++--
 9 files changed, 69 insertions(+), 61 deletions(-)


base-commit: b0bd9fb9e92aae2a653efa1d0407daa2aabe99d0
-- 
2.55.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help