1 /* 1 /* 2 * videobuf2-dma-contig.h - DMA contig memory 2 * videobuf2-dma-contig.h - DMA contig memory allocator for videobuf2 3 * 3 * 4 * Copyright (C) 2010 Samsung Electronics 4 * Copyright (C) 2010 Samsung Electronics 5 * 5 * 6 * Author: Pawel Osciak <pawel@osciak.com> 6 * Author: Pawel Osciak <pawel@osciak.com> 7 * 7 * 8 * This program is free software; you can redi 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Publi 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation. 10 * the Free Software Foundation. 11 */ 11 */ 12 12 13 #ifndef _MEDIA_VIDEOBUF2_DMA_CONTIG_H 13 #ifndef _MEDIA_VIDEOBUF2_DMA_CONTIG_H 14 #define _MEDIA_VIDEOBUF2_DMA_CONTIG_H 14 #define _MEDIA_VIDEOBUF2_DMA_CONTIG_H 15 15 16 #include <media/videobuf2-v4l2.h> 16 #include <media/videobuf2-v4l2.h> 17 #include <linux/dma-mapping.h> 17 #include <linux/dma-mapping.h> 18 18 19 static inline dma_addr_t 19 static inline dma_addr_t 20 vb2_dma_contig_plane_dma_addr(struct vb2_buffe 20 vb2_dma_contig_plane_dma_addr(struct vb2_buffer *vb, unsigned int plane_no) 21 { 21 { 22 dma_addr_t *addr = vb2_plane_cookie(vb 22 dma_addr_t *addr = vb2_plane_cookie(vb, plane_no); 23 23 24 return *addr; 24 return *addr; 25 } 25 } 26 26 27 int vb2_dma_contig_set_max_seg_size(struct dev 27 int vb2_dma_contig_set_max_seg_size(struct device *dev, unsigned int size); 28 static inline void vb2_dma_contig_clear_max_se !! 28 void vb2_dma_contig_clear_max_seg_size(struct device *dev); 29 29 30 extern const struct vb2_mem_ops vb2_dma_contig 30 extern const struct vb2_mem_ops vb2_dma_contig_memops; 31 31 32 #endif 32 #endif 33 33
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.