Lines Matching full:attach
215 struct vb2_vmalloc_attachment *attach; in vb2_vmalloc_dmabuf_ops_attach() local
224 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_vmalloc_dmabuf_ops_attach()
225 if (!attach) in vb2_vmalloc_dmabuf_ops_attach()
228 sgt = &attach->sgt; in vb2_vmalloc_dmabuf_ops_attach()
231 kfree(attach); in vb2_vmalloc_dmabuf_ops_attach()
239 kfree(attach); in vb2_vmalloc_dmabuf_ops_attach()
246 attach->dma_dir = DMA_NONE; in vb2_vmalloc_dmabuf_ops_attach()
247 dbuf_attach->priv = attach; in vb2_vmalloc_dmabuf_ops_attach()
254 struct vb2_vmalloc_attachment *attach = db_attach->priv; in vb2_vmalloc_dmabuf_ops_detach() local
257 if (!attach) in vb2_vmalloc_dmabuf_ops_detach()
260 sgt = &attach->sgt; in vb2_vmalloc_dmabuf_ops_detach()
263 if (attach->dma_dir != DMA_NONE) in vb2_vmalloc_dmabuf_ops_detach()
264 dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, 0); in vb2_vmalloc_dmabuf_ops_detach()
266 kfree(attach); in vb2_vmalloc_dmabuf_ops_detach()
273 struct vb2_vmalloc_attachment *attach = db_attach->priv; in vb2_vmalloc_dmabuf_ops_map() local
276 sgt = &attach->sgt; in vb2_vmalloc_dmabuf_ops_map()
278 if (attach->dma_dir == dma_dir) in vb2_vmalloc_dmabuf_ops_map()
282 if (attach->dma_dir != DMA_NONE) { in vb2_vmalloc_dmabuf_ops_map()
283 dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, 0); in vb2_vmalloc_dmabuf_ops_map()
284 attach->dma_dir = DMA_NONE; in vb2_vmalloc_dmabuf_ops_map()
293 attach->dma_dir = dma_dir; in vb2_vmalloc_dmabuf_ops_map()
327 .attach = vb2_vmalloc_dmabuf_ops_attach,