tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

patch: jump scrolling text consoles



Hi,

as nouveau doesn't work on my Thinkpad W701 with its NVIDIA G92 
(see port-amd64/58305), I'm running it for non-test uses with 

menu=Boot 10 nonouveautest:vesa 0x165;rndseed /etc/entropy-file;userconf disable nouveau*;boot netbsd10.test

where netbsd10.test has the patch below to make the console scroll
half the screen (instead of one line) when reaching bottom.

The reason is that until a certain point in the boot process, scrolling
is very slow (about 1-2 seconds per line).

The same applies to a netbsd 11 kernel; the patch applies, too.

I wonder if there's interest to wrap this in an option (as in options(4))
and commit it?

Regards,
	-is


Index: dev/wscons/wsemul_dumb.c
===================================================================
RCS file: /cvsroot/src/sys/dev/wscons/wsemul_dumb.c,v
retrieving revision 1.18
diff -u -r1.18 wsemul_dumb.c
--- dev/wscons/wsemul_dumb.c	3 Sep 2018 16:29:34 -0000	1.18
+++ dev/wscons/wsemul_dumb.c	7 Feb 2026 16:35:10 -0000
@@ -188,7 +188,7 @@
 				edp->crow++;
 				break;
 			}
-			n = 1;		/* number of lines to scroll */
+			n = edp->nrows/2;	/* number of lines to scroll */
 			(*edp->emulops->copyrows)(edp->emulcookie, n, 0,
 			    edp->nrows - n);
 			(*edp->emulops->eraserows)(edp->emulcookie,
Index: dev/wscons/wsemul_vt100.c
===================================================================
RCS file: /cvsroot/src/sys/dev/wscons/wsemul_vt100.c,v
retrieving revision 1.49.4.1
diff -u -r1.49.4.1 wsemul_vt100.c
--- dev/wscons/wsemul_vt100.c	30 Jul 2023 11:47:08 -0000	1.49.4.1
+++ dev/wscons/wsemul_vt100.c	7 Feb 2026 16:35:10 -0000
@@ -375,7 +375,8 @@
 
 	if (ROWS_BELOW(vd) == 0) {
 		/* Bottom of the scroll region. */
-	  	wsemul_vt100_scrollup(vd, 1);
+	  	wsemul_vt100_scrollup(vd, vd->nrows/2);
+		vd->crow=vd->nrows/2;
 	} else {
 		if ((vd->crow+1) < vd->nrows)
 			/* Cursor not at the bottom of the screen. */


Home | Main Index | Thread Index | Old Index