Lines Matching full:attach

25 			     struct dma_buf_attachment *attach)  in xe_dma_buf_attach()  argument
27 struct drm_gem_object *obj = attach->dmabuf->priv; in xe_dma_buf_attach()
29 if (attach->peer2peer && in xe_dma_buf_attach()
30 pci_p2pdma_distance(to_pci_dev(obj->dev->dev), attach->dev, false) < 0) in xe_dma_buf_attach()
31 attach->peer2peer = false; in xe_dma_buf_attach()
33 if (!attach->peer2peer && !xe_bo_can_migrate(gem_to_xe_bo(obj), XE_PL_TT)) in xe_dma_buf_attach()
41 struct dma_buf_attachment *attach) in xe_dma_buf_detach() argument
43 struct drm_gem_object *obj = attach->dmabuf->priv; in xe_dma_buf_detach()
48 static int xe_dma_buf_pin(struct dma_buf_attachment *attach) in xe_dma_buf_pin() argument
50 struct drm_gem_object *obj = attach->dmabuf->priv; in xe_dma_buf_pin()
80 static void xe_dma_buf_unpin(struct dma_buf_attachment *attach) in xe_dma_buf_unpin() argument
82 struct drm_gem_object *obj = attach->dmabuf->priv; in xe_dma_buf_unpin()
88 static struct sg_table *xe_dma_buf_map(struct dma_buf_attachment *attach, in xe_dma_buf_map() argument
91 struct dma_buf *dma_buf = attach->dmabuf; in xe_dma_buf_map()
97 if (!attach->peer2peer && !xe_bo_can_migrate(bo, XE_PL_TT)) in xe_dma_buf_map()
101 if (!attach->peer2peer) in xe_dma_buf_map()
117 if (dma_map_sgtable(attach->dev, sgt, dir, in xe_dma_buf_map()
126 bo->ttm.base.size, attach->dev, in xe_dma_buf_map()
143 static void xe_dma_buf_unmap(struct dma_buf_attachment *attach, in xe_dma_buf_unmap() argument
147 struct dma_buf *dma_buf = attach->dmabuf; in xe_dma_buf_unmap()
151 dma_unmap_sgtable(attach->dev, sgt, dir, 0); in xe_dma_buf_unmap()
155 xe_ttm_vram_mgr_free_sgt(attach->dev, dir, sgt); in xe_dma_buf_unmap()
179 .attach = xe_dma_buf_attach,
233 static void xe_dma_buf_move_notify(struct dma_buf_attachment *attach) in xe_dma_buf_move_notify() argument
235 struct drm_gem_object *obj = attach->importer_priv; in xe_dma_buf_move_notify()
266 struct dma_buf_attachment *attach; in xe_gem_prime_import() local
298 attach = dma_buf_dynamic_attach(dma_buf, dev->dev, attach_ops, &bo->ttm.base); in xe_gem_prime_import()
299 if (IS_ERR(attach)) { in xe_gem_prime_import()
300 obj = ERR_CAST(attach); in xe_gem_prime_import()
311 obj->import_attach = attach; in xe_gem_prime_import()