summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/via/via_dma.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-20 08:42:48 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-20 08:42:48 -0700
commit5cab3856e76f4e6dd44731cea054021105e3e02d (patch)
tree0fce18d11071276dac994765ffc35248438edab2 /drivers/gpu/drm/via/via_dma.c
parent2edbdd1266784495979576c4ab4ef294c29bad27 (diff)
parent59de2bebabc5027f93df999d59cc65df591c3e6e (diff)
downloadblackbird-op-linux-5cab3856e76f4e6dd44731cea054021105e3e02d.tar.gz
blackbird-op-linux-5cab3856e76f4e6dd44731cea054021105e3e02d.zip
Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: agp: zero pages before sending to userspace drm: check for minor master before allowing drop master. drm: set/clear is_master when master changed drm: clean dirty memory after device release drm: count reaches -1
Diffstat (limited to 'drivers/gpu/drm/via/via_dma.c')
-rw-r--r--drivers/gpu/drm/via/via_dma.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/via/via_dma.c b/drivers/gpu/drm/via/via_dma.c
index 7a339dba6a69..bfb92d283260 100644
--- a/drivers/gpu/drm/via/via_dma.c
+++ b/drivers/gpu/drm/via/via_dma.c
@@ -481,11 +481,13 @@ static int via_wait_idle(drm_via_private_t * dev_priv)
{
int count = 10000000;
- while (!(VIA_READ(VIA_REG_STATUS) & VIA_VR_QUEUE_BUSY) && count--);
+ while (!(VIA_READ(VIA_REG_STATUS) & VIA_VR_QUEUE_BUSY) && --count)
+ ;
- while (count-- && (VIA_READ(VIA_REG_STATUS) &
+ while (count && (VIA_READ(VIA_REG_STATUS) &
(VIA_CMD_RGTR_BUSY | VIA_2D_ENG_BUSY |
- VIA_3D_ENG_BUSY))) ;
+ VIA_3D_ENG_BUSY)))
+ --count;
return count;
}
@@ -705,7 +707,7 @@ static int via_cmdbuf_size(struct drm_device *dev, void *data, struct drm_file *
switch (d_siz->func) {
case VIA_CMDBUF_SPACE:
while (((tmp_size = via_cmdbuf_space(dev_priv)) < d_siz->size)
- && count--) {
+ && --count) {
if (!d_siz->wait) {
break;
}
@@ -717,7 +719,7 @@ static int via_cmdbuf_size(struct drm_device *dev, void *data, struct drm_file *
break;
case VIA_CMDBUF_LAG:
while (((tmp_size = via_cmdbuf_lag(dev_priv)) > d_siz->size)
- && count--) {
+ && --count) {
if (!d_siz->wait) {
break;
}
OpenPOWER on IntegriCloud