Use msleep instead of tsleep to drop the DRM device lock and avoid a
authorEric Anholt <anholt@freebsd.org>
Tue, 26 Apr 2005 05:11:20 +0000 (05:11 +0000)
committerEric Anholt <anholt@freebsd.org>
Tue, 26 Apr 2005 05:11:20 +0000 (05:11 +0000)
    sleep-with- mutex held. This probably ought to be an os-independent
    sleep function ala DRM_USLEEP.

shared-core/radeon_cp.c

index 7a06930..611385c 100644 (file)
@@ -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);