提交 78ecf091 编写于 作者: T Thomas Hellstrom 提交者: Dave Airlie

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: NThomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 9a298b2a
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册