diff options
-rw-r--r-- | drivers/video/console/vgacon.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 6ef6f7760e47..809fee2140ac 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c | |||
@@ -565,7 +565,11 @@ static int vgacon_switch(struct vc_data *c) | |||
565 | scr_memcpyw((u16 *) c->vc_origin, (u16 *) c->vc_screenbuf, | 565 | scr_memcpyw((u16 *) c->vc_origin, (u16 *) c->vc_screenbuf, |
566 | c->vc_screenbuf_size > vga_vram_size ? | 566 | c->vc_screenbuf_size > vga_vram_size ? |
567 | vga_vram_size : c->vc_screenbuf_size); | 567 | vga_vram_size : c->vc_screenbuf_size); |
568 | vgacon_doresize(c, c->vc_cols, c->vc_rows); | 568 | if (!(vga_video_num_columns % 2) && |
569 | vga_video_num_columns <= ORIG_VIDEO_COLS && | ||
570 | vga_video_num_lines <= (ORIG_VIDEO_LINES * | ||
571 | vga_default_font_height) / c->vc_font.height) | ||
572 | vgacon_doresize(c, c->vc_cols, c->vc_rows); | ||
569 | } | 573 | } |
570 | 574 | ||
571 | return 0; /* Redrawing not needed */ | 575 | return 0; /* Redrawing not needed */ |
@@ -1023,7 +1027,8 @@ static int vgacon_resize(struct vc_data *c, unsigned int width, | |||
1023 | if (width % 2 || width > ORIG_VIDEO_COLS || | 1027 | if (width % 2 || width > ORIG_VIDEO_COLS || |
1024 | height > (ORIG_VIDEO_LINES * vga_default_font_height)/ | 1028 | height > (ORIG_VIDEO_LINES * vga_default_font_height)/ |
1025 | c->vc_font.height) | 1029 | c->vc_font.height) |
1026 | return -EINVAL; | 1030 | /* let svgatextmode tinker with video timings */ |
1031 | return 0; | ||
1027 | 1032 | ||
1028 | if (CON_IS_VISIBLE(c) && !vga_is_gfx) /* who knows */ | 1033 | if (CON_IS_VISIBLE(c) && !vga_is_gfx) /* who knows */ |
1029 | vgacon_doresize(c, width, height); | 1034 | vgacon_doresize(c, width, height); |