Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jun 2009 19:23:25 +0000 (UTC)
From:      Robert Noland <rnoland@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r194996 - head/sys/dev/drm
Message-ID:  <200906251923.n5PJNPO9062268@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rnoland
Date: Thu Jun 25 19:23:25 2009
New Revision: 194996
URL: http://svn.freebsd.org/changeset/base/194996

Log:
  We shouldn't need to drop and reaquire the lock here.
  
  MFC after:	3 days

Modified:
  head/sys/dev/drm/i915_dma.c

Modified: head/sys/dev/drm/i915_dma.c
==============================================================================
--- head/sys/dev/drm/i915_dma.c	Thu Jun 25 19:16:29 2009	(r194995)
+++ head/sys/dev/drm/i915_dma.c	Thu Jun 25 19:23:25 2009	(r194996)
@@ -644,18 +644,17 @@ static int i915_batchbuffer(struct drm_d
 			return -EFAULT;
 		}
 	}
-	DRM_LOCK();
 
 	ret = i915_dispatch_batchbuffer(dev, batch);
 
-	if (sarea_priv)
-		sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv);
-
-	DRM_UNLOCK();
 	if (batch->num_cliprects)
 		vsunlock(batch->cliprects, cliplen);
+
 	DRM_LOCK();
 
+	if (sarea_priv)
+		sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv);
+
 	return ret;
 }
 
@@ -697,10 +696,9 @@ static int i915_cmdbuffer(struct drm_dev
 			return -EFAULT;
 		}
 	}
-	DRM_LOCK();
 
 	ret = i915_dispatch_cmdbuffer(dev, cmdbuf);
-	DRM_UNLOCK();
+
 	if (cmdbuf->num_cliprects) {
 		vsunlock(cmdbuf->buf, cmdbuf->sz);
 		vsunlock(cmdbuf->cliprects, cliplen);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906251923.n5PJNPO9062268>