提交 deea62d3 编写于 作者: K Krzysztof Helt 提交者: Linus Torvalds

pm3fb: replace busy waiting with cpu_relax

This patch replaces busy waiting with the cpu_relax() call.  This makes
scrolling faster.
Signed-off-by: NKrzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: NAntonino Daplas <adaplas@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 6416ad73
...@@ -110,7 +110,8 @@ static inline void PM3_WRITE_REG(struct pm3_par *par, s32 off, u32 v) ...@@ -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) 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) 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) ...@@ -209,8 +210,8 @@ static int pm3fb_sync(struct fb_info *info)
PM3_WRITE_REG(par, PM3Sync, 0); PM3_WRITE_REG(par, PM3Sync, 0);
mb(); mb();
do { do {
while ((PM3_READ_REG(par, PM3OutFIFOWords)) == 0); while ((PM3_READ_REG(par, PM3OutFIFOWords)) == 0)
rmb(); cpu_relax();
} while ((PM3_READ_REG(par, PM3OutputFifo)) != PM3Sync_Tag); } while ((PM3_READ_REG(par, PM3OutputFifo)) != PM3Sync_Tag);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册