Lines Matching refs:dma_dir
40 enum dma_data_direction dma_dir; member
117 buf->dma_dir = vb->vb2_queue->dma_dir; in vb2_dma_sg_alloc()
151 if (dma_map_sgtable(buf->dev, sgt, buf->dma_dir, in vb2_dma_sg_alloc()
189 dma_unmap_sgtable(buf->dev, sgt, buf->dma_dir, in vb2_dma_sg_put()
210 dma_sync_sgtable_for_device(buf->dev, sgt, buf->dma_dir); in vb2_dma_sg_prepare()
221 dma_sync_sgtable_for_cpu(buf->dev, sgt, buf->dma_dir); in vb2_dma_sg_finish()
240 buf->dma_dir = vb->vb2_queue->dma_dir; in vb2_dma_sg_get_userptr()
264 if (dma_map_sgtable(buf->dev, sgt, buf->dma_dir, in vb2_dma_sg_get_userptr()
291 dma_unmap_sgtable(buf->dev, sgt, buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC); in vb2_dma_sg_put_userptr()
295 if (buf->dma_dir == DMA_FROM_DEVICE || in vb2_dma_sg_put_userptr()
296 buf->dma_dir == DMA_BIDIRECTIONAL) in vb2_dma_sg_put_userptr()
364 enum dma_data_direction dma_dir; member
399 attach->dma_dir = DMA_NONE; in vb2_dma_sg_dmabuf_ops_attach()
417 if (attach->dma_dir != DMA_NONE) in vb2_dma_sg_dmabuf_ops_detach()
418 dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, 0); in vb2_dma_sg_dmabuf_ops_detach()
425 struct dma_buf_attachment *db_attach, enum dma_data_direction dma_dir) in vb2_dma_sg_dmabuf_ops_map() argument
436 if (attach->dma_dir == dma_dir) { in vb2_dma_sg_dmabuf_ops_map()
442 if (attach->dma_dir != DMA_NONE) { in vb2_dma_sg_dmabuf_ops_map()
443 dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, 0); in vb2_dma_sg_dmabuf_ops_map()
444 attach->dma_dir = DMA_NONE; in vb2_dma_sg_dmabuf_ops_map()
448 if (dma_map_sgtable(db_attach->dev, sgt, dma_dir, 0)) { in vb2_dma_sg_dmabuf_ops_map()
454 attach->dma_dir = dma_dir; in vb2_dma_sg_dmabuf_ops_map()
462 struct sg_table *sgt, enum dma_data_direction dma_dir) in vb2_dma_sg_dmabuf_ops_unmap() argument
480 dma_sync_sg_for_cpu(buf->dev, sgt->sgl, sgt->nents, buf->dma_dir); in vb2_dma_sg_dmabuf_ops_begin_cpu_access()
491 dma_sync_sg_for_device(buf->dev, sgt->sgl, sgt->nents, buf->dma_dir); in vb2_dma_sg_dmabuf_ops_end_cpu_access()
568 sgt = dma_buf_map_attachment(buf->db_attach, buf->dma_dir); in vb2_dma_sg_map_dmabuf()
600 dma_buf_unmap_attachment(buf->db_attach, sgt, buf->dma_dir); in vb2_dma_sg_unmap_dmabuf()
643 buf->dma_dir = vb->vb2_queue->dma_dir; in vb2_dma_sg_attach_dmabuf()