diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2006-01-08 01:02:34 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 20:13:51 -0800 |
commit | 954de9141e75cf2f1ce69ccdbedc83ec827a01ec (patch) | |
tree | 05682a83cafc8784d8e60f0d9e98694ad4a932d2 /drivers | |
parent | b8b0af24353eafadf58a0889999700e43f135aad (diff) | |
download | op-kernel-dev-954de9141e75cf2f1ce69ccdbedc83ec827a01ec.zip op-kernel-dev-954de9141e75cf2f1ce69ccdbedc83ec827a01ec.tar.gz |
[PATCH] vgacon: fix doublescan mode
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/console/vgacon.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 167de39..f4e1c4b 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); |