vt: Simplify console-blanking interface
Subsystems (6)
Thomas Zimmermann
maintainerv3 cover vt: Simplify console-blanking interface
Update con_blank from struct consw to use enum vesa_blank_mode according to its intended semantics. Handle unblanking in the separate new callback con_unblank. Update all consoles.
Some background: the vt subsystem calls con_blank with what at first appears to be nonsensical arguments: the blank value and the type of the blank parameter do not match. con_blank mixes up console blank state and monitor DPMS levels for power saving in the same argument. The implementation of con_blank in various consoles suffers from a similar
problem: their interpretation of the given blank value often disagrees with what the value's type suggests.
Patch 1 adds a new helper con_unblank, which handles all unblanking. This allows for changing con_blank to only handle blanking. There's support for both semantics while consoles are being converted.
Patches 2 to 6 implement con_unblank for the individual consoles. With this, con_blank changes to its new semantics. Each console gets a single callback for blanking and a single callback for unblanking.
With all consoles updated, patch 7 removes the old semantics and the mode_switch parameter.
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. It's easy to test this with setterm, like this:
setterm --blank force # blank setterm --blank poke # unblank setterm --powersave powerdown # set VESA DPMS level 3 setterm --blank force # blank and turn off monitor setterm --blank poke # unblank
Blanking and unblanking still works in all tested cases.
Newport and sticon are built-only, due to a lack of test equipment.
Future directions: console blanking helper currently handle switching a console between text and graphics mode. The mode_switch parameter indicates this to the console. As suggested in earlier reviews, a later series might rework the mode switching entirely.
v3:
- avoid possible regressions by adding back mode_switch v2:
- rewrite series with con_unblank (GregKH)
- drop mode_switch from console implementations
Thomas Zimmermann (7):
vt: Add con_unblank callback to struct consw
dummycon: Implement struct consw.con_unblank
fbcon: Implement struct consw.con_unblank
newport_con: Implement struct consw.con_unblank
sticon: Implement struct consw.con_unblank
vgacon: Implement struct consw.con_unblank
vt: Remove old-style con_blank
drivers/tty/vt/vt.c | 11 +++--- drivers/video/console/dummycon.c | 12 +++++++ drivers/video/console/newport_con.c | 24 +++++++------ drivers/video/console/sticon.c | 20 ++++++----- drivers/video/console/vgacon.c | 46 +++++++++++++----------- drivers/video/fbdev/core/fbcon.c | 55 ++++++++++++++++++++--------- include/linux/console.h | 10 ++++-- 7 files changed, 114 insertions(+), 64 deletions(-)
base-commit: 5b9ee97c47574138633a1cb70a32d118b6860a43
Signature · 1 line
2.56.0
Thomas Zimmermann
maintainerPATCH v3 1/7 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.
v3:
- fix typo in commit description (Helge)
- add mode_switch parameter to con_unblank
--- drivers/tty/vt/vt.c | 30 +++++++++++++++++++++++------- include/linux/console.h | 10 +++++++--- 2 files changed, 30 insertions(+), 10 deletions(-)
drivers/tty/vt/vt.c +23 -7
@@ -4788,7 +4788,10 @@ void do_blank_screen(int entering_gfx)if (console_blanked) {if (blank_state == blank_vesa_wait) { blank_state = blank_off; - vc->vc_sw->con_blank (vc, vesa_blank_mode +1 ,0 ); +if (vc->vc_sw->con_unblank) + vc->vc_sw->con_blank (vc, vesa_blank_mode,0 ); +else + vc->vc_sw->con_blank (vc, vesa_blank_mode +1 ,0 ); }return ; }
@@ -4797,7 +4800,10 @@ void do_blank_screen(int entering_gfx)if (entering_gfx) {hide_cursor (vc);save_screen (vc); - vc->vc_sw->con_blank (vc,VESA_VSYNC_SUSPEND ,1 ); +if (vc->vc_sw->con_unblank) + vc->vc_sw->con_blank (vc,VESA_NO_BLANKING ,1 ); +else + vc->vc_sw->con_blank (vc,VESA_VSYNC_SUSPEND ,1 ); console_blanked = fg_console +1 ; blank_state = blank_off;set_origin (vc);
@@ -4818,8 +4824,12 @@ 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 ?VESA_VSYNC_SUSPEND : - (vesa_blank_mode +1 ),0 ); +if (vc->vc_sw->con_unblank) + i = vc->vc_sw->con_blank (vc, vesa_off_interval ?VESA_NO_BLANKING : + vesa_blank_mode,0 ); +else + 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);
@@ -4870,9 +4880,15 @@ void do_unblank_screen(int leaving_gfx) } console_blanked =0 ; -if (vc->vc_sw->con_blank (vc,VESA_NO_BLANKING , leaving_gfx)) -/* Low-level driver cannot restore -> do it ourselves */ -update_screen (vc); +if (vc->vc_sw->con_unblank) { +if (vc->vc_sw->con_unblank (vc, leaving_gfx)) +/* Low-level driver cannot restore -> do it ourselves */ +update_screen (vc); + }else { +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)console_blank_hook (0 );set_palette (vc);
include/linux/console.h +7 -3
@@ -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);
Signature · 1 line
2.56.0
[email protected]
AI reviewRe: [PATCH v3 1/7] vt: Add con_unblank callback to struct consw
Sashiko has reviewed this patch and found no issues.
Quoted 11 lines
Add struct consw.con_unblank as inverse operation to
con_blank.If implemented invoke
con_blankto turn the console from blanked to unblanked. Also update the semantics ofcon_blankin this case: The blank parameter ofcon_blankreceives a VESA blank mode from enumvesa_blank_modeinstead of the hybrid unblank/blank values it has used so far.With
con_unblanknot implemented, invokecon_blankfor blanking and unblanking as before.
Quoted 8 lines
The old semantics of
con_blankwill be removed when all consoles implementcon_unblank.v3:
- fix typo in commit description (Helge)
- addmode_switchparameter tocon_unblankSigned-off-by Thomas Zimmermann <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Thomas Zimmermann
maintainerPATCH v3 2/7 dummycon: Implement struct consw.con_unblank
In reply to Thomas ZimmermannImplement con_unblank from struct consw as a duplicate of con_blank. As dummycon does not do anything, the implementation only returns true or false to trigger a redraw (or not).
--- drivers/video/console/dummycon.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/video/console/dummycon.c +12 -0
@@ -86,6 +86,11 @@ static bool dummycon_blank(struct vc_data *vc, enum vesa_blank_mode blank,return true; } +static bool dummycon_unblank (struct vc_data *vc,bool mode_switch) +{ +return true; +} +static bool dummycon_switch (struct vc_data *vc) {/*
@@ -104,6 +109,12 @@ static bool dummycon_blank(struct vc_data *vc, enum vesa_blank_mode blank, {return false; } + +static bool dummycon_unblank (struct vc_data *vc,bool mode_switch) +{ +return false; +} +static bool dummycon_switch (struct vc_data *vc) {return false;
@@ -155,5 +166,6 @@ const struct consw dummy_con = { .con_scroll = dummycon_scroll, .con_switch = dummycon_switch, .con_blank = dummycon_blank, + .con_unblank = dummycon_unblank, };EXPORT_SYMBOL_GPL (dummy_con);
Signature · 1 line
2.56.0
[email protected]
AI reviewRe: [PATCH v3 2/7] dummycon: Implement struct consw.con_unblank
Sashiko has reviewed this patch and found no issues.
Quoted 5 lines
Implement
con_unblankfrom struct consw as a duplicate ofcon_blank. As dummycon does not do anything, the implementation only returns true or false to trigger a redraw (or not).Signed-off-by Thomas Zimmermann <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Thomas Zimmermann
maintainerPATCH v3 3/7 fbcon: Implement struct consw.con_unblank
In reply to Thomas ZimmermannImplement con_unblank from struct consw with the !blank branches from fbcon_blank(). The new function is called fbcon_unblank(). Remove the duplicated code from fbcon_blank().
Fbcon tracks fbdev blank state in par->blank_state using fbdev's FB_BLANK constants. In fbcon_unblank() the stored value is always FB_BLANK_UNBLANK. In fbcon_blank(), the new blank state is 1 + plus the VESA blank mode given in the parameter blank.
fbcon_blank() now disables the cursor worker unconditionally.
v3:
- take mode_switch from parameter
--- drivers/video/fbdev/core/fbcon.c | 55 ++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 17 deletions(-)
drivers/video/fbdev/core/fbcon.c +38 -17
@@ -2270,32 +2270,52 @@ static bool fbcon_blank(struct vc_data *vc, enum vesa_blank_mode blank,struct fb_info *info =fbcon_info_from_console (vc->vc_num);struct fbcon_par *par = info->fbcon_par; -if (mode_switch) { -struct fb_var_screeninfo var = info->var; +if (mode_switch) + par->graphics = true; - par->graphics =1 ; +if (fbcon_is_active (vc, info)) { +int blank_state =1 + blank;/* convert VESA to FB_BLANK constant */ -if (!blank) { - var.activate =FB_ACTIVATE_NOW |FB_ACTIVATE_FORCE | -FB_ACTIVATE_KD_TEXT ; -fb_set_var (info, &var); - par->graphics =0 ; - par->var = info->var; +if (par->blank_state != blank_state) { + par->blank_state = blank_state; +fbcon_cursor (vc, false); + par->cursor_flash = false; + +if (fb_blank (info, blank_state)) +fbcon_generic_blank (vc, info, true); } } +fbcon_del_cursor_work (info); + +return false; +} + +static bool fbcon_unblank (struct vc_data *vc,bool mode_switch) +{ +struct fb_info *info =fbcon_info_from_console (vc->vc_num); +struct fbcon_par *par = info->fbcon_par; + +if (mode_switch) { +struct fb_var_screeninfo var = info->var; + + var.activate =FB_ACTIVATE_NOW |FB_ACTIVATE_FORCE |FB_ACTIVATE_KD_TEXT ; +fb_set_var (info, &var); + par->graphics = false; + par->var = info->var; + } +if (fbcon_is_active (vc, info)) { -if (par->blank_state != blank) { - par->blank_state = blank; -fbcon_cursor (vc, !blank); - par->cursor_flash = (!blank); +if (par->blank_state !=FB_BLANK_UNBLANK ) { + par->blank_state =FB_BLANK_UNBLANK ; +fbcon_cursor (vc, true); + par->cursor_flash = true; -if (fb_blank (info, blank)) -fbcon_generic_blank (vc, info, blank); +if (fb_blank (info,FB_BLANK_UNBLANK )) +fbcon_generic_blank (vc, info, false); } -if (!blank) -update_screen (vc); +update_screen (vc); }if (mode_switch || !fbcon_is_active (vc, info) || par->blank_state !=FB_BLANK_UNBLANK )
@@ -3145,6 +3165,7 @@ static const struct consw fb_con = { .con_scroll = fbcon_scroll, .con_switch = fbcon_switch, .con_blank = fbcon_blank, + .con_unblank = fbcon_unblank, .con_font_set = fbcon_set_font, .con_font_get = fbcon_get_font, .con_font_default = fbcon_set_def_font,
Signature · 1 line
2.56.0
[email protected]
AI reviewRe: [PATCH v3 3/7] fbcon: Implement struct consw.con_unblank
Sashiko has reviewed this patch and found no issues.
Quoted 9 lines
Implement
con_unblankfrom struct consw with the !blank branches fromfbcon_blank(). The new function is calledfbcon_unblank(). Remove the duplicated code fromfbcon_blank().Fbcon tracks fbdev blank state in
par->blank_stateusing fbdev'sFB_BLANKconstants. Infbcon_unblank()the stored value is alwaysFB_BLANK_UNBLANK. Infbcon_blank(), the new blank state is 1 + plus the VESA blank mode given in the parameter blank.
Quoted 6 lines
fbcon_blank()now disables the cursor worker unconditionally.v3:
- takemode_switchfrom parameterSigned-off-by Thomas Zimmermann <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
Thomas Zimmermann
maintainerPATCH v3 4/7 newport_con: Implement struct consw.con_unblank
In reply to Thomas ZimmermannImplement con_unblank from struct consw with the VESA_NO_BLANKING branch from newport_blank(). Remove that code from the blank helper.
Both helpers, newport_blank() and newport_unbank(), clear or set a single flag in a hardware register. No further VESA DPMS blanking is supported.
--- drivers/video/console/newport_con.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-)
drivers/video/console/newport_con.c +13 -11
@@ -481,17 +481,18 @@ static bool newport_blank(struct vc_data *c, enum vesa_blank_mode blank, {unsigned short treg; -if (blank ==VESA_NO_BLANKING ) { -/* unblank console */ - treg =newport_vc2_get (npregs,VC2_IREG_CONTROL ); -newport_vc2_set (npregs,VC2_IREG_CONTROL , - (treg |VC2_CTRL_EDISP )); - }else { -/* blank console */ - treg =newport_vc2_get (npregs,VC2_IREG_CONTROL ); -newport_vc2_set (npregs,VC2_IREG_CONTROL , - (treg & ~(VC2_CTRL_EDISP ))); - } + treg =newport_vc2_get (npregs,VC2_IREG_CONTROL ); +newport_vc2_set (npregs,VC2_IREG_CONTROL , (treg & ~(VC2_CTRL_EDISP ))); + +return true; +} + +static bool newport_unblank (struct vc_data *c,bool mode_switch) +{ +unsigned short treg; + + treg =newport_vc2_get (npregs,VC2_IREG_CONTROL ); +newport_vc2_set (npregs,VC2_IREG_CONTROL , (treg |VC2_CTRL_EDISP ));return true; }
@@ -666,6 +667,7 @@ const struct consw newport_con = { .con_scroll = newport_scroll, .con_switch = newport_switch, .con_blank = newport_blank, + .con_unblank = newport_unblank, .con_font_set = newport_font_set, .con_font_default = newport_font_default, .con_save_screen = newport_save_screen
Signature · 1 line
2.56.0
[email protected]
AI reviewRe: [PATCH v3 4/7] newport_con: Implement struct consw.con_unblank
Sashiko has reviewed this patch and found no issues.
Quoted 8 lines
Implement
con_unblankfrom struct consw with theVESA_NO_BLANKINGbranch fromnewport_blank(). Remove that code from the blank helper.Both helpers,
newport_blank()andnewport_unbank(), clear or set a single flag in a hardware register. No further VESA DPMS blanking is supported.Signed-off-by Thomas Zimmermann <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
Thomas Zimmermann
maintainerPATCH v3 5/7 sticon: Implement struct consw.con_unblank
In reply to Thomas ZimmermannImplement con_unblank from struct consw. The new function is called sticon_unblank(). Remove the related code from sticon_blank().
There is no display unblanking in sticon: only return true to redraw the console.
v3:
- take mode_switch from parameter
--- drivers/video/console/sticon.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-)
drivers/video/console/sticon.c +12 -8
@@ -302,17 +302,20 @@ static bool sticon_switch(struct vc_data *conp)static bool sticon_blank (struct vc_data *c,enum vesa_blank_mode blank,bool mode_switch) { -if (blank ==VESA_NO_BLANKING ) { +sti_clear (sticon_sti,0 ,0 , c->vc_rows, c->vc_cols,BLANK , font_data[c->vc_num]); +if (mode_switch) - vga_is_gfx =0 ; + vga_is_gfx =1 ; +return true; - } -sti_clear (sticon_sti,0 ,0 , c->vc_rows, c->vc_cols,BLANK , - font_data[c->vc_num]); -if (mode_switch) - vga_is_gfx =1 ; +} -return true; +static bool sticon_unblank (struct vc_data *c,bool mode_switch) +{ +if (mode_switch) + vga_is_gfx =0 ; + +return true; } static u8 sticon_build_attr(struct vc_data *conp, u8 color,
@@ -356,6 +359,7 @@ static const struct consw sti_con = { .con_scroll = sticon_scroll, .con_switch = sticon_switch, .con_blank = sticon_blank, + .con_unblank = sticon_unblank, .con_font_set = sticon_font_set, .con_font_default = sticon_font_default, .con_build_attr = sticon_build_attr,
Signature · 1 line
2.56.0
[email protected]
AI reviewRe: [PATCH v3 5/7] sticon: Implement struct consw.con_unblank
Sashiko has reviewed this patch and found no issues.
Quoted 10 lines
Implement
con_unblankfrom struct consw. The new function is calledsticon_unblank(). Remove the related code fromsticon_blank().There is no display unblanking in sticon: only return true to redraw the console.
v3:
- takemode_switchfrom parameterSigned-off-by Thomas Zimmermann <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
Thomas Zimmermann
maintainerPATCH v3 6/7 vgacon: Implement struct consw.con_unblank
In reply to Thomas ZimmermannImplement con_unblank from struct consw with the VESA_NO_BLANKING case from vgacon_blank(). The new function is called vgacon_unblank(). Remove the duplicated code from vgacon_blank().
v3:
- take mode_switch from parameter
- restore vga_is_gfx setting
--- drivers/video/console/vgacon.c | 46 +++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 20 deletions(-)
drivers/video/console/vgacon.c +26 -20
@@ -778,38 +778,43 @@ static bool vgacon_blank(struct vc_data *c, enum vesa_blank_mode blank, bool mode_switch) {switch (blank) { -case VESA_NO_BLANKING :/* Unblank */ -if (vga_vesa_blanked) { -vga_vesa_unblank (&vgastate); - vga_vesa_blanked =VESA_NO_BLANKING ; - } -if (vga_palette_blanked) { -vga_set_palette (c, color_table); - vga_palette_blanked = false; -return 0 ; - } - vga_is_gfx = false; -/* Tell console.c that it has to restore the screen itself */ -return 1 ; -case VESA_VSYNC_SUSPEND :/* Normal blanking */ +case VESA_NO_BLANKING :/* Normal blanking */ if (!mode_switch && vga_video_type ==VIDEO_TYPE_VGAC ) {vga_pal_blank (&vgastate); vga_palette_blanked = true; -return 0 ; +return false; }vgacon_set_origin (c); -scr_memsetw ((void *) vga_vram_base,BLANK , - c->vc_screenbuf_size); +scr_memsetw ((void *)vga_vram_base,BLANK , c->vc_screenbuf_size);if (mode_switch) vga_is_gfx = true; -return 1 ; +return true;default :/* VESA blanking */ if (vga_video_type ==VIDEO_TYPE_VGAC ) { -vga_vesa_blank (&vgastate, blank -1 ); +vga_vesa_blank (&vgastate, blank); vga_vesa_blanked = blank; } -return 0 ; +return false; + } +} + +static bool vgacon_unblank (struct vc_data *c,bool mode_switch) +{ +if (vga_vesa_blanked) { +vga_vesa_unblank (&vgastate); + vga_vesa_blanked =VESA_NO_BLANKING ; + } + +if (vga_palette_blanked) { +vga_set_palette (c, color_table); + vga_palette_blanked = false; +return false; } + + vga_is_gfx = false; + +/* Tell console.c that it has to restore the screen itself */ +return true; }/*
@@ -1178,6 +1183,7 @@ const struct consw vga_con = { .con_scroll = vgacon_scroll, .con_switch = vgacon_switch, .con_blank = vgacon_blank, + .con_unblank = vgacon_unblank, .con_font_set = vgacon_font_set, .con_font_get = vgacon_font_get, .con_resize = vgacon_resize,
Signature · 1 line
2.56.0
[email protected]
AI reviewRe: [PATCH v3 6/7] vgacon: Implement struct consw.con_unblank
Sashiko has reviewed this patch and found no issues.
Quoted 9 lines
Implement
con_unblankfrom struct consw with theVESA_NO_BLANKINGcase fromvgacon_blank(). The new function is calledvgacon_unblank(). Remove the duplicated code fromvgacon_blank().v3:
- takemode_switchfrom parameter
- restorevga_is_gfxsettingSigned-off-by Thomas Zimmermann <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=6
Thomas Zimmermann
maintainerPATCH v3 7/7 vt: Remove old-style con_blank
In reply to Thomas ZimmermannAll consoles implement the new con_blank plus con_unblank. Remove the old semantics from con_blank. Always pass a VESA blank mode to the blank parameter.
v3:
- keep con_blank's mode_switch parameter
--- drivers/tty/vt/vt.c | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-)
drivers/tty/vt/vt.c +8 -23
@@ -4788,10 +4788,7 @@ void do_blank_screen(int entering_gfx)if (console_blanked) {if (blank_state == blank_vesa_wait) { blank_state = blank_off; -if (vc->vc_sw->con_unblank) - vc->vc_sw->con_blank (vc, vesa_blank_mode,0 ); -else - vc->vc_sw->con_blank (vc, vesa_blank_mode +1 ,0 ); + vc->vc_sw->con_blank (vc, vesa_blank_mode, false); }return ; }
@@ -4800,10 +4797,7 @@ void do_blank_screen(int entering_gfx)if (entering_gfx) {hide_cursor (vc);save_screen (vc); -if (vc->vc_sw->con_unblank) - vc->vc_sw->con_blank (vc,VESA_NO_BLANKING ,1 ); -else - vc->vc_sw->con_blank (vc,VESA_VSYNC_SUSPEND ,1 ); + vc->vc_sw->con_blank (vc,VESA_NO_BLANKING , true); console_blanked = fg_console +1 ; blank_state = blank_off;set_origin (vc);
@@ -4824,12 +4818,9 @@ void do_blank_screen(int entering_gfx)save_screen (vc);/* In case we need to reset origin, blanking hook returns 1 */ -if (vc->vc_sw->con_unblank) - i = vc->vc_sw->con_blank (vc, vesa_off_interval ?VESA_NO_BLANKING : - vesa_blank_mode,0 ); -else - i = vc->vc_sw->con_blank (vc, vesa_off_interval ?VESA_VSYNC_SUSPEND : - (vesa_blank_mode +1 ),0 ); + i = vc->vc_sw->con_blank (vc, + vesa_off_interval ?VESA_NO_BLANKING : vesa_blank_mode, + false); console_blanked = fg_console +1 ;if (i)set_origin (vc);
@@ -4880,15 +4871,9 @@ void do_unblank_screen(int leaving_gfx) } console_blanked =0 ; -if (vc->vc_sw->con_unblank) { -if (vc->vc_sw->con_unblank (vc, leaving_gfx)) -/* Low-level driver cannot restore -> do it ourselves */ -update_screen (vc); - }else { -if (vc->vc_sw->con_blank (vc,VESA_NO_BLANKING , leaving_gfx)) -/* Low-level driver cannot restore -> do it ourselves */ -update_screen (vc); - } +if (vc->vc_sw->con_unblank (vc, leaving_gfx)) +/* Low-level driver cannot restore -> do it ourselves */ +update_screen (vc);if (console_blank_hook)console_blank_hook (0 );set_palette (vc);
Signature · 1 line
2.56.0
[email protected]
AI reviewRe: [PATCH v3 7/7] vt: Remove old-style con_blank
Sashiko has reviewed this patch and found no issues.
Quoted 8 lines
All consoles implement the new
con_blankpluscon_unblank. Remove the old semantics fromcon_blank. Always pass a VESA blank mode to the blank parameter.v3:
- keep con_blank'smode_switchparameterSigned-off-by Thomas Zimmermann <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=7
Greg KH
maintainerRe: [PATCH v3 7/7] vt: Remove old-style con_blank
In reply to Thomas ZimmermannQuoted 6 lines · Thomas Zimmermann
All consoles implement the new
con_blankpluscon_unblank. Remove the old semantics fromcon_blank. Always pass a VESA blank mode to the blank parameter.v3:
- keep con_blank'smode_switchparameter
Shouldn't the "v3:" stuff go below the --- line?
thanks,
greg k-h
Helge Deller
maintainerRe: [PATCH v3 7/7] vt: Remove old-style con_blank
Quoted 9 lines · Greg KH
Quoted 6 lines · Thomas Zimmermann
All consoles implement the new
con_blankpluscon_unblank. Remove the old semantics fromcon_blank. Always pass a VESA blank mode to the blank parameter.v3:
- keep con_blank'smode_switchparameterShouldn't the "v3:" stuff go below the --- line?
Series applied to fbdev git tree.
While at it, I dropped the v3: stuff lines, so no need to resend.
Helge
Thomas Zimmermann
maintainerRe: [PATCH v3 7/7] vt: Remove old-style con_blank
Hi
Am 25.10.26 um 08:48 schrieb Helge Deller:
Quoted 10 lines · Greg KH
Quoted 9 lines · Thomas Zimmermann
Quoted 6 lines
All consoles implement the new
con_blankpluscon_unblank. Remove the old semantics fromcon_blank. Always pass a VESA blank mode to the blank parameter.v3:
- keep con_blank'smode_switchparameterShouldn't the "v3:" stuff go below the --- line?
Force of habit. Putting the change log in the commit description is common for DRM patches.
I'll do better next time.
Quoted 2 lines
Series applied to fbdev git tree.
While at it, I dropped the v3: stuff lines, so no need to resend.
Thanks Helge.
Best regards
Thomas
Quoted 2 lines
Helge
Signature · 6 lines
-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com GF: Stefan Gaiser, Jochen Jaser, Abhinav Puri, (HRB 36809, AG Nürnberg)