Lines Matching full:attach
371 struct vb2_dma_sg_attachment *attach; in vb2_dma_sg_dmabuf_ops_attach() local
378 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_dma_sg_dmabuf_ops_attach()
379 if (!attach) in vb2_dma_sg_dmabuf_ops_attach()
382 sgt = &attach->sgt; in vb2_dma_sg_dmabuf_ops_attach()
388 kfree(attach); in vb2_dma_sg_dmabuf_ops_attach()
400 attach->dma_dir = DMA_NONE; in vb2_dma_sg_dmabuf_ops_attach()
401 dbuf_attach->priv = attach; in vb2_dma_sg_dmabuf_ops_attach()
409 struct vb2_dma_sg_attachment *attach = db_attach->priv; in vb2_dma_sg_dmabuf_ops_detach() local
412 if (!attach) in vb2_dma_sg_dmabuf_ops_detach()
415 sgt = &attach->sgt; in vb2_dma_sg_dmabuf_ops_detach()
418 if (attach->dma_dir != DMA_NONE) in vb2_dma_sg_dmabuf_ops_detach()
419 dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, 0); in vb2_dma_sg_dmabuf_ops_detach()
421 kfree(attach); in vb2_dma_sg_dmabuf_ops_detach()
428 struct vb2_dma_sg_attachment *attach = db_attach->priv; in vb2_dma_sg_dmabuf_ops_map() local
431 sgt = &attach->sgt; in vb2_dma_sg_dmabuf_ops_map()
433 if (attach->dma_dir == dma_dir) in vb2_dma_sg_dmabuf_ops_map()
437 if (attach->dma_dir != DMA_NONE) { in vb2_dma_sg_dmabuf_ops_map()
438 dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, 0); in vb2_dma_sg_dmabuf_ops_map()
439 attach->dma_dir = DMA_NONE; in vb2_dma_sg_dmabuf_ops_map()
448 attach->dma_dir = dma_dir; in vb2_dma_sg_dmabuf_ops_map()
510 .attach = vb2_dma_sg_dmabuf_ops_attach,
637 pr_err("failed to attach dmabuf\n"); in vb2_dma_sg_attach_dmabuf()