Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6416ad7365833657fe0ca561261b324edc5aba42
Commit:     6416ad7365833657fe0ca561261b324edc5aba42
Parent:     f67fd7c10f2eb16e6c70fd99e97a148e19ac5a55
Author:     Krzysztof Helt <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 01:29:27 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 09:43:19 2007 -0700

    pm2fb: replace busy waiting with cpu_relax
    
    This patch replaces busy waiting with the cpu_relax() call.  This makes
    scrolling faster.
    
    Signed-off-by: Krzysztof Helt <[EMAIL PROTECTED]>
    Signed-off-by: Antonino Daplas <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/video/pm2fb.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/video/pm2fb.c b/drivers/video/pm2fb.c
index 9db1f2e..5591dfb 100644
--- a/drivers/video/pm2fb.c
+++ b/drivers/video/pm2fb.c
@@ -193,8 +193,8 @@ static inline void pm2v_RDAC_WR(struct pm2fb_par *p, s32 
idx, u32 v)
 #else
 static inline void WAIT_FIFO(struct pm2fb_par *p, u32 a)
 {
-       while (pm2_RD(p, PM2R_IN_FIFO_SPACE) < a);
-       mb();
+       while (pm2_RD(p, PM2R_IN_FIFO_SPACE) < a)
+               cpu_relax();
 }
 #endif
 
@@ -328,7 +328,7 @@ static void reset_card(struct pm2fb_par *p)
        pm2_WR(p, PM2R_RESET_STATUS, 0);
        mb();
        while (pm2_RD(p, PM2R_RESET_STATUS) & PM2F_BEING_RESET)
-               ;
+               cpu_relax();
        mb();
 #ifdef CONFIG_FB_PM2_FIFO_DISCONNECT
        DPRINTK("FIFO disconnect enabled\n");
@@ -1041,8 +1041,7 @@ static int pm2fb_sync(struct fb_info *info)
        mb();
        do {
                while (pm2_RD(par, PM2R_OUT_FIFO_WORDS) == 0)
-                       udelay(10);
-               rmb();
+                       cpu_relax();
        } while (pm2_RD(par, PM2R_OUT_FIFO) != PM2TAG(PM2R_SYNC));
 
        return 0;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to