summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm/drm_lock.c
diff options
context:
space:
mode:
authorrnoland <rnoland@FreeBSD.org>2008-08-30 01:00:18 +0000
committerrnoland <rnoland@FreeBSD.org>2008-08-30 01:00:18 +0000
commited05e5e34af45609295906f66e177d604e4302be (patch)
tree30ca79f4ebfd1e4b22a87041318419f534fce899 /sys/dev/drm/drm_lock.c
parentc2591857ab2b84b4aa872a6e3b15472f3f69702c (diff)
downloadFreeBSD-src-ed05e5e34af45609295906f66e177d604e4302be.zip
FreeBSD-src-ed05e5e34af45609295906f66e177d604e4302be.tar.gz
Don't return EINVAL when trying to unlock.
anholt thinks that he added this check as part of some regression testing, but it is failing at least some of the time. I don't want to remove it just yet. I added a bit of debugging to help identify the issue. Approved by: kib
Diffstat (limited to 'sys/dev/drm/drm_lock.c')
-rw-r--r--sys/dev/drm/drm_lock.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/drm/drm_lock.c b/sys/dev/drm/drm_lock.c
index c82ab9b..938954c 100644
--- a/sys/dev/drm/drm_lock.c
+++ b/sys/dev/drm/drm_lock.c
@@ -171,18 +171,23 @@ int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv)
{
drm_lock_t *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;
}
+#if 0
/* 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;
-
+#endif
DRM_SPINLOCK(&dev->tsk_lock);
if (dev->locked_task_call != NULL) {
dev->locked_task_call(dev);
OpenPOWER on IntegriCloud