Lines Matching refs:attach

213 	struct vb2_vmalloc_attachment *attach;  in vb2_vmalloc_dmabuf_ops_attach()  local
222 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_vmalloc_dmabuf_ops_attach()
223 if (!attach) in vb2_vmalloc_dmabuf_ops_attach()
226 sgt = &attach->sgt; in vb2_vmalloc_dmabuf_ops_attach()
229 kfree(attach); in vb2_vmalloc_dmabuf_ops_attach()
237 kfree(attach); in vb2_vmalloc_dmabuf_ops_attach()
244 attach->dma_dir = DMA_NONE; in vb2_vmalloc_dmabuf_ops_attach()
245 dbuf_attach->priv = attach; in vb2_vmalloc_dmabuf_ops_attach()
252 struct vb2_vmalloc_attachment *attach = db_attach->priv; in vb2_vmalloc_dmabuf_ops_detach() local
255 if (!attach) in vb2_vmalloc_dmabuf_ops_detach()
258 sgt = &attach->sgt; in vb2_vmalloc_dmabuf_ops_detach()
261 if (attach->dma_dir != DMA_NONE) in vb2_vmalloc_dmabuf_ops_detach()
262 dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, 0); in vb2_vmalloc_dmabuf_ops_detach()
264 kfree(attach); in vb2_vmalloc_dmabuf_ops_detach()
271 struct vb2_vmalloc_attachment *attach = db_attach->priv; in vb2_vmalloc_dmabuf_ops_map() local
278 sgt = &attach->sgt; in vb2_vmalloc_dmabuf_ops_map()
280 if (attach->dma_dir == dma_dir) { in vb2_vmalloc_dmabuf_ops_map()
286 if (attach->dma_dir != DMA_NONE) { in vb2_vmalloc_dmabuf_ops_map()
287 dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, 0); in vb2_vmalloc_dmabuf_ops_map()
288 attach->dma_dir = DMA_NONE; in vb2_vmalloc_dmabuf_ops_map()
298 attach->dma_dir = dma_dir; in vb2_vmalloc_dmabuf_ops_map()
333 .attach = vb2_vmalloc_dmabuf_ops_attach,