All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] drm/ttm: Should to return the evict error
@ 2025-06-03  9:11 Emily Deng
  2025-06-04  3:17 ` Deng, Emily
  2025-06-04  9:00 ` Christian König
  0 siblings, 2 replies; 7+ messages in thread
From: Emily Deng @ 2025-06-03  9:11 UTC (permalink / raw)
  To: amd-gfx; +Cc: Emily Deng

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>
---
 drivers/gpu/drm/ttm/ttm_resource.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
index 7e5a60c55813..bb84528276cd 100644
--- a/drivers/gpu/drm/ttm/ttm_resource.c
+++ b/drivers/gpu/drm/ttm/ttm_resource.c
@@ -558,6 +558,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);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH v3] drm/ttm: Should to return the evict error
@ 2025-06-03  9:09 Emily Deng
  2025-06-03  9:12 ` Deng, Emily
  0 siblings, 1 reply; 7+ messages in thread
From: Emily Deng @ 2025-06-03  9:09 UTC (permalink / raw)
  To: amd-gfx; +Cc: Emily Deng

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>
---
 drivers/gpu/drm/ttm/ttm_resource.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
index 7e5a60c55813..a9fa903b8e39 100644
--- a/drivers/gpu/drm/ttm/ttm_resource.c
+++ b/drivers/gpu/drm/ttm/ttm_resource.c
@@ -558,6 +558,9 @@ int ttm_resource_manager_evict_all(struct ttm_device *bdev,
 		cond_resched();
 	} while (!ret);
 
+	if (ret != -ENOENT)
+		return ret;
+
 	spin_lock(&man->move_lock);
 	fence = dma_fence_get(man->move);
 	spin_unlock(&man->move_lock);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-06-10  8:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-03  9:11 [PATCH v3] drm/ttm: Should to return the evict error Emily Deng
2025-06-04  3:17 ` Deng, Emily
2025-06-04  9:00 ` Christian König
2025-06-06 16:55   ` Alex Deucher
2025-06-10  8:47     ` Christian König
  -- strict thread matches above, loose matches on Subject: below --
2025-06-03  9:09 Emily Deng
2025-06-03  9:12 ` Deng, Emily

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.