summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2003-01-16 06:20:44 +0000
committerEric Anholt <anholt@freebsd.org>2003-01-16 06:20:44 +0000
commit77ea378b09a86a9fe73d0ecef40f5570068c9af0 (patch)
tree9ba6234d69332345374f32b8b69ddad55f2f42dd
parent826aad0aba648befe09592f154f75db5009a0cd9 (diff)
Fix radeon for BSD.
-rw-r--r--shared-core/radeon_cp.c6
-rw-r--r--shared/radeon_cp.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c
index 6a05490b..6994fe9e 100644
--- a/shared-core/radeon_cp.c
+++ b/shared-core/radeon_cp.c
@@ -1395,7 +1395,11 @@ void radeon_do_release( drm_device_t *dev )
/* Stop the cp */
while ((ret = radeon_do_cp_idle( dev_priv )) != 0) {
DRM_DEBUG("radeon_do_cp_idle %d\n", ret);
- schedule(); /* BSD? */
+#ifdef __linux__
+ schedule();
+#else
+ tsleep(&ret, PZERO, "rdnrel", 1);
+#endif
}
radeon_do_cp_stop( dev_priv );
radeon_do_engine_reset( dev );
diff --git a/shared/radeon_cp.c b/shared/radeon_cp.c
index 6a05490b..6994fe9e 100644
--- a/shared/radeon_cp.c
+++ b/shared/radeon_cp.c
@@ -1395,7 +1395,11 @@ void radeon_do_release( drm_device_t *dev )
/* Stop the cp */
while ((ret = radeon_do_cp_idle( dev_priv )) != 0) {
DRM_DEBUG("radeon_do_cp_idle %d\n", ret);
- schedule(); /* BSD? */
+#ifdef __linux__
+ schedule();
+#else
+ tsleep(&ret, PZERO, "rdnrel", 1);
+#endif
}
radeon_do_cp_stop( dev_priv );
radeon_do_engine_reset( dev );