Commit 95d67bb1 authored by Antonino A. Daplas's avatar Antonino A. Daplas Committed by Linus Torvalds

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: default avatarAntonino Daplas <adaplas@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b2f594fd
...@@ -2849,7 +2849,7 @@ static void fbcon_set_all_vcs(struct fb_info *info) ...@@ -2849,7 +2849,7 @@ static void fbcon_set_all_vcs(struct fb_info *info)
struct fbcon_ops *ops = info->fbcon_par; struct fbcon_ops *ops = info->fbcon_par;
struct vc_data *vc; struct vc_data *vc;
struct display *p; struct display *p;
int i, rows, cols; int i, rows, cols, fg = -1;
if (!ops || ops->currcon < 0) if (!ops || ops->currcon < 0)
return; return;
...@@ -2860,34 +2860,23 @@ static void fbcon_set_all_vcs(struct fb_info *info) ...@@ -2860,34 +2860,23 @@ static void fbcon_set_all_vcs(struct fb_info *info)
registered_fb[con2fb_map[i]] != info) registered_fb[con2fb_map[i]] != info)
continue; continue;
if (CON_IS_VISIBLE(vc)) {
fg = i;
continue;
}
p = &fb_display[vc->vc_num]; p = &fb_display[vc->vc_num];
set_blitting_type(vc, info); set_blitting_type(vc, info);
var_to_display(p, &info->var, info); var_to_display(p, &info->var, info);
cols = FBCON_SWAP(ops->rotate, info->var.xres, info->var.yres); cols = FBCON_SWAP(p->rotate, info->var.xres, info->var.yres);
rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres); rows = FBCON_SWAP(p->rotate, info->var.yres, info->var.xres);
cols /= vc->vc_font.width; cols /= vc->vc_font.width;
rows /= vc->vc_font.height; rows /= vc->vc_font.height;
vc_resize(vc, cols, rows); vc_resize(vc, cols, rows);
if (CON_IS_VISIBLE(vc)) {
updatescrollmode(p, info, vc);
scrollback_max = 0;
scrollback_current = 0;
if (!fbcon_is_inactive(vc, info)) {
ops->var.xoffset = ops->var.yoffset =
p->yscroll = 0;
ops->update_start(info);
} }
fbcon_set_palette(vc, color_table); if (fg != -1)
update_screen(vc); fbcon_modechanged(info);
if (softback_buf)
fbcon_update_softback(vc);
}
}
ops->p = &fb_display[ops->currcon];
} }
static int fbcon_mode_deleted(struct fb_info *info, static int fbcon_mode_deleted(struct fb_info *info,
......
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