aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/console
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2007-05-08 03:38:40 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:29 -0400
commit95d67bb1ca82dc8bd75304bda891e7ad81ecd935 (patch)
tree044b0526dc9406abd1d525a64f7949214a92b402 /drivers/video/console
parentb2f594fd7adff7aae2d1664e72044926b0b906aa (diff)
fbcon: delay screen update when setting the mode of all consoles
If the current framebuffer console is rotated (rotate != 0), doing an "fbset -a" will corrupt the current console. Fix by updating the current console only after all non-visible consoles have been updated. Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/console')
-rw-r--r--drivers/video/console/fbcon.c31
1 files changed, 10 insertions, 21 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index c8b4ae6d7efe..19dfdfbd4341 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -2849,7 +2849,7 @@ static void fbcon_set_all_vcs(struct fb_info *info)
2849 struct fbcon_ops *ops = info->fbcon_par; 2849 struct fbcon_ops *ops = info->fbcon_par;
2850 struct vc_data *vc; 2850 struct vc_data *vc;
2851 struct display *p; 2851 struct display *p;
2852 int i, rows, cols; 2852 int i, rows, cols, fg = -1;
2853 2853
2854 if (!ops || ops->currcon < 0) 2854 if (!ops || ops->currcon < 0)
2855 return; 2855 return;
@@ -2860,34 +2860,23 @@ static void fbcon_set_all_vcs(struct fb_info *info)
2860 registered_fb[con2fb_map[i]] != info) 2860 registered_fb[con2fb_map[i]] != info)
2861 continue; 2861 continue;
2862 2862
2863 if (CON_IS_VISIBLE(vc)) {
2864 fg = i;
2865 continue;
2866 }
2867
2863 p = &fb_display[vc->vc_num]; 2868 p = &fb_display[vc->vc_num];
2864 set_blitting_type(vc, info); 2869 set_blitting_type(vc, info);
2865 var_to_display(p, &info->var, info); 2870 var_to_display(p, &info->var, info);
2866 cols = FBCON_SWAP(ops->rotate, info->var.xres, info->var.yres); 2871 cols = FBCON_SWAP(p->rotate, info->var.xres, info->var.yres);
2867 rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres); 2872 rows = FBCON_SWAP(p->rotate, info->var.yres, info->var.xres);
2868 cols /= vc->vc_font.width; 2873 cols /= vc->vc_font.width;
2869 rows /= vc->vc_font.height; 2874 rows /= vc->vc_font.height;
2870 vc_resize(vc, cols, rows); 2875 vc_resize(vc, cols, rows);
2871
2872 if (CON_IS_VISIBLE(vc)) {
2873 updatescrollmode(p, info, vc);
2874 scrollback_max = 0;
2875 scrollback_current = 0;
2876
2877 if (!fbcon_is_inactive(vc, info)) {
2878 ops->var.xoffset = ops->var.yoffset =
2879 p->yscroll = 0;
2880 ops->update_start(info);
2881 }
2882
2883 fbcon_set_palette(vc, color_table);
2884 update_screen(vc);
2885 if (softback_buf)
2886 fbcon_update_softback(vc);
2887 }
2888 } 2876 }
2889 2877
2890 ops->p = &fb_display[ops->currcon]; 2878 if (fg != -1)
2879 fbcon_modechanged(info);
2891} 2880}
2892 2881
2893static int fbcon_mode_deleted(struct fb_info *info, 2882static int fbcon_mode_deleted(struct fb_info *info,