Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * videobuf2-dma-contig.h - DMA contig memory allocator for videobuf2
0003  *
0004  * Copyright (C) 2010 Samsung Electronics
0005  *
0006  * Author: Pawel Osciak <pawel@osciak.com>
0007  *
0008  * This program is free software; you can redistribute it and/or modify
0009  * it under the terms of the GNU General Public License as published by
0010  * the Free Software Foundation.
0011  */
0012 
0013 #ifndef _MEDIA_VIDEOBUF2_DMA_CONTIG_H
0014 #define _MEDIA_VIDEOBUF2_DMA_CONTIG_H
0015 
0016 #include <media/videobuf2-v4l2.h>
0017 #include <linux/dma-mapping.h>
0018 
0019 static inline dma_addr_t
0020 vb2_dma_contig_plane_dma_addr(struct vb2_buffer *vb, unsigned int plane_no)
0021 {
0022     dma_addr_t *addr = vb2_plane_cookie(vb, plane_no);
0023 
0024     return *addr;
0025 }
0026 
0027 int vb2_dma_contig_set_max_seg_size(struct device *dev, unsigned int size);
0028 static inline void vb2_dma_contig_clear_max_seg_size(struct device *dev) { }
0029 
0030 extern const struct vb2_mem_ops vb2_dma_contig_memops;
0031 
0032 #endif