• Home
  • Raw
  • Download

Lines Matching full:attach

54 			struct dma_buf_attachment *attach;  member
227 struct dma_buf_attachment *attach) in dmabuf_exp_ops_attach() argument
237 attach->priv = gntdev_dmabuf_attach; in dmabuf_exp_ops_attach()
242 struct dma_buf_attachment *attach) in dmabuf_exp_ops_detach() argument
244 struct gntdev_dmabuf_attachment *gntdev_dmabuf_attach = attach->priv; in dmabuf_exp_ops_detach()
251 dma_unmap_sgtable(attach->dev, sgt, in dmabuf_exp_ops_detach()
259 attach->priv = NULL; in dmabuf_exp_ops_detach()
264 dmabuf_exp_ops_map_dma_buf(struct dma_buf_attachment *attach, in dmabuf_exp_ops_map_dma_buf() argument
267 struct gntdev_dmabuf_attachment *gntdev_dmabuf_attach = attach->priv; in dmabuf_exp_ops_map_dma_buf()
268 struct gntdev_dmabuf *gntdev_dmabuf = attach->dmabuf->priv; in dmabuf_exp_ops_map_dma_buf()
272 attach->dev); in dmabuf_exp_ops_map_dma_buf()
291 if (dma_map_sgtable(attach->dev, sgt, dir, in dmabuf_exp_ops_map_dma_buf()
302 pr_debug("Failed to map sg table for dev %p\n", attach->dev); in dmabuf_exp_ops_map_dma_buf()
306 static void dmabuf_exp_ops_unmap_dma_buf(struct dma_buf_attachment *attach, in dmabuf_exp_ops_unmap_dma_buf() argument
346 .attach = dmabuf_exp_ops_attach,
577 struct dma_buf_attachment *attach; in dmabuf_imp_to_refs() local
596 attach = dma_buf_attach(dma_buf, dev); in dmabuf_imp_to_refs()
597 if (IS_ERR(attach)) { in dmabuf_imp_to_refs()
598 ret = ERR_CAST(attach); in dmabuf_imp_to_refs()
602 gntdev_dmabuf->u.imp.attach = attach; in dmabuf_imp_to_refs()
604 sgt = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL); in dmabuf_imp_to_refs()
619 if (attach->dmabuf->size != gntdev_dmabuf->nr_pages << PAGE_SHIFT) { in dmabuf_imp_to_refs()
622 attach->dmabuf->size, gntdev_dmabuf->nr_pages); in dmabuf_imp_to_refs()
667 dma_buf_unmap_attachment(attach, sgt, DMA_BIDIRECTIONAL); in dmabuf_imp_to_refs()
669 dma_buf_detach(dma_buf, attach); in dmabuf_imp_to_refs()
702 struct dma_buf_attachment *attach; in dmabuf_imp_release() local
714 attach = gntdev_dmabuf->u.imp.attach; in dmabuf_imp_release()
717 dma_buf_unmap_attachment(attach, gntdev_dmabuf->u.imp.sgt, in dmabuf_imp_release()
719 dma_buf = attach->dmabuf; in dmabuf_imp_release()
720 dma_buf_detach(attach->dmabuf, attach); in dmabuf_imp_release()