summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2015-04-06 03:49:48 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2015-04-06 03:49:48 +0000
commit65e8a275ad8eac4ce8b9c616f13fc639187fdf7f (patch)
tree7bde9eb190114d73adc8f2407700f662cbc1e565 /sys/dev/pci
parentdc2f101d7d3c8e7e57ee96694c0b23eccf47348a (diff)
Convert some udelay() calls back to DRM_UDELAY() where
the wrapper is still used in the original linux code.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/radeon/r100.c12
-rw-r--r--sys/dev/pci/drm/radeon/r300.c4
-rw-r--r--sys/dev/pci/drm/radeon/r520.c4
-rw-r--r--sys/dev/pci/drm/radeon/r600.c10
-rw-r--r--sys/dev/pci/drm/radeon/rs400.c6
-rw-r--r--sys/dev/pci/drm/radeon/rv515.c4
6 files changed, 20 insertions, 20 deletions
diff --git a/sys/dev/pci/drm/radeon/r100.c b/sys/dev/pci/drm/radeon/r100.c
index 7b04ee20778..245df0b6b3f 100644
--- a/sys/dev/pci/drm/radeon/r100.c
+++ b/sys/dev/pci/drm/radeon/r100.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: r100.c,v 1.11 2015/02/12 11:11:45 jsg Exp $ */
+/* $OpenBSD: r100.c,v 1.12 2015/04/06 03:49:47 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -2560,7 +2560,7 @@ static int r100_rbbm_fifo_wait_for_entry(struct radeon_device *rdev, unsigned n)
if (tmp >= n) {
return 0;
}
- udelay(1);
+ DRM_UDELAY(1);
}
return -1;
}
@@ -2579,7 +2579,7 @@ int r100_gui_wait_for_idle(struct radeon_device *rdev)
if (!(tmp & RADEON_RBBM_ACTIVE)) {
return 0;
}
- udelay(1);
+ DRM_UDELAY(1);
}
return -1;
}
@@ -2595,7 +2595,7 @@ int r100_mc_wait_for_idle(struct radeon_device *rdev)
if (tmp & RADEON_MC_IDLE) {
return 0;
}
- udelay(1);
+ DRM_UDELAY(1);
}
return -1;
}
@@ -3742,7 +3742,7 @@ int r100_ring_test(struct radeon_device *rdev, struct radeon_ring *ring)
if (tmp == 0xDEADBEEF) {
break;
}
- udelay(1);
+ DRM_UDELAY(1);
}
if (i < rdev->usec_timeout) {
DRM_INFO("ring test succeeded in %d usecs\n", i);
@@ -3813,7 +3813,7 @@ int r100_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
if (tmp == 0xDEADBEEF) {
break;
}
- udelay(1);
+ DRM_UDELAY(1);
}
if (i < rdev->usec_timeout) {
DRM_INFO("ib test succeeded in %u usecs\n", i);
diff --git a/sys/dev/pci/drm/radeon/r300.c b/sys/dev/pci/drm/radeon/r300.c
index b83f9722c27..7c2bae9b5ab 100644
--- a/sys/dev/pci/drm/radeon/r300.c
+++ b/sys/dev/pci/drm/radeon/r300.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: r300.c,v 1.6 2015/02/12 08:48:32 jsg Exp $ */
+/* $OpenBSD: r300.c,v 1.7 2015/04/06 03:49:47 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -317,7 +317,7 @@ int r300_mc_wait_for_idle(struct radeon_device *rdev)
if (tmp & R300_MC_IDLE) {
return 0;
}
- udelay(1);
+ DRM_UDELAY(1);
}
return -1;
}
diff --git a/sys/dev/pci/drm/radeon/r520.c b/sys/dev/pci/drm/radeon/r520.c
index 7729bce2981..283237182b4 100644
--- a/sys/dev/pci/drm/radeon/r520.c
+++ b/sys/dev/pci/drm/radeon/r520.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: r520.c,v 1.3 2015/02/11 07:01:37 jsg Exp $ */
+/* $OpenBSD: r520.c,v 1.4 2015/04/06 03:49:47 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -45,7 +45,7 @@ int r520_mc_wait_for_idle(struct radeon_device *rdev)
if (tmp & R520_MC_STATUS_IDLE) {
return 0;
}
- udelay(1);
+ DRM_UDELAY(1);
}
return -1;
}
diff --git a/sys/dev/pci/drm/radeon/r600.c b/sys/dev/pci/drm/radeon/r600.c
index b649aea77ec..d9b2564cc27 100644
--- a/sys/dev/pci/drm/radeon/r600.c
+++ b/sys/dev/pci/drm/radeon/r600.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: r600.c,v 1.14 2015/02/12 11:11:45 jsg Exp $ */
+/* $OpenBSD: r600.c,v 1.15 2015/04/06 03:49:47 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -2460,7 +2460,7 @@ int r600_ring_test(struct radeon_device *rdev, struct radeon_ring *ring)
tmp = RREG32(scratch);
if (tmp == 0xDEADBEEF)
break;
- udelay(1);
+ DRM_UDELAY(1);
}
if (i < rdev->usec_timeout) {
DRM_INFO("ring test on %d succeeded in %d usecs\n", ring->idx, i);
@@ -2514,7 +2514,7 @@ int r600_dma_ring_test(struct radeon_device *rdev,
tmp = *ptr;
if (tmp == 0xDEADBEEF)
break;
- udelay(1);
+ DRM_UDELAY(1);
}
if (i < rdev->usec_timeout) {
@@ -3091,7 +3091,7 @@ int r600_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
tmp = RREG32(scratch);
if (tmp == 0xDEADBEEF)
break;
- udelay(1);
+ DRM_UDELAY(1);
}
if (i < rdev->usec_timeout) {
DRM_INFO("ib test on ring %d succeeded in %u usecs\n", ib.fence->ring, i);
@@ -3159,7 +3159,7 @@ int r600_dma_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
tmp = *ptr;
if (tmp == 0xDEADBEEF)
break;
- udelay(1);
+ DRM_UDELAY(1);
}
if (i < rdev->usec_timeout) {
DRM_INFO("ib test on ring %d succeeded in %u usecs\n", ib.fence->ring, i);
diff --git a/sys/dev/pci/drm/radeon/rs400.c b/sys/dev/pci/drm/radeon/rs400.c
index 45172b1dad1..312842f9f34 100644
--- a/sys/dev/pci/drm/radeon/rs400.c
+++ b/sys/dev/pci/drm/radeon/rs400.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rs400.c,v 1.6 2015/02/22 13:09:46 jsg Exp $ */
+/* $OpenBSD: rs400.c,v 1.7 2015/04/06 03:49:47 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -66,7 +66,7 @@ void rs400_gart_tlb_flush(struct radeon_device *rdev)
tmp = RREG32_MC(RS480_GART_CACHE_CNTRL);
if ((tmp & RS480_GART_CACHE_INVALIDATE) == 0)
break;
- udelay(1);
+ DRM_UDELAY(1);
timeout--;
} while (timeout > 0);
WREG32_MC(RS480_GART_CACHE_CNTRL, 0);
@@ -239,7 +239,7 @@ int rs400_mc_wait_for_idle(struct radeon_device *rdev)
if (tmp & RADEON_MC_IDLE) {
return 0;
}
- udelay(1);
+ DRM_UDELAY(1);
}
return -1;
}
diff --git a/sys/dev/pci/drm/radeon/rv515.c b/sys/dev/pci/drm/radeon/rv515.c
index 080e4839432..6f73cb9aad0 100644
--- a/sys/dev/pci/drm/radeon/rv515.c
+++ b/sys/dev/pci/drm/radeon/rv515.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rv515.c,v 1.4 2015/02/11 07:01:37 jsg Exp $ */
+/* $OpenBSD: rv515.c,v 1.5 2015/04/06 03:49:47 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -137,7 +137,7 @@ int rv515_mc_wait_for_idle(struct radeon_device *rdev)
if (tmp & MC_STATUS_IDLE) {
return 0;
}
- udelay(1);
+ DRM_UDELAY(1);
}
return -1;
}