Lines Matching full:attach

47  * amdgpu_dma_buf_attach - &dma_buf_ops.attach implementation
49 * @dmabuf: DMA-buf where we attach to
50 * @attach: attachment to add
55 struct dma_buf_attachment *attach) in amdgpu_dma_buf_attach() argument
62 if (pci_p2pdma_distance(adev->pdev, attach->dev, false) < 0) in amdgpu_dma_buf_attach()
63 attach->peer2peer = false; in amdgpu_dma_buf_attach()
80 * @attach: the attachment to remove
85 struct dma_buf_attachment *attach) in amdgpu_dma_buf_detach() argument
98 * @attach: attachment to pin down
102 static int amdgpu_dma_buf_pin(struct dma_buf_attachment *attach) in amdgpu_dma_buf_pin() argument
104 struct drm_gem_object *obj = attach->dmabuf->priv; in amdgpu_dma_buf_pin()
114 * @attach: attachment to unpin
118 static void amdgpu_dma_buf_unpin(struct dma_buf_attachment *attach) in amdgpu_dma_buf_unpin() argument
120 struct drm_gem_object *obj = attach->dmabuf->priv; in amdgpu_dma_buf_unpin()
128 * @attach: DMA-buf attachment
139 static struct sg_table *amdgpu_dma_buf_map(struct dma_buf_attachment *attach, in amdgpu_dma_buf_map() argument
142 struct dma_buf *dma_buf = attach->dmabuf; in amdgpu_dma_buf_map()
155 attach->peer2peer) { in amdgpu_dma_buf_map()
177 if (dma_map_sgtable(attach->dev, sgt, dir, in amdgpu_dma_buf_map()
184 bo->tbo.base.size, attach->dev, in amdgpu_dma_buf_map()
203 * @attach: DMA-buf attachment
210 static void amdgpu_dma_buf_unmap(struct dma_buf_attachment *attach, in amdgpu_dma_buf_unmap() argument
215 dma_unmap_sgtable(attach->dev, sgt, dir, 0); in amdgpu_dma_buf_unmap()
219 amdgpu_vram_mgr_free_sgt(attach->dev, dir, sgt); in amdgpu_dma_buf_unmap()
265 .attach = amdgpu_dma_buf_attach,
356 * amdgpu_dma_buf_move_notify - &attach.move_notify implementation
358 * @attach: the DMA-buf attachment
364 amdgpu_dma_buf_move_notify(struct dma_buf_attachment *attach) in amdgpu_dma_buf_move_notify() argument
366 struct drm_gem_object *obj = attach->importer_priv; in amdgpu_dma_buf_move_notify()
439 struct dma_buf_attachment *attach; in amdgpu_gem_prime_import() local
458 attach = dma_buf_dynamic_attach(dma_buf, dev->dev, in amdgpu_gem_prime_import()
460 if (IS_ERR(attach)) { in amdgpu_gem_prime_import()
462 return ERR_CAST(attach); in amdgpu_gem_prime_import()
466 obj->import_attach = attach; in amdgpu_gem_prime_import()