Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78ecf091 authored by Thomas Hellstrom's avatar Thomas Hellstrom Committed by Dave Airlie
Browse files

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: default avatarThomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 9a298b2a
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -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);
	ret = ttm_bo_wait(bo, false, interruptible, no_wait);
	spin_unlock(&bo->lock);
	spin_unlock(&bo->lock);


	if (ret && ret != -ERESTART) {
	if (unlikely(ret != 0)) {
		printk(KERN_ERR TTM_PFX "Failed to expire sync object before "
		if (ret != -ERESTART) {
			printk(KERN_ERR TTM_PFX
			       "Failed to expire sync object before "
			       "buffer eviction.\n");
			       "buffer eviction.\n");
		}
		goto out;
		goto out;
	}
	}