summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm
diff options
context:
space:
mode:
authorrnoland <rnoland@FreeBSD.org>2009-06-25 19:23:25 +0000
committerrnoland <rnoland@FreeBSD.org>2009-06-25 19:23:25 +0000
commit8bd1f80d4555d094dd02761d4c1e14c79e18a6e3 (patch)
tree3019d82c6fb3d55cb12cff25ed183585ec9e9538 /sys/dev/drm
parent3727f1aa7d9d8bcd674816e0fbcff34b8e6beb30 (diff)
downloadFreeBSD-src-8bd1f80d4555d094dd02761d4c1e14c79e18a6e3.zip
FreeBSD-src-8bd1f80d4555d094dd02761d4c1e14c79e18a6e3.tar.gz
We shouldn't need to drop and reaquire the lock here.
MFC after: 3 days
Diffstat (limited to 'sys/dev/drm')
-rw-r--r--sys/dev/drm/i915_dma.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/dev/drm/i915_dma.c b/sys/dev/drm/i915_dma.c
index d2f27b6..386c058 100644
--- a/sys/dev/drm/i915_dma.c
+++ b/sys/dev/drm/i915_dma.c
@@ -644,18 +644,17 @@ static int i915_batchbuffer(struct drm_device *dev, void *data,
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_device *dev, void *data,
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);
OpenPOWER on IntegriCloud