Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * helper functions for physically contiguous capture buffers
0004  *
0005  * The functions support hardware lacking scatter gather support
0006  * (i.e. the buffers must be linear in physical memory)
0007  *
0008  * Copyright (c) 2008 Magnus Damm
0009  */
0010 #ifndef _VIDEOBUF_DMA_CONTIG_H
0011 #define _VIDEOBUF_DMA_CONTIG_H
0012 
0013 #include <linux/dma-mapping.h>
0014 #include <media/videobuf-core.h>
0015 
0016 void videobuf_queue_dma_contig_init(struct videobuf_queue *q,
0017                     const struct videobuf_queue_ops *ops,
0018                     struct device *dev,
0019                     spinlock_t *irqlock,
0020                     enum v4l2_buf_type type,
0021                     enum v4l2_field field,
0022                     unsigned int msize,
0023                     void *priv,
0024                     struct mutex *ext_lock);
0025 
0026 dma_addr_t videobuf_to_dma_contig(struct videobuf_buffer *buf);
0027 void videobuf_dma_contig_free(struct videobuf_queue *q,
0028                   struct videobuf_buffer *buf);
0029 
0030 #endif /* _VIDEOBUF_DMA_CONTIG_H */