Lines Matching refs:dma_dir
33 enum dma_data_direction dma_dir; member
140 dma_sync_sgtable_for_device(buf->dev, sgt, buf->dma_dir); in vb2_dc_prepare()
160 dma_sync_sgtable_for_cpu(buf->dev, sgt, buf->dma_dir); in vb2_dc_finish()
178 buf->dma_sgt, buf->dma_dir); in vb2_dc_put()
216 buf->dma_dir, in vb2_dc_alloc_non_coherent()
246 buf->dma_dir = vb->vb2_queue->dma_dir; in vb2_dc_alloc()
314 enum dma_data_direction dma_dir; member
349 attach->dma_dir = DMA_NONE; in vb2_dc_dmabuf_ops_attach()
367 if (attach->dma_dir != DMA_NONE) in vb2_dc_dmabuf_ops_detach()
374 dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, in vb2_dc_dmabuf_ops_detach()
382 struct dma_buf_attachment *db_attach, enum dma_data_direction dma_dir) in vb2_dc_dmabuf_ops_map() argument
389 if (attach->dma_dir == dma_dir) in vb2_dc_dmabuf_ops_map()
393 if (attach->dma_dir != DMA_NONE) { in vb2_dc_dmabuf_ops_map()
394 dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, in vb2_dc_dmabuf_ops_map()
396 attach->dma_dir = DMA_NONE; in vb2_dc_dmabuf_ops_map()
403 if (dma_map_sgtable(db_attach->dev, sgt, dma_dir, in vb2_dc_dmabuf_ops_map()
409 attach->dma_dir = dma_dir; in vb2_dc_dmabuf_ops_map()
415 struct sg_table *sgt, enum dma_data_direction dma_dir) in vb2_dc_dmabuf_ops_unmap() argument
543 dma_unmap_sgtable(buf->dev, sgt, buf->dma_dir, in vb2_dc_put_userptr()
548 if (buf->dma_dir == DMA_FROM_DEVICE || in vb2_dc_put_userptr()
549 buf->dma_dir == DMA_BIDIRECTIONAL) in vb2_dc_put_userptr()
556 buf->dma_dir, 0); in vb2_dc_put_userptr()
593 buf->dma_dir = vb->vb2_queue->dma_dir; in vb2_dc_get_userptr()
597 vec = vb2_create_framevec(vaddr, size, buf->dma_dir == DMA_FROM_DEVICE || in vb2_dc_get_userptr()
598 buf->dma_dir == DMA_BIDIRECTIONAL); in vb2_dc_get_userptr()
617 __pfn_to_phys(nums[0]), size, buf->dma_dir, 0); in vb2_dc_get_userptr()
643 if (dma_map_sgtable(buf->dev, sgt, buf->dma_dir, in vb2_dc_get_userptr()
668 dma_unmap_sgtable(buf->dev, sgt, buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC); in vb2_dc_get_userptr()
706 sgt = dma_buf_map_attachment_unlocked(buf->db_attach, buf->dma_dir); in vb2_dc_map_dmabuf()
718 buf->dma_dir); in vb2_dc_map_dmabuf()
749 dma_buf_unmap_attachment_unlocked(buf->db_attach, sgt, buf->dma_dir); in vb2_dc_unmap_dmabuf()
795 buf->dma_dir = vb->vb2_queue->dma_dir; in vb2_dc_attach_dmabuf()