diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2006-01-03 02:18:01 -0500 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-01-03 02:18:01 -0500 |
commit | 97f2aab6698f3ab2552c41c1024a65ffd0763a6d (patch) | |
tree | bb6e3b2949459f54f884c710fc74d40eef00d834 /drivers/char/drm/drm_lock.c | |
parent | d985c1088146607532093d9eaaaf99758f6a4d21 (diff) | |
parent | 88026842b0a760145aa71d69e74fbc9ec118ca44 (diff) |
drm: merge in Linus mainline
Diffstat (limited to 'drivers/char/drm/drm_lock.c')
-rw-r--r-- | drivers/char/drm/drm_lock.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/char/drm/drm_lock.c b/drivers/char/drm/drm_lock.c index f970dc36c18f..f9e45303498d 100644 --- a/drivers/char/drm/drm_lock.c +++ b/drivers/char/drm/drm_lock.c | |||
@@ -104,8 +104,9 @@ int drm_lock(struct inode *inode, struct file *filp, | |||
104 | __set_current_state(TASK_RUNNING); | 104 | __set_current_state(TASK_RUNNING); |
105 | remove_wait_queue(&dev->lock.lock_queue, &entry); | 105 | remove_wait_queue(&dev->lock.lock_queue, &entry); |
106 | 106 | ||
107 | DRM_DEBUG( "%d %s\n", lock.context, ret ? "interrupted" : "has lock" ); | 107 | DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock"); |
108 | if (ret) return ret; | 108 | if (ret) |
109 | return ret; | ||
109 | 110 | ||
110 | sigemptyset(&dev->sigmask); | 111 | sigemptyset(&dev->sigmask); |
111 | sigaddset(&dev->sigmask, SIGSTOP); | 112 | sigaddset(&dev->sigmask, SIGSTOP); |
@@ -121,17 +122,19 @@ int drm_lock(struct inode *inode, struct file *filp, | |||
121 | 122 | ||
122 | if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT)) { | 123 | if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT)) { |
123 | if (dev->driver->dma_quiescent(dev)) { | 124 | if (dev->driver->dma_quiescent(dev)) { |
124 | DRM_DEBUG( "%d waiting for DMA quiescent\n", lock.context); | 125 | DRM_DEBUG("%d waiting for DMA quiescent\n", lock.context); |
125 | return DRM_ERR(EBUSY); | 126 | return DRM_ERR(EBUSY); |
126 | } | 127 | } |
127 | } | 128 | } |
128 | 129 | ||
130 | /* dev->driver->kernel_context_switch isn't used by any of the x86 | ||
131 | * drivers but is used by the Sparc driver. | ||
132 | */ | ||
129 | if (dev->driver->kernel_context_switch && | 133 | if (dev->driver->kernel_context_switch && |
130 | dev->last_context != lock.context) { | 134 | dev->last_context != lock.context) { |
131 | dev->driver->kernel_context_switch(dev, dev->last_context, | 135 | dev->driver->kernel_context_switch(dev, dev->last_context, |
132 | lock.context); | 136 | lock.context); |
133 | } | 137 | } |
134 | |||
135 | return 0; | 138 | return 0; |
136 | } | 139 | } |
137 | 140 | ||