tdfxfb: replace busy waiting with cpu_relax
authorKrzysztof Helt <krzysztof.h1@wp.pl>
Tue, 16 Oct 2007 08:29:26 +0000 (01:29 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 16 Oct 2007 16:43:19 +0000 (09:43 -0700)
This patch replaces busy waiting with cpu_relax() call.  This makes scrolling
faster.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/tdfxfb.c

index c7ec5f382608ec06e46c109ff7061c87c0326ab0..faac9b469ea9ae402f4777231c1db96a5cefecbc 100644 (file)
@@ -273,7 +273,8 @@ static inline void banshee_make_room(struct tdfx_par *par, int size)
 {
        /* Note: The Voodoo3's onboard FIFO has 32 slots. This loop
         * won't quit if you ask for more. */
-       while ((tdfx_inl(par, STATUS) & 0x1f) < size - 1) ;
+       while ((tdfx_inl(par, STATUS) & 0x1f) < size - 1)
+               cpu_relax();
 }
  
 static int banshee_wait_idle(struct fb_info *info)