Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ispqueue.h
Go to the documentation of this file.
1 /*
2  * ispqueue.h
3  *
4  * TI OMAP3 ISP - Video buffers queue handling
5  *
6  * Copyright (C) 2010 Nokia Corporation
7  *
8  * Contacts: Laurent Pinchart <[email protected]>
9  * Sakari Ailus <[email protected]>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License version 2 as
13  * published by the Free Software Foundation.
14  *
15  * This program is distributed in the hope that it will be useful, but
16  * WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
23  * 02110-1301 USA
24  */
25 
26 #ifndef OMAP3_ISP_QUEUE_H
27 #define OMAP3_ISP_QUEUE_H
28 
29 #include <linux/kernel.h>
30 #include <linux/list.h>
31 #include <linux/mutex.h>
32 #include <linux/videodev2.h>
33 #include <linux/wait.h>
34 
35 struct isp_video_queue;
36 struct page;
37 struct scatterlist;
38 
39 #define ISP_VIDEO_MAX_BUFFERS 16
40 
60 };
61 
83  unsigned long vma_use_count;
84  struct list_head stream;
86  unsigned int prepared:1;
87  bool skip_cache;
88 
89  /* For kernel buffers. */
90  void *vaddr;
91 
92  /* For userspace buffers. */
94  unsigned long offset;
95  unsigned int npages;
96  struct page **pages;
98 
99  /* For all buffers except VM_PFNMAP. */
100  unsigned int sglen;
102 
103  /* Touched by the interrupt handler. */
108 };
109 
110 #define to_isp_video_buffer(vb) container_of(vb, struct isp_video_buffer, vb)
111 
130  unsigned int *nbuffers, unsigned int *size);
134 };
135 
152  struct device *dev;
153  unsigned int bufsize;
154 
155  unsigned int count;
157  struct mutex lock;
159 
160  unsigned int streaming:1;
161 
162  struct list_head queue;
163 };
164 
167  enum v4l2_buf_type type,
168  const struct isp_video_queue_operations *ops,
169  struct device *dev, unsigned int bufsize);
170 
172  struct v4l2_requestbuffers *rb);
174  struct v4l2_buffer *vbuf);
176  struct v4l2_buffer *vbuf);
178  struct v4l2_buffer *vbuf, int nonblocking);
183  struct vm_area_struct *vma);
184 unsigned int omap3isp_video_queue_poll(struct isp_video_queue *queue,
185  struct file *file, poll_table *wait);
186 
187 #endif /* OMAP3_ISP_QUEUE_H */