xref: /OK3568_Linux_fs/kernel/include/media/videobuf2-dma-sg.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * videobuf2-dma-sg.h - DMA scatter/gather memory allocator for videobuf2
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * Copyright (C) 2010 Samsung Electronics
5*4882a593Smuzhiyun  *
6*4882a593Smuzhiyun  * Author: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>
7*4882a593Smuzhiyun  *
8*4882a593Smuzhiyun  * This program is free software; you can redistribute it and/or modify
9*4882a593Smuzhiyun  * it under the terms of the GNU General Public License as published by
10*4882a593Smuzhiyun  * the Free Software Foundation.
11*4882a593Smuzhiyun  */
12*4882a593Smuzhiyun 
13*4882a593Smuzhiyun #ifndef _MEDIA_VIDEOBUF2_DMA_SG_H
14*4882a593Smuzhiyun #define _MEDIA_VIDEOBUF2_DMA_SG_H
15*4882a593Smuzhiyun 
16*4882a593Smuzhiyun #include <media/videobuf2-v4l2.h>
17*4882a593Smuzhiyun 
vb2_dma_sg_plane_desc(struct vb2_buffer * vb,unsigned int plane_no)18*4882a593Smuzhiyun static inline struct sg_table *vb2_dma_sg_plane_desc(
19*4882a593Smuzhiyun 		struct vb2_buffer *vb, unsigned int plane_no)
20*4882a593Smuzhiyun {
21*4882a593Smuzhiyun 	return (struct sg_table *)vb2_plane_cookie(vb, plane_no);
22*4882a593Smuzhiyun }
23*4882a593Smuzhiyun 
24*4882a593Smuzhiyun extern const struct vb2_mem_ops vb2_dma_sg_memops;
25*4882a593Smuzhiyun 
26*4882a593Smuzhiyun #endif
27