aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/DocBook/media/v4l/vidioc-reqbufs.xml')
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-reqbufs.xml47
1 files changed, 25 insertions, 22 deletions
diff --git a/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml b/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml
index 2b50ef2007f3..78a06a9a5ece 100644
--- a/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml
@@ -48,28 +48,30 @@
48 <refsect1> 48 <refsect1>
49 <title>Description</title> 49 <title>Description</title>
50 50
51 <para>This ioctl is used to initiate <link linkend="mmap">memory 51<para>This ioctl is used to initiate <link linkend="mmap">memory mapped</link>,
52mapped</link> or <link linkend="userp">user pointer</link> 52<link linkend="userp">user pointer</link> or <link
53I/O. Memory mapped buffers are located in device memory and must be 53linkend="dmabuf">DMABUF</link> based I/O. Memory mapped buffers are located in
54allocated with this ioctl before they can be mapped into the 54device memory and must be allocated with this ioctl before they can be mapped
55application's address space. User buffers are allocated by 55into the application's address space. User buffers are allocated by
56applications themselves, and this ioctl is merely used to switch the 56applications themselves, and this ioctl is merely used to switch the driver
57driver into user pointer I/O mode and to setup some internal structures.</para> 57into user pointer I/O mode and to setup some internal structures.
58Similarly, DMABUF buffers are allocated by applications through a device
59driver, and this ioctl only configures the driver into DMABUF I/O mode without
60performing any direct allocation.</para>
58 61
59 <para>To allocate device buffers applications initialize all 62 <para>To allocate device buffers applications initialize all fields of the
60fields of the <structname>v4l2_requestbuffers</structname> structure. 63<structname>v4l2_requestbuffers</structname> structure. They set the
61They set the <structfield>type</structfield> field to the respective 64<structfield>type</structfield> field to the respective stream or buffer type,
62stream or buffer type, the <structfield>count</structfield> field to 65the <structfield>count</structfield> field to the desired number of buffers,
63the desired number of buffers, <structfield>memory</structfield> 66<structfield>memory</structfield> must be set to the requested I/O method and
64must be set to the requested I/O method and the <structfield>reserved</structfield> array 67the <structfield>reserved</structfield> array must be zeroed. When the ioctl is
65must be zeroed. When the ioctl 68called with a pointer to this structure the driver will attempt to allocate the
66is called with a pointer to this structure the driver will attempt to allocate 69requested number of buffers and it stores the actual number allocated in the
67the requested number of buffers and it stores the actual number 70<structfield>count</structfield> field. It can be smaller than the number
68allocated in the <structfield>count</structfield> field. It can be 71requested, even zero, when the driver runs out of free memory. A larger number
69smaller than the number requested, even zero, when the driver runs out 72is also possible when the driver requires more buffers to function correctly.
70of free memory. A larger number is also possible when the driver requires 73For example video output requires at least two buffers, one displayed and one
71more buffers to function correctly. For example video output requires at least two buffers, 74filled by the application.</para>
72one displayed and one filled by the application.</para>
73 <para>When the I/O method is not supported the ioctl 75 <para>When the I/O method is not supported the ioctl
74returns an &EINVAL;.</para> 76returns an &EINVAL;.</para>
75 77
@@ -102,7 +104,8 @@ as the &v4l2-format; <structfield>type</structfield> field. See <xref
102 <entry>__u32</entry> 104 <entry>__u32</entry>
103 <entry><structfield>memory</structfield></entry> 105 <entry><structfield>memory</structfield></entry>
104 <entry>Applications set this field to 106 <entry>Applications set this field to
105<constant>V4L2_MEMORY_MMAP</constant> or 107<constant>V4L2_MEMORY_MMAP</constant>,
108<constant>V4L2_MEMORY_DMABUF</constant> or
106<constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory" 109<constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory"
107/>.</entry> 110/>.</entry>
108 </row> 111 </row>