diff options
Diffstat (limited to 'drivers/char/drm/drm_lock.c')
-rw-r--r-- | drivers/char/drm/drm_lock.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/char/drm/drm_lock.c b/drivers/char/drm/drm_lock.c index f9e45303498d..116ed0f2ac09 100644 --- a/drivers/char/drm/drm_lock.c +++ b/drivers/char/drm/drm_lock.c | |||
@@ -155,6 +155,7 @@ int drm_unlock(struct inode *inode, struct file *filp, | |||
155 | drm_file_t *priv = filp->private_data; | 155 | drm_file_t *priv = filp->private_data; |
156 | drm_device_t *dev = priv->head->dev; | 156 | drm_device_t *dev = priv->head->dev; |
157 | drm_lock_t lock; | 157 | drm_lock_t lock; |
158 | unsigned long irqflags; | ||
158 | 159 | ||
159 | if (copy_from_user(&lock, (drm_lock_t __user *) arg, sizeof(lock))) | 160 | if (copy_from_user(&lock, (drm_lock_t __user *) arg, sizeof(lock))) |
160 | return -EFAULT; | 161 | return -EFAULT; |
@@ -165,6 +166,16 @@ int drm_unlock(struct inode *inode, struct file *filp, | |||
165 | return -EINVAL; | 166 | return -EINVAL; |
166 | } | 167 | } |
167 | 168 | ||
169 | spin_lock_irqsave(&dev->tasklet_lock, irqflags); | ||
170 | |||
171 | if (dev->locked_tasklet_func) { | ||
172 | dev->locked_tasklet_func(dev); | ||
173 | |||
174 | dev->locked_tasklet_func = NULL; | ||
175 | } | ||
176 | |||
177 | spin_unlock_irqrestore(&dev->tasklet_lock, irqflags); | ||
178 | |||
168 | atomic_inc(&dev->counts[_DRM_STAT_UNLOCKS]); | 179 | atomic_inc(&dev->counts[_DRM_STAT_UNLOCKS]); |
169 | 180 | ||
170 | /* kernel_context_switch isn't used by any of the x86 drm | 181 | /* kernel_context_switch isn't used by any of the x86 drm |