Thread (14 messages) 14 messages, 3 authors, 2005-12-08

Re: scroll modes

From: "Antonino A. Daplas" <adaplas@gmail.com>
Date: 2005-11-30 20:41:03
Subsystem: console subsystem, framebuffer layer, the rest · Maintainers: Greg Kroah-Hartman, Helge Deller, Linus Torvalds

Knut Petersen wrote:
Geert Uytterhoeven wrote:
quoted
Ywrap has been working fine with amifb since ages (unless someone
broke it very
recently).

 
We are talking about scrollmode = SCROLL_WRAP_MOVE ?
Try this patch.

Tony
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 1a8f0ea..5ebe68f 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -1972,12 +1972,6 @@ static __inline__ void updatescrollmode(
 	int fast_imageblit = (cap & FBINFO_HWACCEL_IMAGEBLIT) &&
 		!(cap & FBINFO_HWACCEL_DISABLED);
 
-	p->vrows = vyres/fh;
-	if (yres > (fh * (vc->vc_rows + 1)))
-		p->vrows -= (yres - (fh * vc->vc_rows)) / fh;
-	if ((yres % fh) && (vyres % fh < yres % fh))
-		p->vrows--;
-
 	if (good_wrap || good_pan) {
 		if (reading_fast || fast_copyarea)
 			p->scrollmode = good_wrap ?
@@ -1991,6 +1985,16 @@ static __inline__ void updatescrollmode(
 		else
 			p->scrollmode = SCROLL_REDRAW;
 	}
+
+	p->vrows = vyres/fh;
+
+	if (p->scrollmode != SCROLL_WRAP_MOVE &&
+	    (yres > (fh * (vc->vc_rows + 1))))
+		    p->vrows -= (yres - (fh * vc->vc_rows)) / fh;
+
+	if ((yres % fh) && (vyres % fh < yres % fh))
+		p->vrows--;
+
 }
 
 static int fbcon_resize(struct vc_data *vc, unsigned int width, 


-------------------------------------------------------
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help