summaryrefslogtreecommitdiff
path: root/bsd-core/drm_lock.c
diff options
context:
space:
mode:
authorRobert Noland <rnoland@2hip.net>2008-10-23 15:42:49 -0400
committerRobert Noland <rnoland@2hip.net>2008-10-23 15:42:49 -0400
commit7dbeb18777a4dc1e7eb3c6bc4da3e72456afc8fc (patch)
treed08ae6278afc445a41b41933875705143f2fd911 /bsd-core/drm_lock.c
parenta59ea02ff839fa0801763a90beb8b232b933c746 (diff)
[FreeBSD] This check isn't correct and causes at least mga to lockup.
Diffstat (limited to 'bsd-core/drm_lock.c')
-rw-r--r--bsd-core/drm_lock.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/bsd-core/drm_lock.c b/bsd-core/drm_lock.c
index 685b0ea3..dec7281a 100644
--- a/bsd-core/drm_lock.c
+++ b/bsd-core/drm_lock.c
@@ -102,17 +102,15 @@ int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv)
{
struct drm_lock *lock = data;
+ DRM_DEBUG("%d (pid %d) requests unlock (0x%08x), flags = 0x%08x\n",
+ lock->context, DRM_CURRENTPID, dev->lock.hw_lock->lock,
+ lock->flags);
+
if (lock->context == DRM_KERNEL_CONTEXT) {
DRM_ERROR("Process %d using kernel context %d\n",
DRM_CURRENTPID, lock->context);
return EINVAL;
}
- /* Check that the context unlock being requested actually matches
- * who currently holds the lock.
- */
- if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock) ||
- _DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock) != lock->context)
- return EINVAL;
DRM_SPINLOCK(&dev->tsk_lock);
if (dev->locked_task_call != NULL) {