We shouldn't need to drop and reaquire the lock here.

MFC after:	3 days
This commit is contained in:
rnoland 2009-06-25 19:23:25 +00:00
parent 3727f1aa7d
commit 8bd1f80d45

View File

@ -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);