blob: 5e9790cdd60168dc6620e363165a90bc6f2406fe [file] [log] [blame]
Duy Truong790f06d2013-02-13 16:38:12 -08001/* Copyright (c) 2011, The Linux Foundation. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * helper functions for physically contiguous PMEM capture buffers
13 */
14
15#ifndef _VIDEOBUF_PMEM_CONTIG_H
16#define _VIDEOBUF_PMEM_CONTIG_H
17
18#include <media/videobuf-core.h>
19
20struct videobuf_contig_pmem {
21 u32 magic;
22 void *vaddr;
23 int phyaddr;
24 unsigned long size;
25 int is_userptr;
Kiran Kumar H N5a19c682011-07-23 11:34:34 -070026 uint32_t y_off;
27 uint32_t cbcr_off;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070028 int buffer_type;
29 struct file *file;
30};
31
32void videobuf_queue_pmem_contig_init(struct videobuf_queue *q,
33 const struct videobuf_queue_ops *ops,
34 struct device *dev,
35 spinlock_t *irqlock,
36 enum v4l2_buf_type type,
37 enum v4l2_field field,
38 unsigned int msize,
39 void *priv,
40 struct mutex *ext_lock);
41
42int videobuf_to_pmem_contig(struct videobuf_buffer *buf);
43int videobuf_pmem_contig_free(struct videobuf_queue *q,
44 struct videobuf_buffer *buf);
45
46#endif /* _VIDEOBUF_PMEM_CONTIG_H */