Skip to content

Commit 26dc173

Browse files
mbrost05gregkh
authored andcommitted
drm/xe: Don't trigger rebind on initial dma-buf validation
[ Upstream commit 16ca06a ] 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) Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Link: https://lore.kernel.org/r/20250825152841.3837378-1-matthew.brost@intel.com (cherry picked from commit ffdf968) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 70f7b37 commit 26dc173

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/xe/xe_bo.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,8 @@ static int xe_bo_move(struct ttm_buffer_object *ttm_bo, bool evict,
796796
}
797797

798798
if (ttm_bo->type == ttm_bo_type_sg) {
799-
ret = xe_bo_move_notify(bo, ctx);
799+
if (new_mem->mem_type == XE_PL_SYSTEM)
800+
ret = xe_bo_move_notify(bo, ctx);
800801
if (!ret)
801802
ret = xe_bo_move_dmabuf(ttm_bo, new_mem);
802803
return ret;

0 commit comments

Comments
 (0)