aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/videobuf2-core.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-17 07:44:08 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-17 13:02:43 -0400
commit89cb3ddbe7cc5ce49ffa814f30fb019fc531865d (patch)
tree5c128535f9ec12a3b0c3acdcc811321cd9787ff8 /include/media/videobuf2-core.h
parent5b6137dc84f627e8497e554890ae02378c54f9f0 (diff)
[media] doc-rst: Fix conversion for v4l2 core functions
The conversion from DocBook lead into some conversion issues, basically due to the lack of proper support at kernel-doc. So, address them: - Now, the C files with the exported symbols also need to be added. So, all headers need to be included twice: one to get the structs/enums/.. and another one for the functions; - Notes should use the ReST tag, as kernel-doc doesn't recognizes it anymore; - Identation needs to be fixed, as ReST uses it to identify when a format "tag" ends. - kernel-doc doesn't escape things like *pointer, so we need to manually add a escape char before it. - On some cases, kernel-doc conversion requires violating the 80-cols, as otherwise it won't properly parse the source code. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'include/media/videobuf2-core.h')
-rw-r--r--include/media/videobuf2-core.h30
1 files changed, 18 insertions, 12 deletions
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
index 88e3ab496e8f..01cdd5bf90c8 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -86,11 +86,17 @@ struct vb2_threadio_data;
86 * @mmap: setup a userspace mapping for a given memory buffer under 86 * @mmap: setup a userspace mapping for a given memory buffer under
87 * the provided virtual memory region. 87 * the provided virtual memory region.
88 * 88 *
89 * Required ops for USERPTR types: get_userptr, put_userptr. 89 * Those operations are used by the videobuf2 core to implement the memory
90 * Required ops for MMAP types: alloc, put, num_users, mmap. 90 * handling/memory allocators for each type of supported streaming I/O method.
91 * Required ops for read/write access types: alloc, put, num_users, vaddr. 91 *
92 * Required ops for DMABUF types: attach_dmabuf, detach_dmabuf, map_dmabuf, 92 * .. note::
93 * unmap_dmabuf. 93 * #) Required ops for USERPTR types: get_userptr, put_userptr.
94 *
95 * #) Required ops for MMAP types: alloc, put, num_users, mmap.
96 *
97 * #) Required ops for read/write access types: alloc, put, num_users, vaddr.
98 *
99 * #) Required ops for DMABUF types: attach_dmabuf, detach_dmabuf, map_dmabuf, unmap_dmabuf.
94 */ 100 */
95struct vb2_mem_ops { 101struct vb2_mem_ops {
96 void *(*alloc)(void *alloc_ctx, unsigned long size, 102 void *(*alloc)(void *alloc_ctx, unsigned long size,
@@ -279,19 +285,19 @@ struct vb2_buffer {
279 * second time with the actually allocated number of 285 * second time with the actually allocated number of
280 * buffers to verify if that is OK. 286 * buffers to verify if that is OK.
281 * The driver should return the required number of buffers 287 * The driver should return the required number of buffers
282 * in *num_buffers, the required number of planes per 288 * in \*num_buffers, the required number of planes per
283 * buffer in *num_planes, the size of each plane should be 289 * buffer in \*num_planes, the size of each plane should be
284 * set in the sizes[] array and optional per-plane 290 * set in the sizes[] array and optional per-plane
285 * allocator specific context in the alloc_ctxs[] array. 291 * allocator specific context in the alloc_ctxs[] array.
286 * When called from VIDIOC_REQBUFS, *num_planes == 0, the 292 * When called from VIDIOC_REQBUFS, \*num_planes == 0, the
287 * driver has to use the currently configured format to 293 * driver has to use the currently configured format to
288 * determine the plane sizes and *num_buffers is the total 294 * determine the plane sizes and \*num_buffers is the total
289 * number of buffers that are being allocated. When called 295 * number of buffers that are being allocated. When called
290 * from VIDIOC_CREATE_BUFS, *num_planes != 0 and it 296 * from VIDIOC_CREATE_BUFS, \*num_planes != 0 and it
291 * describes the requested number of planes and sizes[] 297 * describes the requested number of planes and sizes[]
292 * contains the requested plane sizes. If either 298 * contains the requested plane sizes. If either
293 * *num_planes or the requested sizes are invalid callback 299 * \*num_planes or the requested sizes are invalid callback
294 * must return -EINVAL. In this case *num_buffers are 300 * must return -EINVAL. In this case \*num_buffers are
295 * being allocated additionally to q->num_buffers. 301 * being allocated additionally to q->num_buffers.
296 * @wait_prepare: release any locks taken while calling vb2 functions; 302 * @wait_prepare: release any locks taken while calling vb2 functions;
297 * it is called before an ioctl needs to wait for a new 303 * it is called before an ioctl needs to wait for a new