summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-04-07 10:01:28 -0300
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:59:05 +0900
commitb148c5427fb280e1fe02a9835ff78d7a0554829f (patch)
tree8d5db78aaa7aedd6f0d3043adbcfb2711f37b39c /Documentation
parentf02d382e1cc6757a2413d1b8222a8b9de3417ec5 (diff)
downloadlinux-3.10-b148c5427fb280e1fe02a9835ff78d7a0554829f.tar.gz
linux-3.10-b148c5427fb280e1fe02a9835ff78d7a0554829f.tar.bz2
linux-3.10-b148c5427fb280e1fe02a9835ff78d7a0554829f.zip
upstream: [media] DocBook media: update bytesused field description
For output buffers the application has to set the bytesused field. In reality applications often do not set this since drivers that deal with fix image sizes just override it anyway. The vb2 framework will replace this field with the length field if bytesused was set to 0 by the application, which is what happens in practice. Document this behavior. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/DocBook/media/v4l/io.xml13
1 files changed, 11 insertions, 2 deletions
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml
index 8d7afdbfe21..d8c9924cf02 100644
--- a/Documentation/DocBook/media/v4l/io.xml
+++ b/Documentation/DocBook/media/v4l/io.xml
@@ -685,7 +685,12 @@ linkend="v4l2-buf-type" /></entry>
buffer. It depends on the negotiated data format and may change with
each buffer for compressed variable size data like JPEG images.
Drivers must set this field when <structfield>type</structfield>
-refers to an input stream, applications when it refers to an output stream.</entry>
+refers to an input stream, applications when it refers to an output stream.
+If the application sets this to 0 for an output stream, then
+<structfield>bytesused</structfield> will be set to the size of the
+buffer (see the <structfield>length</structfield> field of this struct) by
+the driver. For multiplanar formats this field is ignored and the
+<structfield>planes</structfield> pointer is used instead.</entry>
</row>
<row>
<entry>__u32</entry>
@@ -847,7 +852,11 @@ should set this to 0.</entry>
<entry></entry>
<entry>The number of bytes occupied by data in the plane
(its payload). Drivers must set this field when <structfield>type</structfield>
- refers to an input stream, applications when it refers to an output stream.</entry>
+ refers to an input stream, applications when it refers to an output stream.
+ If the application sets this to 0 for an output stream, then
+ <structfield>bytesused</structfield> will be set to the size of the
+ plane (see the <structfield>length</structfield> field of this struct)
+ by the driver.</entry>
</row>
<row>
<entry>__u32</entry>