Lines Matching full:attach
26 struct dma_buf_attachment *attach) in xe_dma_buf_attach() argument
28 struct drm_gem_object *obj = attach->dmabuf->priv; in xe_dma_buf_attach()
30 if (attach->peer2peer && in xe_dma_buf_attach()
31 pci_p2pdma_distance(to_pci_dev(obj->dev->dev), attach->dev, false) < 0) in xe_dma_buf_attach()
32 attach->peer2peer = false; in xe_dma_buf_attach()
34 if (!attach->peer2peer && !xe_bo_can_migrate(gem_to_xe_bo(obj), XE_PL_TT)) in xe_dma_buf_attach()
42 struct dma_buf_attachment *attach) in xe_dma_buf_detach() argument
44 struct drm_gem_object *obj = attach->dmabuf->priv; in xe_dma_buf_detach()
49 static int xe_dma_buf_pin(struct dma_buf_attachment *attach) in xe_dma_buf_pin() argument
51 struct drm_gem_object *obj = attach->dmabuf->priv; in xe_dma_buf_pin()
81 static void xe_dma_buf_unpin(struct dma_buf_attachment *attach) in xe_dma_buf_unpin() argument
83 struct drm_gem_object *obj = attach->dmabuf->priv; in xe_dma_buf_unpin()
89 static struct sg_table *xe_dma_buf_map(struct dma_buf_attachment *attach, in xe_dma_buf_map() argument
92 struct dma_buf *dma_buf = attach->dmabuf; in xe_dma_buf_map()
98 if (!attach->peer2peer && !xe_bo_can_migrate(bo, XE_PL_TT)) in xe_dma_buf_map()
102 if (!attach->peer2peer) in xe_dma_buf_map()
118 if (dma_map_sgtable(attach->dev, sgt, dir, in xe_dma_buf_map()
127 bo->ttm.base.size, attach->dev, in xe_dma_buf_map()
144 static void xe_dma_buf_unmap(struct dma_buf_attachment *attach, in xe_dma_buf_unmap() argument
148 struct dma_buf *dma_buf = attach->dmabuf; in xe_dma_buf_unmap()
152 dma_unmap_sgtable(attach->dev, sgt, dir, 0); in xe_dma_buf_unmap()
156 xe_ttm_vram_mgr_free_sgt(attach->dev, dir, sgt); in xe_dma_buf_unmap()
180 .attach = xe_dma_buf_attach,
234 static void xe_dma_buf_move_notify(struct dma_buf_attachment *attach) in xe_dma_buf_move_notify() argument
236 struct drm_gem_object *obj = attach->importer_priv; in xe_dma_buf_move_notify()
267 struct dma_buf_attachment *attach; in xe_gem_prime_import() local
299 attach = dma_buf_dynamic_attach(dma_buf, dev->dev, attach_ops, &bo->ttm.base); in xe_gem_prime_import()
300 if (IS_ERR(attach)) { in xe_gem_prime_import()
301 obj = ERR_CAST(attach); in xe_gem_prime_import()
312 obj->import_attach = attach; in xe_gem_prime_import()