dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Thomas Hellstrom 2009-06-17 12:29:55 +02:00 committed by Dave Airlie
parent 9a298b2acd
commit 78ecf091aa
1 changed files with 6 additions and 3 deletions

View File

@ -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;
}