diff options
author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-09 15:26:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-09 15:26:37 -0500 |
commit | 9b3a89f8b052f2a6193a9691e053f986144a65a0 (patch) | |
tree | 7b0eded20824f92eba8372628b06ec6e887c8c7e /drivers/char/drm/drm_lock.c | |
parent | 4594bf159f1962cec3b727954b7c598b07e2e737 (diff) | |
parent | d942625c2d5f5d29cd3bb4fad8a4aadd59024317 (diff) |
Merge branch 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (21 commits)
Fix http://bugzilla.kernel.org/show_bug.cgi?id=7606
drm: add flag for mapping PCI DMA buffers read-only.
drm: fix up irqflags in drm_lock.c
drm: i915 updates
drm: i915: fix up irqflags arg
drm: i915: Only return EBUSY after we've established we need to schedule a new swap.
drm: i915: Fix 'sequence has passed' condition in i915_vblank_swap().
drm: i915: Add SAREA fileds for determining which pipe to sync window buffer swaps to.
drm: Make handling of dev_priv->vblank_pipe more robust.
drm: DRM_I915_VBLANK_SWAP ioctl: Take drm_vblank_seq_type_t instead
drm: i915: Add ioctl for scheduling buffer swaps at vertical blanks.
drm: Core vsync: Don't clobber target sequence number when scheduling signal.
drm: Core vsync: Add flag DRM_VBLANK_NEXTONMISS.
drm: Make locked tasklet handling more robust.
drm: drm_rmdraw: Declare id and idx as signed so testing for < 0 works as intended.
drm: Change first valid DRM drawable ID to be 1 instead of 0.
drm: drawable locking + memory management fixes + copyright
drm: Add support for interrupt triggered driver callback with lock held to DRM core.
drm: Add support for tracking drawable information to core
drm: add support for secondary vertical blank interrupt to i915
...
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 |