Commit 6416ad73 authored by Krzysztof Helt's avatar Krzysztof Helt Committed by Linus Torvalds

pm2fb: replace busy waiting with cpu_relax

This patch replaces busy waiting with the cpu_relax() call.  This makes
scrolling faster.
Signed-off-by: default avatarKrzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: default avatarAntonino Daplas <adaplas@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f67fd7c1
...@@ -193,8 +193,8 @@ static inline void pm2v_RDAC_WR(struct pm2fb_par *p, s32 idx, u32 v) ...@@ -193,8 +193,8 @@ static inline void pm2v_RDAC_WR(struct pm2fb_par *p, s32 idx, u32 v)
#else #else
static inline void WAIT_FIFO(struct pm2fb_par *p, u32 a) static inline void WAIT_FIFO(struct pm2fb_par *p, u32 a)
{ {
while (pm2_RD(p, PM2R_IN_FIFO_SPACE) < a); while (pm2_RD(p, PM2R_IN_FIFO_SPACE) < a)
mb(); cpu_relax();
} }
#endif #endif
...@@ -328,7 +328,7 @@ static void reset_card(struct pm2fb_par *p) ...@@ -328,7 +328,7 @@ static void reset_card(struct pm2fb_par *p)
pm2_WR(p, PM2R_RESET_STATUS, 0); pm2_WR(p, PM2R_RESET_STATUS, 0);
mb(); mb();
while (pm2_RD(p, PM2R_RESET_STATUS) & PM2F_BEING_RESET) while (pm2_RD(p, PM2R_RESET_STATUS) & PM2F_BEING_RESET)
; cpu_relax();
mb(); mb();
#ifdef CONFIG_FB_PM2_FIFO_DISCONNECT #ifdef CONFIG_FB_PM2_FIFO_DISCONNECT
DPRINTK("FIFO disconnect enabled\n"); DPRINTK("FIFO disconnect enabled\n");
...@@ -1041,8 +1041,7 @@ static int pm2fb_sync(struct fb_info *info) ...@@ -1041,8 +1041,7 @@ static int pm2fb_sync(struct fb_info *info)
mb(); mb();
do { do {
while (pm2_RD(par, PM2R_OUT_FIFO_WORDS) == 0) while (pm2_RD(par, PM2R_OUT_FIFO_WORDS) == 0)
udelay(10); cpu_relax();
rmb();
} while (pm2_RD(par, PM2R_OUT_FIFO) != PM2TAG(PM2R_SYNC)); } while (pm2_RD(par, PM2R_OUT_FIFO) != PM2TAG(PM2R_SYNC));
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment