Skip to contentSkip to conversation

tdfxfb: replace busy waiting with cpu_relax

PATCH New Antonino A. Daplas 1 participant 1 message Sep 15, 2007 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 9/12 tdfxfb: replace busy waiting with cpu_relax

From: Krzysztof Helt <[email protected]>

This patch replaces busy waiting with cpu_relax() call. This makes scrolling faster.

---

 drivers/video/tdfxfb.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/video/tdfxfb.c +2 -1
index c7ec5f3..faac9b4 100644
@@ -273,7 +273,8 @@ static inline void banshee_make_room(str
 {
 	/* 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)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/