]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] vgacon: fix doublescan mode
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 8 Jan 2006 09:02:34 +0000 (01:02 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 9 Jan 2006 04:13:51 +0000 (20:13 -0800)
When doublescan mode is in use, scanlines must be doubled.

Thanks to Jason Dravet <dravet@hotmail.com> for reporting and testing.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/video/console/vgacon.c

index 167de397e4b430def9bb9b470153842a8d5803dc..f4e1c4b4191e7b49c044b06780df946ad6862081 100644 (file)
@@ -503,10 +503,16 @@ static int vgacon_doresize(struct vc_data *c,
 {
        unsigned long flags;
        unsigned int scanlines = height * c->vc_font.height;
-       u8 scanlines_lo, r7, vsync_end, mode;
+       u8 scanlines_lo, r7, vsync_end, mode, max_scan;
 
        spin_lock_irqsave(&vga_lock, flags);
 
+       outb_p(VGA_CRTC_MAX_SCAN, vga_video_port_reg);
+       max_scan = inb_p(vga_video_port_val);
+
+       if (max_scan & 0x80)
+               scanlines <<= 1;
+
        outb_p(VGA_CRTC_MODE, vga_video_port_reg);
        mode = inb_p(vga_video_port_val);