[PATCH v3 5/7] sticon: Implement struct consw.con_unblank

From: Thomas Zimmermann

Date: Fri Oct 23 2026 - 09:31:12 EST


Implement 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

Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx>
---
drivers/video/console/sticon.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c
index 6f58e6a9e76a..d1b5e1e5594d 100644
--- a/drivers/video/console/sticon.c
+++ b/drivers/video/console/sticon.c
@@ -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,
--
2.56.0