diff options
| author | Thomas Zimmermann <tzimmermann@suse.de> | 2026-10-23 15:16:11 +0200 |
|---|---|---|
| committer | Helge Deller <deller@gmx.de> | 2026-10-25 08:36:07 +0100 |
| commit | dc2f8fbbe8f1cc657b814ddc3e854bdd8dbbc63f (patch) | |
| tree | 49051ae504f96d551037583f75fe803dcc3bc134 /include/linux | |
| parent | 21a7f44fd0765fcc5194130b28767786eba1d1e7 (diff) | |
| download | linux-dc2f8fbbe8f1cc657b814ddc3e854bdd8dbbc63f.tar.gz linux-dc2f8fbbe8f1cc657b814ddc3e854bdd8dbbc63f.zip | |
vt: Add con_unblank callback to struct consw
Add struct consw.con_unblank as inverse operation to con_blank.
If implemented invoke con_blank to turn the console from blanked to
unblanked. Also update the semantics of con_blank in this case: The
blank parameter of con_blank receives a VESA blank mode from enum
vesa_blank_mode instead of the hybrid unblank/blank values it has
used so far.
With con_unblank not implemented, invoke con_blank for blanking and
unblanking as before.
The old semantics of con_blank will be removed when all consoles
implement con_unblank.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/console.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/console.h b/include/linux/console.h index df23148987ee..cb8be9ea4a76 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -55,9 +55,12 @@ enum vc_intensity; * Invoked by csi_M and printing to the console. * @con_switch: notifier about the console switch; it is supposed to return * true if a redraw is needed. - * @con_blank: blank/unblank the console. The target mode is passed in @blank. - * @mode_switch is set if changing from/to text/graphics. The hook - * is supposed to return true if a redraw is needed. + * @con_blank: blank the console. The preferred VESA blank mode is passed in + * @blank. @mode_switch is set if changing from/to text/graphics. + * The hook is supposed to return true if a redraw is needed. + * @con_unblank: unblank the console. The hook is supposed to return true if + * a redraw is needed. @mode_switch is set if changing from/to + * text/graphics. * @con_font_set: set console @vc font to @font with height @vpitch. @flags can * be %KD_FONT_FLAG_DONT_RECALC. (optional) * @con_font_get: fetch the current font on @vc of height @vpitch into @font. @@ -99,6 +102,7 @@ struct consw { bool (*con_switch)(struct vc_data *vc); bool (*con_blank)(struct vc_data *vc, enum vesa_blank_mode blank, bool mode_switch); + bool (*con_unblank)(struct vc_data *vc, bool mode_switch); int (*con_font_set)(struct vc_data *vc, const struct console_font *font, unsigned int vpitch, unsigned int flags); |
