Re: [PATCH] vgacon: Workaround for resize bug in some chipsets
From: Samuel Thibault
Date: Wed Nov 16 2005 - 18:52:12 EST
Hi,
The following patch should correct the issue:
When doublescan mode is in use, scanlines must be doubled.
Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
--- drivers/video/console/vgacon.c.orig 2005-11-17 00:40:02.000000000 +0100
+++ drivers/video/console/vgacon.c 2005-11-17 00:42:27.000000000 +0100
@@ -502,10 +502,16 @@
{
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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/