All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miao Wang via B4 Relay <devnull+shankerwangmiao.gmail.com@kernel.org>
To: Binbin Zhou <zhoubinbin@loongson.cn>,
	 Chong Qiao <qiaochong@loongson.cn>, Lee Jones <lee@kernel.org>,
	 Huacai Chen <chenhuacai@kernel.org>,
	Corey Minyard <corey@minyard.net>,
	 Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>
Cc: Xi Ruoyao <xry111@xry111.site>, WANG Xuerui <kernel@xen0n.name>,
	 Yinbo Zhu <zhuyinbo@loongson.cn>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	 mfd@lists.linux.dev, linux-kernel@vger.kernel.org,
	 linux-gpio@vger.kernel.org,
	openipmi-developer@lists.sourceforge.net,
	 Miao Wang <shankerwangmiao@gmail.com>
Subject: [PATCH RFC v3 3/7] mfd: ls2kbmc: Redraw using exported functions
Date: Fri, 10 Jul 2026 01:24:19 +0800	[thread overview]
Message-ID: <20260710-ls2kbmc-mod-v3-3-ef718636e78e@gmail.com> (raw)
In-Reply-To: <20260710-ls2kbmc-mod-v3-0-ef718636e78e@gmail.com>

From: Miao Wang <shankerwangmiao@gmail.com>

Use update_screen, i.e. redraw_screen() to trigger the redraw of the
current vt.

Fixes: d952bba3fbb5 ("mfd: ls2kbmc: Add Loongson-2K BMC reset function support")
Signed-off-by: Miao Wang <shankerwangmiao@gmail.com>
---
 drivers/mfd/ls2k-bmc-core.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/ls2k-bmc-core.c b/drivers/mfd/ls2k-bmc-core.c
index b02e4955e9b04f517892a18b2ef103b5e481a238..a5465c42a77b8b7b81e3ad787d6036679c6ba6df 100644
--- a/drivers/mfd/ls2k-bmc-core.c
+++ b/drivers/mfd/ls2k-bmc-core.c
@@ -25,6 +25,7 @@
 #include <linux/platform_device.h>
 #include <linux/stop_machine.h>
 #include <linux/vt_kern.h>
+#include <linux/console.h>
 
 /* LS2K BMC resources */
 #define LS2K_DISPLAY_RES_START		(SZ_16M + SZ_2M)
@@ -310,7 +311,9 @@ static void ls2k_bmc_events_fn(struct work_struct *work)
 
 	if (IS_ENABLED(CONFIG_VT)) {
 		/* Re-push the display due to previous PCI-E loss. */
-		set_console(vt_move_to_console(MAX_NR_CONSOLES - 1, 1));
+		console_lock();
+		update_screen(vc_cons[fg_console].d);
+		console_unlock();
 	}
 }
 

-- 
2.49.0



WARNING: multiple messages have this Message-ID (diff)
From: Miao Wang <shankerwangmiao@gmail.com>
To: Binbin Zhou <zhoubinbin@loongson.cn>,
	 Chong Qiao <qiaochong@loongson.cn>, Lee Jones <lee@kernel.org>,
	 Huacai Chen <chenhuacai@kernel.org>,
	Corey Minyard <corey@minyard.net>,
	 Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>
Cc: Xi Ruoyao <xry111@xry111.site>, WANG Xuerui <kernel@xen0n.name>,
	 Yinbo Zhu <zhuyinbo@loongson.cn>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	 mfd@lists.linux.dev, linux-kernel@vger.kernel.org,
	 linux-gpio@vger.kernel.org,
	openipmi-developer@lists.sourceforge.net,
	 Miao Wang <shankerwangmiao@gmail.com>
Subject: [PATCH RFC v3 3/7] mfd: ls2kbmc: Redraw using exported functions
Date: Fri, 10 Jul 2026 01:24:19 +0800	[thread overview]
Message-ID: <20260710-ls2kbmc-mod-v3-3-ef718636e78e@gmail.com> (raw)
In-Reply-To: <20260710-ls2kbmc-mod-v3-0-ef718636e78e@gmail.com>

Use update_screen, i.e. redraw_screen() to trigger the redraw of the
current vt.

Fixes: d952bba3fbb5 ("mfd: ls2kbmc: Add Loongson-2K BMC reset function support")
Signed-off-by: Miao Wang <shankerwangmiao@gmail.com>
---
 drivers/mfd/ls2k-bmc-core.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/ls2k-bmc-core.c b/drivers/mfd/ls2k-bmc-core.c
index b02e4955e9b04f517892a18b2ef103b5e481a238..a5465c42a77b8b7b81e3ad787d6036679c6ba6df 100644
--- a/drivers/mfd/ls2k-bmc-core.c
+++ b/drivers/mfd/ls2k-bmc-core.c
@@ -25,6 +25,7 @@
 #include <linux/platform_device.h>
 #include <linux/stop_machine.h>
 #include <linux/vt_kern.h>
+#include <linux/console.h>
 
 /* LS2K BMC resources */
 #define LS2K_DISPLAY_RES_START		(SZ_16M + SZ_2M)
@@ -310,7 +311,9 @@ static void ls2k_bmc_events_fn(struct work_struct *work)
 
 	if (IS_ENABLED(CONFIG_VT)) {
 		/* Re-push the display due to previous PCI-E loss. */
-		set_console(vt_move_to_console(MAX_NR_CONSOLES - 1, 1));
+		console_lock();
+		update_screen(vc_cons[fg_console].d);
+		console_unlock();
 	}
 }
 

-- 
2.49.0


  parent reply	other threads:[~2026-07-09 17:24 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09 17:24 [PATCH RFC v3 0/7] mfd: ls2kbmc: multiple fixes for this driver Miao Wang via B4 Relay
2026-07-09 17:24 ` Miao Wang
2026-07-09 17:24 ` [PATCH RFC v3 1/7] mfd: ls2kbmc: Make a copy when parsing mode string Miao Wang via B4 Relay
2026-07-09 17:24   ` Miao Wang
2026-07-23 11:29   ` Lee Jones
2026-07-23 12:02     ` Miao Wang
2026-07-23 12:14       ` Miao Wang
2026-07-23 13:10         ` Lee Jones
2026-07-09 17:24 ` [PATCH RFC v3 2/7] mfd: ls2kbmc: Sanity check for the connected pci port Miao Wang via B4 Relay
2026-07-09 17:24   ` Miao Wang
2026-07-09 17:24 ` Miao Wang via B4 Relay [this message]
2026-07-09 17:24   ` [PATCH RFC v3 3/7] mfd: ls2kbmc: Redraw using exported functions Miao Wang
2026-07-09 17:24 ` [PATCH RFC v3 4/7] mfd: ls2kbmc: Cancel the work queue on removal Miao Wang via B4 Relay
2026-07-09 17:24   ` Miao Wang
2026-07-09 17:24 ` [PATCH RFC v3 5/7] ipmi: ls2k: Relax the dependency to its mfd driver Miao Wang via B4 Relay
2026-07-09 17:24   ` Miao Wang
2026-07-09 17:24 ` [PATCH RFC v3 6/7] mfd: ls2kbmc: Able to be compiled as a module Miao Wang via B4 Relay
2026-07-09 17:24   ` Miao Wang
2026-07-09 17:24 ` [PATCH RFC v3 7/7] mfd: ls2kbmc: Capture the reset event of BMC through GPIO Miao Wang via B4 Relay
2026-07-09 17:24   ` Miao Wang

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=20260710-ls2kbmc-mod-v3-3-ef718636e78e@gmail.com \
    --to=devnull+shankerwangmiao.gmail.com@kernel.org \
    --cc=brgl@kernel.org \
    --cc=chenhuacai@kernel.org \
    --cc=corey@minyard.net \
    --cc=jiaxun.yang@flygoat.com \
    --cc=kernel@xen0n.name \
    --cc=lee@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=openipmi-developer@lists.sourceforge.net \
    --cc=qiaochong@loongson.cn \
    --cc=shankerwangmiao@gmail.com \
    --cc=xry111@xry111.site \
    --cc=zhoubinbin@loongson.cn \
    --cc=zhuyinbo@loongson.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.