mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] vt: Simplify console-blanking interface
@ 2026-10-12  9:27 Thomas Zimmermann
  2026-10-12  9:27 ` [PATCH 1/2] vt: Use boolean as parameter to do_blank_screen() and do_unblank_screen() Thomas Zimmermann
  2026-10-12  9:27 ` [PATCH 2/2] vt: Distinguish between blanking and VESA blank mode in con_blank Thomas Zimmermann
  0 siblings, 2 replies; 9+ messages in thread
From: Thomas Zimmermann @ 2026-10-12  9:27 UTC (permalink / raw)
  To: gregkh, jirislaby, deller, James.Bottomley, simona
  Cc: linux-kernel, linux-serial, linux-fbdev, linux-parisc,
	sashiko-reviews, Thomas Zimmermann

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-10-12 16:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-12  9:27 [PATCH 0/2] vt: Simplify console-blanking interface Thomas Zimmermann
2026-10-12  9:27 ` [PATCH 1/2] vt: Use boolean as parameter to do_blank_screen() and do_unblank_screen() Thomas Zimmermann
2026-10-12 11:30   ` Greg KH
2026-10-12 12:28     ` Thomas Zimmermann
2026-10-12 12:41       ` Thomas Zimmermann
2026-10-12 16:13         ` Greg KH
2026-10-12  9:27 ` [PATCH 2/2] vt: Distinguish between blanking and VESA blank mode in con_blank Thomas Zimmermann
2026-10-12 11:29   ` Greg KH
2026-10-12 12:08     ` Thomas Zimmermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®