Skip to content

Commit

Permalink
[PATCH] vgacon: fix doublescan mode
Browse files Browse the repository at this point in the history
When doublescan mode is in use, scanlines must be doubled.

Thanks to Jason Dravet <[email protected]> for reporting and testing.

Signed-off-by: Samuel Thibault <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
sthibaul authored and Linus Torvalds committed Jan 9, 2006
1 parent b8b0af2 commit 954de91
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/video/console/vgacon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 954de91

Please sign in to comment.