From: Samuel Thibault Date: Sun, 8 Jan 2006 09:02:34 +0000 (-0800) Subject: [PATCH] vgacon: fix doublescan mode X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=954de9141e75cf2f1ce69ccdbedc83ec827a01ec;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [PATCH] vgacon: fix doublescan mode When doublescan mode is in use, scanlines must be doubled. Thanks to Jason Dravet for reporting and testing. Signed-off-by: Samuel Thibault Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 167de397e4b4..f4e1c4b4191e 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -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);