From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
Date: Mon, 24 Mar 97 10:46:57 +0100
To: linux-m68k@phil.uni-sb.de
In-Reply-To: 
	<Pine.LNX.3.95q.970310100545.3051E-100000@mercator.cs.kuleuven.ac.be>
	(message from Geert Uytterhoeven on Mon, 10 Mar 1997 10:06:27 +0100
	(MET))
Subject: Re: L68K: Experimental console speedup
X-Yow: Is a tattoo real, like a curb or a battleship?
 Or are we suffering in Safeway?
Sender: owner-linux-m68k@phil.uni-sb.de
Reply-To: linux-m68k@phil.uni-sb.de

Geert Uytterhoeven <Geert.Uytterhoeven@cs.kuleuven.ac.be> writes:

|> This experimental patch speeds up scrolling of parts of the screen.

There's a bug in the scroll down case, the conditions were mixed up.
Gives some kind of VI feeling in Emacs :-)

Btw, why do you use p->dispsw->bmove with SCROLL_YMOVE, but fbcon_bmove
otherwise?

Andreas.

--- linux/arch/m68k/console/fbcon.c.~3~	Thu Mar 13 21:02:16 1997
+++ linux/arch/m68k/console/fbcon.c	Thu Mar 13 21:42:19 1997
@@ -1697,11 +1697,11 @@
 	    switch (p->scrollmode) {
 	       case SCROLL_YWRAP:
 		  if (b-t-count > 3*conp->vc_rows>>2) {
-		     if (t > 0)
+		     if (conp->vc_rows-b > 0)
 			fbcon_bmove(conp, b, 0, b-count, 0, conp->vc_rows-b,
 				    conp->vc_cols);
 		     ywrap_down(unit, p, count);
-		     if (conp->vc_rows-b > 0)
+		     if (t > 0)
 			fbcon_bmove(conp, count, 0, 0, 0, t, conp->vc_cols);
 		  } else
 		     fbcon_bmove(conp, t, 0, t+count, 0, b-t-count,
@@ -1711,11 +1711,11 @@
 
 	       case SCROLL_YPAN:
 		  if (b-t-count > 3*conp->vc_rows>>2) {
-		     if (t > 0)
+		     if (conp->vc_rows-b > 0)
 			fbcon_bmove(conp, b, 0, b-count, 0, conp->vc_rows-b,
 				    conp->vc_cols);
 		     ypan_down(unit, conp, p, count);
-		     if (conp->vc_rows-b > 0)
+		     if (t > 0)
 			fbcon_bmove(conp, count, 0, 0, 0, t, conp->vc_cols);
 		  } else
 		     fbcon_bmove(conp, t, 0, t+count, 0, b-t-count,
