Skip to contentSkip to conversation

fbcon: Avoid illegal display panning

PATCH In review Antonino A. Daplas 1 participant 1 message Dec 10, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 7/18 fbcon: Avoid illegal display panning

Avoid calls to fb_pan_display when driver is suspended or not in text mode.

---

 drivers/video/console/fbcon.c |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)
drivers/video/console/fbcon.c +19 -6
index 9678045..d089209 100644
@@ -2136,8 +2136,12 @@ static int fbcon_switch(struct vc_data *
 
 	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);
 
@@ -2736,8 +2740,12 @@ static void fbcon_modechanged(struct fb_
 		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)
@@ -2774,8 +2782,13 @@ static void fbcon_set_all_vcs(struct fb_
 			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)

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click