From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Antonino A. Daplas" Subject: [PATCH 06/41] fbcon: Delay screen update when setting the mode of all consoles Date: Wed, 25 Apr 2007 14:21:08 +0800 Message-ID: <462EF354.2030504@gmail.com> Reply-To: linux-fbdev-devel@lists.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1Hgc5A-0000p2-2M for linux-fbdev-devel@lists.sourceforge.net; Wed, 25 Apr 2007 00:38:32 -0700 Received: from wx-out-0506.google.com ([66.249.82.230]) by mail.sourceforge.net with esmtp (Exim 4.44) id 1Hgc59-0005O7-M7 for linux-fbdev-devel@lists.sourceforge.net; Wed, 25 Apr 2007 00:38:32 -0700 Received: by wx-out-0506.google.com with SMTP id i30so293585wxd for ; Wed, 25 Apr 2007 00:38:31 -0700 (PDT) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-fbdev-devel-bounces@lists.sourceforge.net Errors-To: linux-fbdev-devel-bounces@lists.sourceforge.net To: Andrew Morton Cc: Linux Fbdev development list 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 --- drivers/video/console/fbcon.c | 31 ++++++++++--------------------- 1 files changed, 10 insertions(+), 21 deletions(-) diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index c8b4ae6..19dfdfb 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_ struct fbcon_ops *ops = info->fbcon_par; struct vc_data *vc; struct display *p; - int i, rows, cols; + int i, rows, cols, fg = -1; if (!ops || ops->currcon < 0) return; @@ -2860,34 +2860,23 @@ static void fbcon_set_all_vcs(struct fb_ registered_fb[con2fb_map[i]] != info) continue; + if (CON_IS_VISIBLE(vc)) { + fg = i; + continue; + } + p = &fb_display[vc->vc_num]; set_blitting_type(vc, info); var_to_display(p, &info->var, info); - cols = FBCON_SWAP(ops->rotate, info->var.xres, info->var.yres); - rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres); + cols = FBCON_SWAP(p->rotate, info->var.xres, info->var.yres); + rows = FBCON_SWAP(p->rotate, info->var.yres, info->var.xres); cols /= vc->vc_font.width; rows /= vc->vc_font.height; 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); - update_screen(vc); - if (softback_buf) - fbcon_update_softback(vc); - } } - ops->p = &fb_display[ops->currcon]; + if (fg != -1) + fbcon_modechanged(info); } static int fbcon_mode_deleted(struct fb_info *info, ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/