Merge to Fedora kernel-2.6.7-1.441
[linux-2.6.git] / drivers / video / console / vgacon.c
index b75ab0d..23e1e7e 100644 (file)
@@ -963,6 +963,8 @@ static int vgacon_scrolldelta(struct vc_data *c, int lines)
                p = (c->vc_visible_origin - vga_vram_base - ul + we) % we +
                    lines * c->vc_size_row;
                st = (c->vc_origin - vga_vram_base - ul + we) % we;
+               if (st < 2 * margin)
+                       margin = 0;
                if (p < margin)
                        p = 0;
                if (p > st - margin)