Re: [PATCH] vgacon: Update CRTC start address when turning scrollback off
From: Helge Deller
Date: Tue Nov 24 2026 - 16:43:01 EST
On 11/24/26 03:49, Yu Peng wrote:
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@xxxxxxxxxx>
---
drivers/video/console/vgacon.c | 1 +
1 file changed, 1 insertion(+)
applied to fbdev git tree.
Thanks!
Helge
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;
}