From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Antonino A. Daplas" Subject: [PATCH 09/12] tdfxfb: replace busy waiting with cpu_relax Date: Sat, 15 Sep 2007 08:06:01 +0800 Message-ID: <46EB21E9.6030100@gmail.com> Reply-To: linux-fbdev-devel@lists.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1IWLEw-0007ma-W8 for linux-fbdev-devel@lists.sourceforge.net; Fri, 14 Sep 2007 17:10:27 -0700 Received: from rv-out-0910.google.com ([209.85.198.189]) by mail.sourceforge.net with esmtp (Exim 4.44) id 1IWLEv-0003jU-JO for linux-fbdev-devel@lists.sourceforge.net; Fri, 14 Sep 2007 17:10:26 -0700 Received: by rv-out-0910.google.com with SMTP id g11so3286302rvb for ; Fri, 14 Sep 2007 17:10:25 -0700 (PDT) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-fbdev-devel-bounces@lists.sourceforge.net Errors-To: linux-fbdev-devel-bounces@lists.sourceforge.net To: Andrew Morton Cc: Krzysztof Helt , Linux Fbdev development list From: Krzysztof Helt This patch replaces busy waiting with cpu_relax() call. This makes scrolling faster. Signed-off-by: Krzysztof Helt Signed-off-by: Antonino Daplas --- drivers/video/tdfxfb.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c index c7ec5f3..faac9b4 100644 --- a/drivers/video/tdfxfb.c +++ b/drivers/video/tdfxfb.c @@ -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/