Re: __set_origin in vga.c and screen flickering

Paul Gortmaker (gpg109@rsphy6.anu.edu.au)
Fri, 24 May 1996 16:07:43 +1000 (EST)


- From Ingo Molnar (mingo@teto.sch.bme.hu)
Sat, 18 May 1996 22:48:29 +0100 (GMT+0100)

> If i understand it right, Linux does console scrolling by setting the
> "origin" of the visible screen in the VGA memory. We avoid to copy the
> whole screen with this solution. But very rarely the screen "flickers"
> as if it got out of sync. If i remember right, the problem is the following
> code in vga.c:
>
> outb_p(12, video_port_reg);
> outb_p(offset >> 8, video_port_val);
> outb_p(13, video_port_reg);
> outb_p(offset, video_port_val);
>
> if the videocard updates the text screen just after the second or third
> outb_p(), then the "origin" of the screen is temporarily false, and we
> have some stray textscreen, which is a mixture of existing console
> images. This lasts till the next screen-refresh, but it's still annoying :)

True, it does look a bit clunky. You should be able to reduce the window
of opportunity by simply changing the outb_p to simple outb calls.
Assuming you don't have an old 8bit 256kB VGA card from 1987, it probably
can survive without the dummy i/o cycle inserted inbetween anyway.
Hrrm, I'll have to try this...

Paul.