From: Yu Peng <pengyu@kylinos.cn>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Helge Deller <deller@gmx.de>
Cc: Jiri Slaby <jirislaby@kernel.org>,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, Yu Peng <pengyu@kylinos.cn>
Subject: [PATCH] vgacon: Update CRTC start address when turning scrollback off
Date: Tue, 24 Nov 2026 10:49:33 +0800 [thread overview]
Message-ID: <20261124024933.306103-1-pengyu@kylinos.cn> (raw)
Commit 174657478cd8 ("vgacon: inline vc_scrolldelta_helper() into
vgacon_scrolldelta()") moved the early return for !lines into
vgacon_scrolldelta(), skipping vga_set_mem_top(c). This leaves the VGA
CRTC start address stuck at the old scrollback offset after
vgacon_restore_screen().
Call vga_set_mem_top(c) before returning when !lines.
Fixes: 174657478cd8 ("vgacon: inline vc_scrolldelta_helper() into vgacon_scrolldelta()")
Assisted-by: LLM
Signed-off-by: Yu Peng <pengyu@kylinos.cn>
---
drivers/video/console/vgacon.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index 09f7c376b4689..a6b0223ca596d 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -147,6 +147,7 @@ static void vgacon_scrolldelta(struct vc_data *c, int lines)
/* Turn scrollback off */
if (!lines) {
c->vc_visible_origin = c->vc_origin;
+ vga_set_mem_top(c);
return;
}
--
2.43.0
next reply other threads:[~2026-11-24 2:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 2:49 Yu Peng [this message]
2026-11-24 21:42 ` [PATCH] vgacon: Update CRTC start address when turning scrollback off Helge Deller
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=20261124024933.306103-1-pengyu@kylinos.cn \
--to=pengyu@kylinos.cn \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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