Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=deea62d3796da4c53614638ced8d9784dd5b8b41
Commit:     deea62d3796da4c53614638ced8d9784dd5b8b41
Parent:     6416ad7365833657fe0ca561261b324edc5aba42
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

    pm3fb: 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/pm3fb.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/video/pm3fb.c b/drivers/video/pm3fb.c
index 6a64b93..0706599 100644
--- a/drivers/video/pm3fb.c
+++ b/drivers/video/pm3fb.c
@@ -110,7 +110,8 @@ static inline void PM3_WRITE_REG(struct pm3_par *par, s32 
off, u32 v)
 
 static inline void PM3_WAIT(struct pm3_par *par, u32 n)
 {
-       while (PM3_READ_REG(par, PM3InFIFOSpace) < n);
+       while (PM3_READ_REG(par, PM3InFIFOSpace) < n)
+               cpu_relax();
 }
 
 static inline void PM3_WRITE_DAC_REG(struct pm3_par *par, unsigned r, u8 v)
@@ -209,8 +210,8 @@ static int pm3fb_sync(struct fb_info *info)
        PM3_WRITE_REG(par, PM3Sync, 0);
        mb();
        do {
-               while ((PM3_READ_REG(par, PM3OutFIFOWords)) == 0);
-               rmb();
+               while ((PM3_READ_REG(par, PM3OutFIFOWords)) == 0)
+                       cpu_relax();
        } while ((PM3_READ_REG(par, PM3OutputFifo)) != PM3Sync_Tag);
 
        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