Commit 954de914 authored by Samuel Thibault's avatar Samuel Thibault Committed by Linus Torvalds

[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: default avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
Cc: <stable@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b8b0af24
...@@ -503,10 +503,16 @@ static int vgacon_doresize(struct vc_data *c, ...@@ -503,10 +503,16 @@ static int vgacon_doresize(struct vc_data *c,
{ {
unsigned long flags; unsigned long flags;
unsigned int scanlines = height * c->vc_font.height; 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); 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); outb_p(VGA_CRTC_MODE, vga_video_port_reg);
mode = inb_p(vga_video_port_val); mode = inb_p(vga_video_port_val);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment