All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/ttm: Don't evict SG BOs
@ 2021-04-28  5:33 ` Felix Kuehling
  0 siblings, 0 replies; 22+ messages in thread
From: Felix Kuehling @ 2021-04-28  5:33 UTC (permalink / raw)
  To: dri-devel, amd-gfx

SG BOs do not occupy space that is managed by TTM. So do not evict them.

This fixes unexpected evictions of KFD's userptr BOs. KFD only expects
userptr "evictions" in the form of MMU notifiers.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
---
 drivers/gpu/drm/ttm/ttm_bo.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index de1ec838cf8b..0b953654fdbf 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -655,6 +655,10 @@ int ttm_mem_evict_first(struct ttm_device *bdev,
 		list_for_each_entry(bo, &man->lru[i], lru) {
 			bool busy;
 
+			/* Don't evict SG BOs */
+			if (bo->ttm && bo->ttm->sg)
+				continue;
+
 			if (!ttm_bo_evict_swapout_allowable(bo, ctx, &locked,
 							    &busy)) {
 				if (busy && !busy_bo && ticket !=
-- 
2.31.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2021-04-28 17:02 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-28  5:33 [PATCH 1/2] drm/ttm: Don't evict SG BOs Felix Kuehling
2021-04-28  5:33 ` Felix Kuehling
2021-04-28  5:33 ` [PATCH 2/2] drm/ttm: Fix swapout in ttm_tt_populate Felix Kuehling
2021-04-28  5:33   ` Felix Kuehling
2021-04-28  7:03   ` Christian König
2021-04-28  7:03     ` Christian König
2021-04-28  7:04 ` [PATCH 1/2] drm/ttm: Don't evict SG BOs Christian König
2021-04-28  7:04   ` Christian König
2021-04-28  7:49   ` Felix Kuehling
2021-04-28  7:49     ` Felix Kuehling
2021-04-28  9:05     ` Christian König
2021-04-28  9:05       ` Christian König
2021-04-28 15:19       ` Felix Kuehling
2021-04-28 15:19         ` Felix Kuehling
2021-04-28 16:33         ` Christian König
2021-04-28 16:33           ` Christian König
2021-04-28 16:49           ` Felix Kuehling
2021-04-28 16:49             ` Felix Kuehling
2021-04-28 16:58             ` Christian König
2021-04-28 16:58               ` Christian König
2021-04-28 17:02               ` Felix Kuehling
2021-04-28 17:02                 ` Felix Kuehling

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.