提交 3d3a5b32 编写于 作者: T Thomas Hellstrom 提交者: Dave Airlie

drm/vmwgfx: Return -ERESTARTSYS when interrupted by a signal.

Fixes for TTM API change.
Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: NJakob Bornecrantz <jakob@vmware.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 e1f78003
...@@ -386,7 +386,7 @@ static int vmw_validate_single_buffer(struct vmw_private *dev_priv, ...@@ -386,7 +386,7 @@ static int vmw_validate_single_buffer(struct vmw_private *dev_priv,
return 0; return 0;
ret = vmw_gmr_bind(dev_priv, bo); ret = vmw_gmr_bind(dev_priv, bo);
if (likely(ret == 0 || ret == -ERESTART)) if (likely(ret == 0 || ret == -ERESTARTSYS))
return ret; return ret;
...@@ -429,7 +429,7 @@ int vmw_execbuf_ioctl(struct drm_device *dev, void *data, ...@@ -429,7 +429,7 @@ int vmw_execbuf_ioctl(struct drm_device *dev, void *data,
ret = mutex_lock_interruptible(&dev_priv->cmdbuf_mutex); ret = mutex_lock_interruptible(&dev_priv->cmdbuf_mutex);
if (unlikely(ret != 0)) { if (unlikely(ret != 0)) {
ret = -ERESTART; ret = -ERESTARTSYS;
goto out_no_cmd_mutex; goto out_no_cmd_mutex;
} }
......
...@@ -191,7 +191,7 @@ static int vmw_fifo_wait_noirq(struct vmw_private *dev_priv, ...@@ -191,7 +191,7 @@ static int vmw_fifo_wait_noirq(struct vmw_private *dev_priv,
} }
schedule_timeout(1); schedule_timeout(1);
if (interruptible && signal_pending(current)) { if (interruptible && signal_pending(current)) {
ret = -ERESTART; ret = -ERESTARTSYS;
break; break;
} }
} }
...@@ -237,9 +237,7 @@ static int vmw_fifo_wait(struct vmw_private *dev_priv, ...@@ -237,9 +237,7 @@ static int vmw_fifo_wait(struct vmw_private *dev_priv,
(dev_priv->fifo_queue, (dev_priv->fifo_queue,
!vmw_fifo_is_full(dev_priv, bytes), timeout); !vmw_fifo_is_full(dev_priv, bytes), timeout);
if (unlikely(ret == -ERESTARTSYS)) if (unlikely(ret == 0))
ret = -ERESTART;
else if (unlikely(ret == 0))
ret = -EBUSY; ret = -EBUSY;
else if (likely(ret > 0)) else if (likely(ret > 0))
ret = 0; ret = 0;
......
...@@ -155,7 +155,7 @@ int vmw_fallback_wait(struct vmw_private *dev_priv, ...@@ -155,7 +155,7 @@ int vmw_fallback_wait(struct vmw_private *dev_priv,
TASK_UNINTERRUPTIBLE); TASK_UNINTERRUPTIBLE);
} }
if (interruptible && signal_pending(current)) { if (interruptible && signal_pending(current)) {
ret = -ERESTART; ret = -ERESTARTSYS;
break; break;
} }
} }
...@@ -218,9 +218,7 @@ int vmw_wait_fence(struct vmw_private *dev_priv, ...@@ -218,9 +218,7 @@ int vmw_wait_fence(struct vmw_private *dev_priv,
vmw_fence_signaled(dev_priv, sequence), vmw_fence_signaled(dev_priv, sequence),
timeout); timeout);
if (unlikely(ret == -ERESTARTSYS)) if (unlikely(ret == 0))
ret = -ERESTART;
else if (unlikely(ret == 0))
ret = -EBUSY; ret = -EBUSY;
else if (likely(ret > 0)) else if (likely(ret > 0))
ret = 0; ret = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册