Skip to content

Commit

Permalink
ttm: Return -ERESTART when a signal interrupts bo eviction.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
  • Loading branch information
thomashvmw authored and airlied committed Jun 18, 2009
1 parent 9a298b2 commit 78ecf09
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/gpu/drm/ttm/ttm_bo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 78ecf09

Please sign in to comment.