summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ttm
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2009-06-17 12:29:55 +0200
committerDave Airlie <airlied@redhat.com>2009-06-19 09:01:02 +1000
commit78ecf091aa592a9e160ebbbfa5873c2bb2e2d0f8 (patch)
treefec828d3355ccbb45d95cfbbf229c32198eff8c2 /drivers/gpu/drm/ttm
parent9a298b2acd771d8a5c0004d8f8e4156c65b11f6b (diff)
downloadlinux-stable-78ecf091aa592a9e160ebbbfa5873c2bb2e2d0f8.tar.gz
linux-stable-78ecf091aa592a9e160ebbbfa5873c2bb2e2d0f8.tar.bz2
linux-stable-78ecf091aa592a9e160ebbbfa5873c2bb2e2d0f8.zip
ttm: Return -ERESTART when a signal interrupts bo eviction.
A bug caused the ttm code to just terminate the wait when a signal was received while waiting for the GPU to release a buffer object that was to be evicted. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 1587aeca7bea..b82ba6e5a586 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -527,9 +527,12 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo, unsigned mem_type,
ret = ttm_bo_wait(bo, false, interruptible, no_wait);
spin_unlock(&bo->lock);
- if (ret && ret != -ERESTART) {
- printk(KERN_ERR TTM_PFX "Failed to expire sync object before "
- "buffer eviction.\n");
+ if (unlikely(ret != 0)) {
+ if (ret != -ERESTART) {
+ printk(KERN_ERR TTM_PFX
+ "Failed to expire sync object before "
+ "buffer eviction.\n");
+ }
goto out;
}