Lines Matching refs:db_attach
42 struct dma_buf_attachment *db_attach; member
80 if (!buf->vaddr && buf->db_attach) in vb2_dc_vaddr()
81 buf->vaddr = dma_buf_vmap(buf->db_attach->dmabuf); in vb2_dc_vaddr()
99 if (!sgt || buf->db_attach) in vb2_dc_prepare()
112 if (!sgt || buf->db_attach) in vb2_dc_finish()
264 struct dma_buf_attachment *db_attach) in vb2_dc_dmabuf_ops_detach() argument
266 struct vb2_dc_attachment *attach = db_attach->priv; in vb2_dc_dmabuf_ops_detach()
276 dma_unmap_sg(db_attach->dev, sgt->sgl, sgt->orig_nents, in vb2_dc_dmabuf_ops_detach()
280 db_attach->priv = NULL; in vb2_dc_dmabuf_ops_detach()
284 struct dma_buf_attachment *db_attach, enum dma_data_direction dma_dir) in vb2_dc_dmabuf_ops_map() argument
286 struct vb2_dc_attachment *attach = db_attach->priv; in vb2_dc_dmabuf_ops_map()
288 struct mutex *lock = &db_attach->dmabuf->lock; in vb2_dc_dmabuf_ops_map()
302 dma_unmap_sg(db_attach->dev, sgt->sgl, sgt->orig_nents, in vb2_dc_dmabuf_ops_map()
308 sgt->nents = dma_map_sg(db_attach->dev, sgt->sgl, sgt->orig_nents, in vb2_dc_dmabuf_ops_map()
323 static void vb2_dc_dmabuf_ops_unmap(struct dma_buf_attachment *db_attach, in vb2_dc_dmabuf_ops_unmap() argument
605 if (WARN_ON(!buf->db_attach)) { in vb2_dc_map_dmabuf()
616 sgt = dma_buf_map_attachment(buf->db_attach, buf->dma_dir); in vb2_dc_map_dmabuf()
627 dma_buf_unmap_attachment(buf->db_attach, sgt, buf->dma_dir); in vb2_dc_map_dmabuf()
643 if (WARN_ON(!buf->db_attach)) { in vb2_dc_unmap_dmabuf()
654 dma_buf_vunmap(buf->db_attach->dmabuf, buf->vaddr); in vb2_dc_unmap_dmabuf()
657 dma_buf_unmap_attachment(buf->db_attach, sgt, buf->dma_dir); in vb2_dc_unmap_dmabuf()
672 dma_buf_detach(buf->db_attach->dmabuf, buf->db_attach); in vb2_dc_detach_dmabuf()
703 buf->db_attach = dba; in vb2_dc_attach_dmabuf()