diff options
author | Tony Luck <tony.luck@intel.com> | 2005-10-20 13:41:44 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-10-20 13:41:44 -0400 |
commit | 9cec58dc138d6fcad9f447a19c8ff69f6540e667 (patch) | |
tree | 4fe1cca94fdba8b705c87615bee06d3346f687ce /drivers/video/console/vgacon.c | |
parent | 17e5ad6c0ce5a970e2830d0de8bdd60a2f077d38 (diff) | |
parent | ac9b9c667c2e1194e22ebe0a441ae1c37aaa9b90 (diff) |
Update from upstream with manual merge of Yasunori Goto's
changes to swiotlb.c made in commit 281dd25cdc0d6903929b79183816d151ea626341
since this file has been moved from arch/ia64/lib/swiotlb.c to
lib/swiotlb.c
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'drivers/video/console/vgacon.c')
-rw-r--r-- | drivers/video/console/vgacon.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 0705cd741411..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 */ |
@@ -1020,8 +1024,11 @@ static int vgacon_font_get(struct vc_data *c, struct console_font *font) | |||
1020 | static int vgacon_resize(struct vc_data *c, unsigned int width, | 1024 | static int vgacon_resize(struct vc_data *c, unsigned int width, |
1021 | unsigned int height) | 1025 | unsigned int height) |
1022 | { | 1026 | { |
1023 | if (width % 2 || width > ORIG_VIDEO_COLS || height > ORIG_VIDEO_LINES) | 1027 | if (width % 2 || width > ORIG_VIDEO_COLS || |
1024 | return -EINVAL; | 1028 | height > (ORIG_VIDEO_LINES * vga_default_font_height)/ |
1029 | c->vc_font.height) | ||
1030 | /* let svgatextmode tinker with video timings */ | ||
1031 | return 0; | ||
1025 | 1032 | ||
1026 | if (CON_IS_VISIBLE(c) && !vga_is_gfx) /* who knows */ | 1033 | if (CON_IS_VISIBLE(c) && !vga_is_gfx) /* who knows */ |
1027 | vgacon_doresize(c, width, height); | 1034 | vgacon_doresize(c, width, height); |