Lines Matching full:attach

48 			struct dma_buf_attachment *attach;  member
221 struct dma_buf_attachment *attach) in dmabuf_exp_ops_attach() argument
231 attach->priv = gntdev_dmabuf_attach; in dmabuf_exp_ops_attach()
236 struct dma_buf_attachment *attach) in dmabuf_exp_ops_detach() argument
238 struct gntdev_dmabuf_attachment *gntdev_dmabuf_attach = attach->priv; in dmabuf_exp_ops_detach()
245 dma_unmap_sgtable(attach->dev, sgt, in dmabuf_exp_ops_detach()
253 attach->priv = NULL; in dmabuf_exp_ops_detach()
258 dmabuf_exp_ops_map_dma_buf(struct dma_buf_attachment *attach, in dmabuf_exp_ops_map_dma_buf() argument
261 struct gntdev_dmabuf_attachment *gntdev_dmabuf_attach = attach->priv; in dmabuf_exp_ops_map_dma_buf()
262 struct gntdev_dmabuf *gntdev_dmabuf = attach->dmabuf->priv; in dmabuf_exp_ops_map_dma_buf()
266 attach->dev); in dmabuf_exp_ops_map_dma_buf()
285 if (dma_map_sgtable(attach->dev, sgt, dir, in dmabuf_exp_ops_map_dma_buf()
296 pr_debug("Failed to map sg table for dev %p\n", attach->dev); in dmabuf_exp_ops_map_dma_buf()
300 static void dmabuf_exp_ops_unmap_dma_buf(struct dma_buf_attachment *attach, in dmabuf_exp_ops_unmap_dma_buf() argument
340 .attach = dmabuf_exp_ops_attach,
571 struct dma_buf_attachment *attach; in dmabuf_imp_to_refs() local
590 attach = dma_buf_attach(dma_buf, dev); in dmabuf_imp_to_refs()
591 if (IS_ERR(attach)) { in dmabuf_imp_to_refs()
592 ret = ERR_CAST(attach); in dmabuf_imp_to_refs()
596 gntdev_dmabuf->u.imp.attach = attach; in dmabuf_imp_to_refs()
598 sgt = dma_buf_map_attachment_unlocked(attach, DMA_BIDIRECTIONAL); in dmabuf_imp_to_refs()
613 if (attach->dmabuf->size != gntdev_dmabuf->nr_pages << PAGE_SHIFT) { in dmabuf_imp_to_refs()
616 attach->dmabuf->size, gntdev_dmabuf->nr_pages); in dmabuf_imp_to_refs()
661 dma_buf_unmap_attachment_unlocked(attach, sgt, DMA_BIDIRECTIONAL); in dmabuf_imp_to_refs()
663 dma_buf_detach(dma_buf, attach); in dmabuf_imp_to_refs()
696 struct dma_buf_attachment *attach; in dmabuf_imp_release() local
708 attach = gntdev_dmabuf->u.imp.attach; in dmabuf_imp_release()
711 dma_buf_unmap_attachment_unlocked(attach, gntdev_dmabuf->u.imp.sgt, in dmabuf_imp_release()
713 dma_buf = attach->dmabuf; in dmabuf_imp_release()
714 dma_buf_detach(attach->dmabuf, attach); in dmabuf_imp_release()