Lines Matching full:attach

82 		map->attach = dma_buf_attach(buf, dev);  in tegra_bo_pin()
83 if (IS_ERR(map->attach)) { in tegra_bo_pin()
84 err = PTR_ERR(map->attach); in tegra_bo_pin()
88 map->sgt = dma_buf_map_attachment_unlocked(map->attach, direction); in tegra_bo_pin()
90 dma_buf_detach(buf, map->attach); in tegra_bo_pin()
163 if (map->attach) { in tegra_bo_unpin()
164 dma_buf_unmap_attachment_unlocked(map->attach, map->sgt, in tegra_bo_unpin()
166 dma_buf_detach(map->attach->dmabuf, map->attach); in tegra_bo_unpin()
460 struct dma_buf_attachment *attach; in tegra_bo_import() local
468 attach = dma_buf_attach(buf, drm->dev); in tegra_bo_import()
469 if (IS_ERR(attach)) { in tegra_bo_import()
470 err = PTR_ERR(attach); in tegra_bo_import()
476 bo->sgt = dma_buf_map_attachment_unlocked(attach, DMA_TO_DEVICE); in tegra_bo_import()
488 bo->gem.import_attach = attach; in tegra_bo_import()
494 dma_buf_unmap_attachment_unlocked(attach, bo->sgt, DMA_TO_DEVICE); in tegra_bo_import()
496 dma_buf_detach(buf, attach); in tegra_bo_import()
625 tegra_gem_prime_map_dma_buf(struct dma_buf_attachment *attach, in tegra_gem_prime_map_dma_buf() argument
628 struct drm_gem_object *gem = attach->dmabuf->priv; in tegra_gem_prime_map_dma_buf()
641 if (dma_get_sgtable(attach->dev, sgt, bo->vaddr, bo->iova, in tegra_gem_prime_map_dma_buf()
646 if (dma_map_sgtable(attach->dev, sgt, dir, 0)) in tegra_gem_prime_map_dma_buf()
657 static void tegra_gem_prime_unmap_dma_buf(struct dma_buf_attachment *attach, in tegra_gem_prime_unmap_dma_buf() argument
661 struct drm_gem_object *gem = attach->dmabuf->priv; in tegra_gem_prime_unmap_dma_buf()
665 dma_unmap_sgtable(attach->dev, sgt, dir, 0); in tegra_gem_prime_unmap_dma_buf()