]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/vmwgfx: Return -ERESTARTSYS when interrupted by a signal.
authorThomas Hellstrom <thellstrom@vmware.com>
Tue, 8 Dec 2009 11:59:34 +0000 (12:59 +0100)
committerDave Airlie <airlied@redhat.com>
Wed, 23 Dec 2009 00:05:47 +0000 (10:05 +1000)
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>
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
drivers/gpu/drm/vmwgfx/vmwgfx_irq.c

index 7a39f3e6dc2ce7c85fb30a76d6290abbd0fa3e61..7e73cf51e2983e0fa0b8d8645091481984a77c87 100644 (file)
@@ -386,7 +386,7 @@ static int vmw_validate_single_buffer(struct vmw_private *dev_priv,
                return 0;
 
        ret = vmw_gmr_bind(dev_priv, bo);
-       if (likely(ret == 0 || ret == -ERESTART))
+       if (likely(ret == 0 || ret == -ERESTARTSYS))
                return ret;
 
 
@@ -429,7 +429,7 @@ int vmw_execbuf_ioctl(struct drm_device *dev, void *data,
 
        ret = mutex_lock_interruptible(&dev_priv->cmdbuf_mutex);
        if (unlikely(ret != 0)) {
-               ret = -ERESTART;
+               ret = -ERESTARTSYS;
                goto out_no_cmd_mutex;
        }
 
index 76b0693e245812523f9b5277297a297de03c749c..01feb48af3334af933c871852f1eb3787502731f 100644 (file)
@@ -191,7 +191,7 @@ static int vmw_fifo_wait_noirq(struct vmw_private *dev_priv,
                }
                schedule_timeout(1);
                if (interruptible && signal_pending(current)) {
-                       ret = -ERESTART;
+                       ret = -ERESTARTSYS;
                        break;
                }
        }
@@ -237,9 +237,7 @@ static int vmw_fifo_wait(struct vmw_private *dev_priv,
                    (dev_priv->fifo_queue,
                     !vmw_fifo_is_full(dev_priv, bytes), timeout);
 
-       if (unlikely(ret == -ERESTARTSYS))
-               ret = -ERESTART;
-       else if (unlikely(ret == 0))
+       if (unlikely(ret == 0))
                ret = -EBUSY;
        else if (likely(ret > 0))
                ret = 0;
index 9e0f0306eedb18b5f3ca5ccf2454d06cb4c9a0db..d40086fc8647abb3f293cd7d9f0baeb31b254db3 100644 (file)
@@ -155,7 +155,7 @@ int vmw_fallback_wait(struct vmw_private *dev_priv,
                                            TASK_UNINTERRUPTIBLE);
                }
                if (interruptible && signal_pending(current)) {
-                       ret = -ERESTART;
+                       ret = -ERESTARTSYS;
                        break;
                }
        }
@@ -218,9 +218,7 @@ int vmw_wait_fence(struct vmw_private *dev_priv,
                     vmw_fence_signaled(dev_priv, sequence),
                     timeout);
 
-       if (unlikely(ret == -ERESTARTSYS))
-               ret = -ERESTART;
-       else if (unlikely(ret == 0))
+       if (unlikely(ret == 0))
                ret = -EBUSY;
        else if (likely(ret > 0))
                ret = 0;