summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 );