Lines Matching refs:db_attach
53 struct dma_buf_attachment *db_attach; member
311 if (buf->db_attach) { in vb2_dma_sg_vaddr()
312 ret = dma_buf_vmap(buf->db_attach->dmabuf, &map); in vb2_dma_sg_vaddr()
405 struct dma_buf_attachment *db_attach) in vb2_dma_sg_dmabuf_ops_detach() argument
407 struct vb2_dma_sg_attachment *attach = db_attach->priv; in vb2_dma_sg_dmabuf_ops_detach()
417 dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, 0); in vb2_dma_sg_dmabuf_ops_detach()
420 db_attach->priv = NULL; in vb2_dma_sg_dmabuf_ops_detach()
424 struct dma_buf_attachment *db_attach, enum dma_data_direction dma_dir) in vb2_dma_sg_dmabuf_ops_map() argument
426 struct vb2_dma_sg_attachment *attach = db_attach->priv; in vb2_dma_sg_dmabuf_ops_map()
428 struct mutex *lock = &db_attach->dmabuf->lock; in vb2_dma_sg_dmabuf_ops_map()
442 dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, 0); in vb2_dma_sg_dmabuf_ops_map()
447 if (dma_map_sgtable(db_attach->dev, sgt, dma_dir, 0)) { in vb2_dma_sg_dmabuf_ops_map()
460 static void vb2_dma_sg_dmabuf_ops_unmap(struct dma_buf_attachment *db_attach, in vb2_dma_sg_dmabuf_ops_unmap() argument
557 if (WARN_ON(!buf->db_attach)) { in vb2_dma_sg_map_dmabuf()
568 sgt = dma_buf_map_attachment(buf->db_attach, buf->dma_dir); in vb2_dma_sg_map_dmabuf()
586 if (WARN_ON(!buf->db_attach)) { in vb2_dma_sg_unmap_dmabuf()
597 dma_buf_vunmap(buf->db_attach->dmabuf, &map); in vb2_dma_sg_unmap_dmabuf()
600 dma_buf_unmap_attachment(buf->db_attach, sgt, buf->dma_dir); in vb2_dma_sg_unmap_dmabuf()
614 dma_buf_detach(buf->db_attach->dmabuf, buf->db_attach); in vb2_dma_sg_detach_dmabuf()
645 buf->db_attach = dba; in vb2_dma_sg_attach_dmabuf()