mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-24 12:30:11 +01:00
change loops that get optimized out by gcc to udelay, avoids lockups (Mike
A. Harris)
This commit is contained in:
parent
951b44b4b9
commit
4a86c817f8
4 changed files with 6 additions and 8 deletions
|
|
@ -350,8 +350,7 @@ static int i810_wait_ring(drm_device_t *dev, int n)
|
|||
DRM_ERROR("lockup\n");
|
||||
goto out_wait_ring;
|
||||
}
|
||||
|
||||
for (i = 0 ; i < 2000 ; i++) ;
|
||||
udelay(1);
|
||||
}
|
||||
|
||||
out_wait_ring:
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ do { \
|
|||
do { \
|
||||
_head = I830_READ(LP_RING + RING_HEAD) & HEAD_ADDR; \
|
||||
_tail = I830_READ(LP_RING + RING_TAIL) & TAIL_ADDR; \
|
||||
for(_i = 0; _i < 65535; _i++); \
|
||||
udelay(10); \
|
||||
} while(_head != _tail); \
|
||||
} while(0)
|
||||
|
||||
|
|
@ -389,7 +389,7 @@ static int i830_wait_ring(drm_device_t *dev, int n)
|
|||
goto out_wait_ring;
|
||||
}
|
||||
|
||||
for (i = 0 ; i < 2000 ; i++) ;
|
||||
udelay(1);
|
||||
}
|
||||
|
||||
out_wait_ring:
|
||||
|
|
|
|||
|
|
@ -350,8 +350,7 @@ static int i810_wait_ring(drm_device_t *dev, int n)
|
|||
DRM_ERROR("lockup\n");
|
||||
goto out_wait_ring;
|
||||
}
|
||||
|
||||
for (i = 0 ; i < 2000 ; i++) ;
|
||||
udelay(1);
|
||||
}
|
||||
|
||||
out_wait_ring:
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ do { \
|
|||
do { \
|
||||
_head = I830_READ(LP_RING + RING_HEAD) & HEAD_ADDR; \
|
||||
_tail = I830_READ(LP_RING + RING_TAIL) & TAIL_ADDR; \
|
||||
for(_i = 0; _i < 65535; _i++); \
|
||||
udelay(10); \
|
||||
} while(_head != _tail); \
|
||||
} while(0)
|
||||
|
||||
|
|
@ -389,7 +389,7 @@ static int i830_wait_ring(drm_device_t *dev, int n)
|
|||
goto out_wait_ring;
|
||||
}
|
||||
|
||||
for (i = 0 ; i < 2000 ; i++) ;
|
||||
udelay(1);
|
||||
}
|
||||
|
||||
out_wait_ring:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue