aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
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
commit6416ad7365833657fe0ca561261b324edc5aba42 (patch)
tree211fa9fbad789790b9ac26f22985629728628e3d /drivers
parentf67fd7c10f2eb16e6c70fd99e97a148e19ac5a55 (diff)
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 <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')
-rw-r--r--drivers/video/pm2fb.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/video/pm2fb.c b/drivers/video/pm2fb.c
index 9db1f2e1dadf..5591dfb22b18 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)
193#else 193#else
194static inline void WAIT_FIFO(struct pm2fb_par *p, u32 a) 194static inline void WAIT_FIFO(struct pm2fb_par *p, u32 a)
195{ 195{
196 while (pm2_RD(p, PM2R_IN_FIFO_SPACE) < a); 196 while (pm2_RD(p, PM2R_IN_FIFO_SPACE) < a)
197 mb(); 197 cpu_relax();
198} 198}
199#endif 199#endif
200 200
@@ -328,7 +328,7 @@ static void reset_card(struct pm2fb_par *p)
328 pm2_WR(p, PM2R_RESET_STATUS, 0); 328 pm2_WR(p, PM2R_RESET_STATUS, 0);
329 mb(); 329 mb();
330 while (pm2_RD(p, PM2R_RESET_STATUS) & PM2F_BEING_RESET) 330 while (pm2_RD(p, PM2R_RESET_STATUS) & PM2F_BEING_RESET)
331 ; 331 cpu_relax();
332 mb(); 332 mb();
333#ifdef CONFIG_FB_PM2_FIFO_DISCONNECT 333#ifdef CONFIG_FB_PM2_FIFO_DISCONNECT
334 DPRINTK("FIFO disconnect enabled\n"); 334 DPRINTK("FIFO disconnect enabled\n");
@@ -1041,8 +1041,7 @@ static int pm2fb_sync(struct fb_info *info)
1041 mb(); 1041 mb();
1042 do { 1042 do {
1043 while (pm2_RD(par, PM2R_OUT_FIFO_WORDS) == 0) 1043 while (pm2_RD(par, PM2R_OUT_FIFO_WORDS) == 0)
1044 udelay(10); 1044 cpu_relax();
1045 rmb();
1046 } while (pm2_RD(par, PM2R_OUT_FIFO) != PM2TAG(PM2R_SYNC)); 1045 } while (pm2_RD(par, PM2R_OUT_FIFO) != PM2TAG(PM2R_SYNC));
1047 1046
1048 return 0; 1047 return 0;