diff options
| author | Keith Packard <keithp@keithp.com> | 2008-06-03 21:49:51 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2008-06-03 21:49:57 -0700 | 
| commit | 0903de0c8f7d2566c1bd65600142a71572eec07e (patch) | |
| tree | 32609a20393f426afb4d7b5b0a23b587e3e67304 /linux-core | |
| parent | 8a3b510405f9fc6c920c456e3481bddd296a2af7 (diff) | |
Drop struct_mutex while waiting in drm_client_lock_take
struct_mutex cannot be held while blocking on DRM lock.
Diffstat (limited to 'linux-core')
| -rw-r--r-- | linux-core/drm_lock.c | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/linux-core/drm_lock.c b/linux-core/drm_lock.c index 58c5f08d..e6eae42b 100644 --- a/linux-core/drm_lock.c +++ b/linux-core/drm_lock.c @@ -393,6 +393,7 @@ int drm_client_lock_take(struct drm_device *dev, struct drm_file *file_priv)  	if (drm_i_have_hw_lock(dev, file_priv))  		return 0; +	mutex_unlock (&dev->struct_mutex);  	/* Client doesn't hold the lock.  Block taking the lock with the kernel  	 * context on behalf of the client, and return whether we were  	 * successful. @@ -407,15 +408,15 @@ int drm_client_lock_take(struct drm_device *dev, struct drm_file *file_priv)  	dev->lock.user_waiters--;  	if (ret != 0) {  		spin_unlock_irqrestore(&dev->lock.spinlock, irqflags); -		return ret;  	} else {  		dev->lock.file_priv = file_priv;  		dev->lock.lock_time = jiffies;  		dev->lock.kernel_held = 1;  		file_priv->lock_count++;  		spin_unlock_irqrestore(&dev->lock.spinlock, irqflags); -		return 0;  	} +	mutex_lock (&dev->struct_mutex); +	return ret;  }  EXPORT_SYMBOL(drm_client_lock_take);  | 
