[PATCH] fbcon: Avoid illegal display panning
authorAntonino A. Daplas <adaplas@gmail.com>
Tue, 13 Dec 2005 06:17:18 +0000 (22:17 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 13 Dec 2005 06:31:17 +0000 (22:31 -0800)
Avoid calls to fb_pan_display when driver is suspended or not in text mode.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/video/console/fbcon.c

index bd4500a8992eb61be672fc52ca5eea3934164d82..8068d2f7efe69a2f8e93304b13b30f23d481d265 100644 (file)
@@ -2146,8 +2146,12 @@ static int fbcon_switch(struct vc_data *vc)
 
        scrollback_max = 0;
        scrollback_current = 0;
-       ops->var.xoffset = ops->var.yoffset = p->yscroll = 0;
-       ops->update_start(info);
+
+       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);     
        fbcon_clear_margins(vc, 0);
 
@@ -2746,8 +2750,12 @@ static void fbcon_modechanged(struct fb_info *info)
                updatescrollmode(p, info, vc);
                scrollback_max = 0;
                scrollback_current = 0;
-               ops->var.xoffset = ops->var.yoffset = p->yscroll = 0;
-               ops->update_start(info);
+
+               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)
@@ -2784,8 +2792,13 @@ static void fbcon_set_all_vcs(struct fb_info *info)
                        updatescrollmode(p, info, vc);
                        scrollback_max = 0;
                        scrollback_current = 0;
-                       ops->var.xoffset = ops->var.yoffset = p->yscroll = 0;
-                       ops->update_start(info);
+
+                       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)