aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/via
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/via')
-rw-r--r--drivers/video/via/accel.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/video/via/accel.c b/drivers/video/via/accel.c
index 632523ff1fb7..45c54bfe99bb 100644
--- a/drivers/video/via/accel.c
+++ b/drivers/video/via/accel.c
@@ -267,13 +267,17 @@ int viafb_wait_engine_idle(void)
267 int loop = 0; 267 int loop = 0;
268 268
269 while (!(readl(viaparinfo->io_virt + VIA_REG_STATUS) & 269 while (!(readl(viaparinfo->io_virt + VIA_REG_STATUS) &
270 VIA_VR_QUEUE_BUSY) && (loop++ < MAXLOOP)) 270 VIA_VR_QUEUE_BUSY) && (loop < MAXLOOP)) {
271 loop++;
271 cpu_relax(); 272 cpu_relax();
273 }
272 274
273 while ((readl(viaparinfo->io_virt + VIA_REG_STATUS) & 275 while ((readl(viaparinfo->io_virt + VIA_REG_STATUS) &
274 (VIA_CMD_RGTR_BUSY | VIA_2D_ENG_BUSY | VIA_3D_ENG_BUSY)) && 276 (VIA_CMD_RGTR_BUSY | VIA_2D_ENG_BUSY | VIA_3D_ENG_BUSY)) &&
275 (loop++ < MAXLOOP)) 277 (loop < MAXLOOP)) {
278 loop++;
276 cpu_relax(); 279 cpu_relax();
280 }
277 281
278 return loop >= MAXLOOP; 282 return loop >= MAXLOOP;
279} 283}