summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2005-04-26 05:11:20 +0000
committerEric Anholt <anholt@freebsd.org>2005-04-26 05:11:20 +0000
commit31a06d0baca9e378a773ca8bd350860546dd8a79 (patch)
tree1f8ee92b583c7888dd1376ac829c94b1b8e0b101
parentbe9e67a927ed9583380107b2fb9ddf3bd8a5f128 (diff)
Use msleep instead of tsleep to drop the DRM device lock and avoid a
sleep-with- mutex held. This probably ought to be an os-independent sleep function ala DRM_USLEEP.
-rw-r--r--shared-core/radeon_cp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c
index 7a06930a..611385ce 100644
--- a/shared-core/radeon_cp.c
+++ b/shared-core/radeon_cp.c
@@ -1702,8 +1702,13 @@ void radeon_do_release(drm_device_t * dev)
#ifdef __linux__
schedule();
#else
+#if defined(__FreeBSD__) && __FreeBSD_version > 500000
+ msleep(&ret, &dev->dev_lock, PZERO, "rdnrel",
+ 1);
+#else
tsleep(&ret, PZERO, "rdnrel", 1);
#endif
+#endif
}
radeon_do_cp_stop(dev_priv);
radeon_do_engine_reset(dev);