lkml.org 
[lkml]   [1996]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectVideo scrolling (was: SMALL bug)
Date
> Not even really a bug, just a curriocity...
> Console in text mode...
> for some reason, about one in every 100 times the console scrolls, it wont
> scroll cleanly, ie, text will flash (almost subliminally) where text
> shouldnt be...

No real problem. The kernel just happened to be updating some of the
16bit VGA registers right when that part of the screen was being
refreshed. For compatibility with old hardware, the register update
is done with 8 bit IOs, (with pauses too). You can do 16bit IO on
nearly all hardware, which greatly reduces occurence of the 'flashing'

Here's a patch I made quite a while ago.

--- linux-1.99.10/drivers/char/vga.c Tue May 7 14:20:53 1996
+++ ./drivers/char/vga.c Mon May 20 12:25:12 1996
@@ -89,15 +89,17 @@
__set_origin(unsigned short offset)
{
unsigned long flags;
+ unsigned short high, low;

clear_selection();

+ high = 12 + (offset & 0xff00);
+ low = 13 + (offset << 8);
+
save_flags(flags); cli();
__origin = offset;
- 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);
+ outw(high, video_port_reg);
+ outw(low, video_port_reg);
restore_flags(flags);
}

\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.097 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site