aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/pm3fb.c
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@wp.pl>2007-10-16 04:29:27 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:19 -0400
commitdeea62d3796da4c53614638ced8d9784dd5b8b41 (patch)
tree744bf19f0571652ab2464b7b52e59fc50439a12e /drivers/video/pm3fb.c
parent6416ad7365833657fe0ca561261b324edc5aba42 (diff)
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 <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>
Diffstat (limited to 'drivers/video/pm3fb.c')
-rw-r--r--drivers/video/pm3fb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/video/pm3fb.c b/drivers/video/pm3fb.c
index 6a64b934133a..070659992c18 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)
110 110
111static inline void PM3_WAIT(struct pm3_par *par, u32 n) 111static inline void PM3_WAIT(struct pm3_par *par, u32 n)
112{ 112{
113 while (PM3_READ_REG(par, PM3InFIFOSpace) < n); 113 while (PM3_READ_REG(par, PM3InFIFOSpace) < n)
114 cpu_relax();
114} 115}
115 116
116static inline void PM3_WRITE_DAC_REG(struct pm3_par *par, unsigned r, u8 v) 117static 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)
209 PM3_WRITE_REG(par, PM3Sync, 0); 210 PM3_WRITE_REG(par, PM3Sync, 0);
210 mb(); 211 mb();
211 do { 212 do {
212 while ((PM3_READ_REG(par, PM3OutFIFOWords)) == 0); 213 while ((PM3_READ_REG(par, PM3OutFIFOWords)) == 0)
213 rmb(); 214 cpu_relax();
214 } while ((PM3_READ_REG(par, PM3OutputFifo)) != PM3Sync_Tag); 215 } while ((PM3_READ_REG(par, PM3OutputFifo)) != PM3Sync_Tag);
215 216
216 return 0; 217 return 0;