diff options
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/videobuf2-core.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index 1dafac05ce1a..0d71fc5efc46 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/videodev2.h> | 18 | #include <linux/videodev2.h> |
19 | 19 | ||
20 | struct vb2_alloc_ctx; | 20 | struct vb2_alloc_ctx; |
21 | struct vb2_fileio_data; | ||
21 | 22 | ||
22 | /** | 23 | /** |
23 | * struct vb2_mem_ops - memory handling/memory allocator operations | 24 | * struct vb2_mem_ops - memory handling/memory allocator operations |
@@ -54,6 +55,7 @@ struct vb2_alloc_ctx; | |||
54 | * | 55 | * |
55 | * Required ops for USERPTR types: get_userptr, put_userptr. | 56 | * Required ops for USERPTR types: get_userptr, put_userptr. |
56 | * Required ops for MMAP types: alloc, put, num_users, mmap. | 57 | * Required ops for MMAP types: alloc, put, num_users, mmap. |
58 | * Required ops for read/write access types: alloc, put, num_users, vaddr | ||
57 | */ | 59 | */ |
58 | struct vb2_mem_ops { | 60 | struct vb2_mem_ops { |
59 | void *(*alloc)(void *alloc_ctx, unsigned long size); | 61 | void *(*alloc)(void *alloc_ctx, unsigned long size); |
@@ -249,6 +251,7 @@ struct vb2_ops { | |||
249 | * @done_wq: waitqueue for processes waiting for buffers ready to be dequeued | 251 | * @done_wq: waitqueue for processes waiting for buffers ready to be dequeued |
250 | * @alloc_ctx: memory type/allocator-specific contexts for each plane | 252 | * @alloc_ctx: memory type/allocator-specific contexts for each plane |
251 | * @streaming: current streaming state | 253 | * @streaming: current streaming state |
254 | * @fileio: file io emulator internal data, used only if emulator is active | ||
252 | */ | 255 | */ |
253 | struct vb2_queue { | 256 | struct vb2_queue { |
254 | enum v4l2_buf_type type; | 257 | enum v4l2_buf_type type; |
@@ -275,6 +278,8 @@ struct vb2_queue { | |||
275 | void *alloc_ctx[VIDEO_MAX_PLANES]; | 278 | void *alloc_ctx[VIDEO_MAX_PLANES]; |
276 | 279 | ||
277 | unsigned int streaming:1; | 280 | unsigned int streaming:1; |
281 | |||
282 | struct vb2_fileio_data *fileio; | ||
278 | }; | 283 | }; |
279 | 284 | ||
280 | void *vb2_plane_vaddr(struct vb2_buffer *vb, unsigned int plane_no); | 285 | void *vb2_plane_vaddr(struct vb2_buffer *vb, unsigned int plane_no); |
@@ -298,6 +303,10 @@ int vb2_streamoff(struct vb2_queue *q, enum v4l2_buf_type type); | |||
298 | 303 | ||
299 | int vb2_mmap(struct vb2_queue *q, struct vm_area_struct *vma); | 304 | int vb2_mmap(struct vb2_queue *q, struct vm_area_struct *vma); |
300 | unsigned int vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait); | 305 | unsigned int vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait); |
306 | size_t vb2_read(struct vb2_queue *q, char __user *data, size_t count, | ||
307 | loff_t *ppos, int nonblock); | ||
308 | size_t vb2_write(struct vb2_queue *q, char __user *data, size_t count, | ||
309 | loff_t *ppos, int nonblock); | ||
301 | 310 | ||
302 | /** | 311 | /** |
303 | * vb2_is_streaming() - return streaming status of the queue | 312 | * vb2_is_streaming() - return streaming status of the queue |