mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: gregkh@linuxfoundation.org, jirislaby@kernel.org, deller@gmx.de,
	James.Bottomley@HansenPartnership.com, simona@ffwll.ch
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-fbdev@vger.kernel.org, linux-parisc@vger.kernel.org,
	sashiko-reviews@lists.linux.dev,
	Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH v3 5/7] sticon: Implement struct consw.con_unblank
Date: Fri, 23 Oct 2026 15:16:15 +0200	[thread overview]
Message-ID: <20261023132448.115747-6-tzimmermann@suse.de> (raw)
In-Reply-To: <20261023132448.115747-1-tzimmermann@suse.de>

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@suse.de>
---
 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


  parent reply	other threads:[~2026-10-23 13:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-23 13:16 [PATCH v3 0/7] vt: Simplify console-blanking interface Thomas Zimmermann
2026-10-23 13:16 ` [PATCH v3 1/7] vt: Add con_unblank callback to struct consw Thomas Zimmermann
2026-10-23 13:16 ` [PATCH v3 2/7] dummycon: Implement struct consw.con_unblank Thomas Zimmermann
2026-10-23 13:16 ` [PATCH v3 3/7] fbcon: " Thomas Zimmermann
2026-10-23 13:16 ` [PATCH v3 4/7] newport_con: " Thomas Zimmermann
2026-10-23 13:16 ` Thomas Zimmermann [this message]
2026-10-23 13:16 ` [PATCH v3 6/7] vgacon: " Thomas Zimmermann
2026-10-23 13:16 ` [PATCH v3 7/7] vt: Remove old-style con_blank Thomas Zimmermann
2026-10-23 13:37   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261023132448.115747-6-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=deller@gmx.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=simona@ffwll.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®