Lines Matching refs:attach
222 struct vb2_dc_attachment *attach; in vb2_dc_dmabuf_ops_attach() local
229 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_dc_dmabuf_ops_attach()
230 if (!attach) in vb2_dc_dmabuf_ops_attach()
233 sgt = &attach->sgt; in vb2_dc_dmabuf_ops_attach()
239 kfree(attach); in vb2_dc_dmabuf_ops_attach()
251 attach->dma_dir = DMA_NONE; in vb2_dc_dmabuf_ops_attach()
252 dbuf_attach->priv = attach; in vb2_dc_dmabuf_ops_attach()
260 struct vb2_dc_attachment *attach = db_attach->priv; in vb2_dc_dmabuf_ops_detach() local
263 if (!attach) in vb2_dc_dmabuf_ops_detach()
266 sgt = &attach->sgt; in vb2_dc_dmabuf_ops_detach()
269 if (attach->dma_dir != DMA_NONE) in vb2_dc_dmabuf_ops_detach()
276 dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, in vb2_dc_dmabuf_ops_detach()
279 kfree(attach); in vb2_dc_dmabuf_ops_detach()
286 struct vb2_dc_attachment *attach = db_attach->priv; in vb2_dc_dmabuf_ops_map() local
293 sgt = &attach->sgt; in vb2_dc_dmabuf_ops_map()
295 if (attach->dma_dir == dma_dir) { in vb2_dc_dmabuf_ops_map()
301 if (attach->dma_dir != DMA_NONE) { in vb2_dc_dmabuf_ops_map()
302 dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, in vb2_dc_dmabuf_ops_map()
304 attach->dma_dir = DMA_NONE; in vb2_dc_dmabuf_ops_map()
318 attach->dma_dir = dma_dir; in vb2_dc_dmabuf_ops_map()
367 .attach = vb2_dc_dmabuf_ops_attach,