svn commit: r189869 - head/sys/dev/drm

Robert Noland rnoland at FreeBSD.org
Mon Mar 16 01:19:12 PDT 2009


Author: rnoland
Date: Mon Mar 16 08:19:11 2009
New Revision: 189869
URL: http://svn.freebsd.org/changeset/base/189869

Log:
  Get rid of any remaining PZERO flags in mtx_sleep()
  
  Also, clean up some ifdef mess while I'm here.
  
  MFC after:	3 days

Modified:
  head/sys/dev/drm/drm_drv.c
  head/sys/dev/drm/drm_lock.c
  head/sys/dev/drm/radeon_cp.c

Modified: head/sys/dev/drm/drm_drv.c
==============================================================================
--- head/sys/dev/drm/drm_drv.c	Mon Mar 16 08:15:35 2009	(r189868)
+++ head/sys/dev/drm/drm_drv.c	Mon Mar 16 08:19:11 2009	(r189869)
@@ -666,7 +666,7 @@ void drm_close(void *data)
 			}
 			/* Contention */
 			retcode = mtx_sleep((void *)&dev->lock.lock_queue,
-			    &dev->dev_lock, PZERO | PCATCH, "drmlk2", 0);
+			    &dev->dev_lock, PCATCH, "drmlk2", 0);
 			if (retcode)
 				break;
 		}

Modified: head/sys/dev/drm/drm_lock.c
==============================================================================
--- head/sys/dev/drm/drm_lock.c	Mon Mar 16 08:15:35 2009	(r189868)
+++ head/sys/dev/drm/drm_lock.c	Mon Mar 16 08:19:11 2009	(r189869)
@@ -82,7 +82,7 @@ int drm_lock(struct drm_device *dev, voi
 
 		/* Contention */
 		ret = mtx_sleep((void *)&dev->lock.lock_queue, &dev->dev_lock,
-		    PZERO | PCATCH, "drmlk2", 0);
+		    PCATCH, "drmlk2", 0);
 		if (ret != 0)
 			break;
 	}

Modified: head/sys/dev/drm/radeon_cp.c
==============================================================================
--- head/sys/dev/drm/radeon_cp.c	Mon Mar 16 08:15:35 2009	(r189868)
+++ head/sys/dev/drm/radeon_cp.c	Mon Mar 16 08:19:11 2009	(r189869)
@@ -1708,26 +1708,14 @@ void radeon_do_release(struct drm_device
 			if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) {
 				while ((ret = r600_do_cp_idle(dev_priv)) != 0) {
 					DRM_DEBUG("radeon_do_cp_idle %d\n", ret);
-#ifdef __linux__
-					schedule();
-#elsif defined(__FreeBSD__)
 					mtx_sleep(&ret, &dev->dev_lock, 0,
 					    "rdnrel", 1);
-#else
-					tsleep(&ret, PZERO, "rdnrel", 1);
-#endif
 				}
 			} else {
 				while ((ret = radeon_do_cp_idle(dev_priv)) != 0) {
 					DRM_DEBUG("radeon_do_cp_idle %d\n", ret);
-#ifdef __linux__
-					schedule();
-#elsif defined(__FreeBSD__)
 					mtx_sleep(&ret, &dev->dev_lock, 0,
 					    "rdnrel", 1);
-#else
-					tsleep(&ret, PZERO, "rdnrel", 1);
-#endif
 				}
 			}
 			if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) {


More information about the svn-src-head mailing list