aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2009-12-08 06:59:34 -0500
committerDave Airlie <airlied@redhat.com>2009-12-22 19:05:47 -0500
commit3d3a5b3290043618e8409f3fb68a63de6156fdd4 (patch)
treec2d7a98ae0e54d997ba56eb90cbd81bc176200ff
parente1f7800315d78686481b27b113a3317ac687b6bf (diff)
drm/vmwgfx: Return -ERESTARTSYS when interrupted by a signal.
Fixes for TTM API change. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c4
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c6
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_irq.c6
3 files changed, 6 insertions, 10 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
index 7a39f3e6dc2c..7e73cf51e298 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
@@ -386,7 +386,7 @@ static int vmw_validate_single_buffer(struct vmw_private *dev_priv,
386 return 0; 386 return 0;
387 387
388 ret = vmw_gmr_bind(dev_priv, bo); 388 ret = vmw_gmr_bind(dev_priv, bo);
389 if (likely(ret == 0 || ret == -ERESTART)) 389 if (likely(ret == 0 || ret == -ERESTARTSYS))
390 return ret; 390 return ret;
391 391
392 392
@@ -429,7 +429,7 @@ int vmw_execbuf_ioctl(struct drm_device *dev, void *data,
429 429
430 ret = mutex_lock_interruptible(&dev_priv->cmdbuf_mutex); 430 ret = mutex_lock_interruptible(&dev_priv->cmdbuf_mutex);
431 if (unlikely(ret != 0)) { 431 if (unlikely(ret != 0)) {
432 ret = -ERESTART; 432 ret = -ERESTARTSYS;
433 goto out_no_cmd_mutex; 433 goto out_no_cmd_mutex;
434 } 434 }
435 435
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
index 76b0693e2458..01feb48af333 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
@@ -191,7 +191,7 @@ static int vmw_fifo_wait_noirq(struct vmw_private *dev_priv,
191 } 191 }
192 schedule_timeout(1); 192 schedule_timeout(1);
193 if (interruptible && signal_pending(current)) { 193 if (interruptible && signal_pending(current)) {
194 ret = -ERESTART; 194 ret = -ERESTARTSYS;
195 break; 195 break;
196 } 196 }
197 } 197 }
@@ -237,9 +237,7 @@ static int vmw_fifo_wait(struct vmw_private *dev_priv,
237 (dev_priv->fifo_queue, 237 (dev_priv->fifo_queue,
238 !vmw_fifo_is_full(dev_priv, bytes), timeout); 238 !vmw_fifo_is_full(dev_priv, bytes), timeout);
239 239
240 if (unlikely(ret == -ERESTARTSYS)) 240 if (unlikely(ret == 0))
241 ret = -ERESTART;
242 else if (unlikely(ret == 0))
243 ret = -EBUSY; 241 ret = -EBUSY;
244 else if (likely(ret > 0)) 242 else if (likely(ret > 0))
245 ret = 0; 243 ret = 0;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c b/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c
index 9e0f0306eedb..d40086fc8647 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c
@@ -155,7 +155,7 @@ int vmw_fallback_wait(struct vmw_private *dev_priv,
155 TASK_UNINTERRUPTIBLE); 155 TASK_UNINTERRUPTIBLE);
156 } 156 }
157 if (interruptible && signal_pending(current)) { 157 if (interruptible && signal_pending(current)) {
158 ret = -ERESTART; 158 ret = -ERESTARTSYS;
159 break; 159 break;
160 } 160 }
161 } 161 }
@@ -218,9 +218,7 @@ int vmw_wait_fence(struct vmw_private *dev_priv,
218 vmw_fence_signaled(dev_priv, sequence), 218 vmw_fence_signaled(dev_priv, sequence),
219 timeout); 219 timeout);
220 220
221 if (unlikely(ret == -ERESTARTSYS)) 221 if (unlikely(ret == 0))
222 ret = -ERESTART;
223 else if (unlikely(ret == 0))
224 ret = -EBUSY; 222 ret = -EBUSY;
225 else if (likely(ret > 0)) 223 else if (likely(ret > 0))
226 ret = 0; 224 ret = 0;