All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/xe: Don't trigger rebind on initial dma-buf validation
@ 2025-08-25 15:28 Matthew Brost
  2025-08-25 15:38 ` Thomas Hellström
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Matthew Brost @ 2025-08-25 15:28 UTC (permalink / raw)
  To: intel-xe; +Cc: thomas.hellstrom, matthew.auld

On the first validate of an imported dma-buf (initial bind), the device
has no GPU mappings, so a rebind is unnecessary. Rebinding here is
harmful in multi-GPU setups and for VMs using preempt-fence mode, as it
would evict in-flight GPU work.

v2:
 - Drop dma_buf_validated, check for XE_PL_SYSTEM (Thomas)

Signed-off-by: Matthee Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/xe/xe_bo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index 6fea39842e1e..a0630e120cd2 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -816,7 +816,8 @@ static int xe_bo_move(struct ttm_buffer_object *ttm_bo, bool evict,
 	}
 
 	if (ttm_bo->type == ttm_bo_type_sg) {
-		ret = xe_bo_move_notify(bo, ctx);
+		if (new_mem->mem_type == XE_PL_SYSTEM)
+			ret = xe_bo_move_notify(bo, ctx);
 		if (!ret)
 			ret = xe_bo_move_dmabuf(ttm_bo, new_mem);
 		return ret;
-- 
2.34.1


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

end of thread, other threads:[~2025-08-26 12:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-25 15:28 [PATCH v2] drm/xe: Don't trigger rebind on initial dma-buf validation Matthew Brost
2025-08-25 15:38 ` Thomas Hellström
2025-08-25 15:51 ` ✗ CI.checkpatch: warning for drm/xe: Don't trigger rebind on initial dma-buf validation (rev2) Patchwork
2025-08-25 15:53 ` ✓ CI.KUnit: success " Patchwork
2025-08-25 16:40 ` ✓ Xe.CI.BAT: " Patchwork
2025-08-25 22:41 ` ✗ Xe.CI.Full: failure " Patchwork
2025-08-26 12:42 ` [PATCH v2] drm/xe: Don't trigger rebind on initial dma-buf validation Upadhyay, Tejas

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.