aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/v4l2-core/videobuf2-dma-contig.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/videobuf2-dma-contig.c b/drivers/media/v4l2-core/videobuf2-dma-contig.c
index 10beaee7f0ae..572945048f79 100644
--- a/drivers/media/v4l2-core/videobuf2-dma-contig.c
+++ b/drivers/media/v4l2-core/videobuf2-dma-contig.c
@@ -226,6 +226,8 @@ static int vb2_dc_mmap(void *buf_priv, struct vm_area_struct *vma)
226/* DMABUF ops for exporters */ 226/* DMABUF ops for exporters */
227/*********************************************/ 227/*********************************************/
228 228
229#ifdef HAVE_GENERIC_DMA_COHERENT
230
229struct vb2_dc_attachment { 231struct vb2_dc_attachment {
230 struct sg_table sgt; 232 struct sg_table sgt;
231 enum dma_data_direction dir; 233 enum dma_data_direction dir;
@@ -416,6 +418,8 @@ static struct dma_buf *vb2_dc_get_dmabuf(void *buf_priv)
416 return dbuf; 418 return dbuf;
417} 419}
418 420
421#endif
422
419/*********************************************/ 423/*********************************************/
420/* callbacks for USERPTR buffers */ 424/* callbacks for USERPTR buffers */
421/*********************************************/ 425/*********************************************/
@@ -735,7 +739,9 @@ static void *vb2_dc_attach_dmabuf(void *alloc_ctx, struct dma_buf *dbuf,
735const struct vb2_mem_ops vb2_dma_contig_memops = { 739const struct vb2_mem_ops vb2_dma_contig_memops = {
736 .alloc = vb2_dc_alloc, 740 .alloc = vb2_dc_alloc,
737 .put = vb2_dc_put, 741 .put = vb2_dc_put,
742#ifdef CONFIG_HAVE_GENERIC_DMA_COHERENT
738 .get_dmabuf = vb2_dc_get_dmabuf, 743 .get_dmabuf = vb2_dc_get_dmabuf,
744#endif
739 .cookie = vb2_dc_cookie, 745 .cookie = vb2_dc_cookie,
740 .vaddr = vb2_dc_vaddr, 746 .vaddr = vb2_dc_vaddr,
741 .mmap = vb2_dc_mmap, 747 .mmap = vb2_dc_mmap,