diff options
author | Emily Deng <Emily.Deng@amd.com> | 2025-06-03 17:11:54 +0800 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2025-06-11 13:14:43 +0200 |
commit | 4e16a9a00239db5d819197b9a00f70665951bf50 (patch) | |
tree | 140028e3d3247b2fdebda73ba1e67eabf78643fb | |
parent | 6e3a1433fa41e9b321ff66253501ba22aad26c0f (diff) |
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: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250603091154.3472646-1-Emily.Deng@amd.com
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_resource.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c index 769b0ca9be47..006202fcd3c2 100644 --- a/drivers/gpu/drm/ttm/ttm_resource.c +++ b/drivers/gpu/drm/ttm/ttm_resource.c @@ -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); |