diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-25 19:48:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-25 19:48:48 -0500 |
commit | 42aacfba6c2d1ee773615cfcfce0fe973d1d0f37 (patch) | |
tree | 1f3b06d516dac26c976cedfc59cd48781b96f86d | |
parent | b3eb67a2ab4e14fc6cc035907400b86462d174db (diff) | |
parent | cf65f1623dd005ddfb1cbba20af3423a6c638dbe (diff) |
Merge branch 'drm-linus' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6
-rw-r--r-- | drivers/char/drm/drm_lock.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/char/drm/drm_lock.c b/drivers/char/drm/drm_lock.c index b276ae8a6633..b48a595d54ec 100644 --- a/drivers/char/drm/drm_lock.c +++ b/drivers/char/drm/drm_lock.c | |||
@@ -104,6 +104,10 @@ 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"); | ||
108 | if (ret) | ||
109 | return ret; | ||
110 | |||
107 | sigemptyset(&dev->sigmask); | 111 | sigemptyset(&dev->sigmask); |
108 | sigaddset(&dev->sigmask, SIGSTOP); | 112 | sigaddset(&dev->sigmask, SIGSTOP); |
109 | sigaddset(&dev->sigmask, SIGTSTP); | 113 | sigaddset(&dev->sigmask, SIGTSTP); |
@@ -116,8 +120,12 @@ int drm_lock(struct inode *inode, struct file *filp, | |||
116 | if (dev->driver->dma_ready && (lock.flags & _DRM_LOCK_READY)) | 120 | if (dev->driver->dma_ready && (lock.flags & _DRM_LOCK_READY)) |
117 | dev->driver->dma_ready(dev); | 121 | dev->driver->dma_ready(dev); |
118 | 122 | ||
119 | if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT)) | 123 | if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT)) { |
120 | return dev->driver->dma_quiescent(dev); | 124 | if (dev->driver->dma_quiescent(dev)) { |
125 | DRM_DEBUG("%d waiting for DMA quiescent\n", lock.context); | ||
126 | return DRM_ERR(EBUSY); | ||
127 | } | ||
128 | } | ||
121 | 129 | ||
122 | /* dev->driver->kernel_context_switch isn't used by any of the x86 | 130 | /* dev->driver->kernel_context_switch isn't used by any of the x86 |
123 | * drivers but is used by the Sparc driver. | 131 | * drivers but is used by the Sparc driver. |
@@ -128,9 +136,7 @@ int drm_lock(struct inode *inode, struct file *filp, | |||
128 | dev->driver->kernel_context_switch(dev, dev->last_context, | 136 | dev->driver->kernel_context_switch(dev, dev->last_context, |
129 | lock.context); | 137 | lock.context); |
130 | } | 138 | } |
131 | DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock"); | 139 | return 0; |
132 | |||
133 | return ret; | ||
134 | } | 140 | } |
135 | 141 | ||
136 | /** | 142 | /** |