1 /* linux/inclue/media/videobuf2-cma-phys.h
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
6 * CMA memory allocator for videobuf2
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.
13 #ifndef _MEDIA_VIDEOBUF2_CMA_H
14 #define _MEDIA_VIDEOBUF2_CMA_H
16 #include <media/videobuf2-core.h>
18 static inline unsigned long vb2_cma_plane_paddr(struct vb2_buffer *vb,
19 unsigned int plane_no)
21 return (unsigned long)vb2_plane_cookie(vb, plane_no);
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,
29 unsigned long alignments[]);
30 void vb2_cma_cleanup_multi(void **alloc_ctxes);
31 extern const struct vb2_mem_ops vb2_cma_memops;