Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!manuel.anu.edu.au!munnari.oz.au!news.hawaii.edu!ames!agate!dog.ee.lbl.gov!news!nosc!crash!fpm From: fpm@crash.cts.com (Frank Maclachlan) Subject: Speedup for 386BSD 0.1 pccons display (w/ patch) Organization: CTS Network Services (crash, ctsnet), El Cajon, CA Date: 11 Nov 92 14:44:34 PST Message-ID: <1992Nov11.144434.19076@crash> Summary: Roughly doubles scrolling speed Keywords: 386BSD pccons patch Lines: 33 The 386bsd 0.1 console display driver, '/sys/i386/isa/pccons.c', uses bcopyb() to block move screen memory when scrolling up. This is inefficient on machines w/ a 16 bit or greater data path to the screen memory. I changed the bcopyb() call to bcopy() and realized a 2x speedup when displaying scrolling text w/ a 16 bit VGA card. The following diff is against the original (virgin) 386bsd 0.1 /sys/i386/isa/pccons.c file: *** pccons.c.ORIG Tue Aug 11 17:08:53 1992 --- pccons.c Wed Nov 11 15:06:34 1992 *************** *** 791,797 **** } if (sc && crtat >= Crtat+vs.ncol*vs.nrow) { /* scroll check */ if (openf) do (void)sgetc(1); while (scroll); ! bcopyb(Crtat+vs.ncol, Crtat, vs.ncol*(vs.nrow-1)*CHR); fillw ((at << 8) + ' ', Crtat + vs.ncol*(vs.nrow-1), vs.ncol); crtat -= vs.ncol; --- 791,797 ---- } if (sc && crtat >= Crtat+vs.ncol*vs.nrow) { /* scroll check */ if (openf) do (void)sgetc(1); while (scroll); ! bcopy(Crtat+vs.ncol, Crtat, vs.ncol*(vs.nrow-1)*CHR); fillw ((at << 8) + ' ', Crtat + vs.ncol*(vs.nrow-1), vs.ncol); crtat -= vs.ncol; -- UUCP: {hplabs!hp-sdd ucsd nosc}!crash!fpm ARPA: crash!fpm@nosc.mil INET: fpm@crash.cts.com