Commit 4e16a9a0 authored by Emily Deng's avatar Emily Deng Committed by Christian König
Browse files

drm/ttm: Should to return the evict error



For the evict fail case, the evict error should be returned.

v2: Consider ENOENT case.

v3: Abort directly when the eviction failed for some reason (except for -ENOENT)
 and not wait for the move to finish

Signed-off-by: default avatarEmily Deng <Emily.Deng@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250603091154.3472646-1-Emily.Deng@amd.com
parent 6e3a1433
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -557,6 +557,9 @@ int ttm_resource_manager_evict_all(struct ttm_device *bdev,
		cond_resched();
	} while (!ret);

	if (ret && ret != -ENOENT)
		return ret;

	spin_lock(&man->move_lock);
	fence = dma_fence_get(man->move);
	spin_unlock(&man->move_lock);