upload tizen1.0 source
[kernel/linux-2.6.36.git] / include / media / videobuf2-cma.h
1 /* linux/inclue/media/videobuf2-cma-phys.h
2  *
3  * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4  *              http://www.samsung.com/
5  *
6  * CMA memory allocator for videobuf2
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software Foundation.
11 */
12
13 #ifndef _MEDIA_VIDEOBUF2_CMA_H
14 #define _MEDIA_VIDEOBUF2_CMA_H
15
16 #include <media/videobuf2-core.h>
17
18 static inline unsigned long vb2_cma_plane_paddr(struct vb2_buffer *vb,
19                                                 unsigned int plane_no)
20 {
21         return (unsigned long)vb2_plane_cookie(vb, plane_no);
22 }
23 void *vb2_cma_init(struct device *dev, const char *type,
24                                         unsigned long alignment);
25 void vb2_cma_cleanup(void *conf);
26 void **vb2_cma_init_multi(struct device *dev,
27                                           unsigned int num_planes,
28                                           const char *types[],
29                                           unsigned long alignments[]);
30 void vb2_cma_cleanup_multi(void **alloc_ctxes);
31 extern const struct vb2_mem_ops vb2_cma_memops;
32
33 #endif
34