<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/media/video/v4l2-ioctl.c, branch old/cs_9c15799622c9</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=old%2Fcs_9c15799622c9</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=old%2Fcs_9c15799622c9'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2012-08-14T02:02:38+00:00</updated>
<entry>
<title>[media] v4l: move v4l2 core into a separate directory</title>
<updated>2012-08-14T02:02:38+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@redhat.com</email>
</author>
<published>2012-06-14T19:35:52+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=5bc3cb743bbab408792c1b4ef31adf6268aa4b7e'/>
<id>urn:sha1:5bc3cb743bbab408792c1b4ef31adf6268aa4b7e</id>
<content type='text'>
Currently, the v4l2 core is mixed together with other non-core drivers.
Move them into a separate directory.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] Use a named union in struct v4l2_ioctl_info</title>
<updated>2012-07-31T00:43:25+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil@xs4all.nl</email>
</author>
<published>2012-07-12T15:06:24+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=26ddcbcca3057125a0e5f3901b06439a20869640'/>
<id>urn:sha1:26ddcbcca3057125a0e5f3901b06439a20869640</id>
<content type='text'>
Hi Mauro,

struct v4l2_ioctl_info uses an anonymous union, which is initialized
in the v4l2_ioctls table.

Unfortunately gcc &lt; 4.6 uses a non-standard syntax for that, so trying to
compile v4l2-ioctl.c with an older gcc will fail.

It is possible to work around this by testing the gcc version, but in this
case it is easier to make the union named since it is used in only a few
places.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Reported-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Acked-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] v4l2: add core support for the new VIDIOC_ENUM_FREQ_BANDS ioctl</title>
<updated>2012-07-30T23:23:05+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hans.verkuil@cisco.com</email>
</author>
<published>2012-07-05T09:37:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=82b655bfc32b793344ef0ddd46df8af8b98b55c7'/>
<id>urn:sha1:82b655bfc32b793344ef0ddd46df8af8b98b55c7</id>
<content type='text'>
This adds the usual core support code for this new ioctl.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] v4l2-ioctl.c: zero the v4l2_dv_timings_cap struct</title>
<updated>2012-07-30T22:12:27+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hans.verkuil@cisco.com</email>
</author>
<published>2012-07-11T12:15:06+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a1acb8f9a088193a66b4d176f5b9a7fb10356ae7'/>
<id>urn:sha1:a1acb8f9a088193a66b4d176f5b9a7fb10356ae7</id>
<content type='text'>
Zero all fields after the first type field.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] v4l2-ioctl: Don't assume file-&gt;private_data always points to a v4l2_fh</title>
<updated>2012-07-30T21:44:07+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil@xs4all.nl</email>
</author>
<published>2012-07-07T19:11:11+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=7a3ed2d95e9ef3032700c2e56f3369d8652a6e8b'/>
<id>urn:sha1:7a3ed2d95e9ef3032700c2e56f3369d8652a6e8b</id>
<content type='text'>
Commit efbceecd4522a41b8442c6b4f68b4508d57d1ccf, adds a number of helper
functions for ctrl related ioctls to v4l2-ioctl.c, these helpers assume that
if file-&gt;private_data != NULL, it points to a v4l2_fh, which is only the case
for drivers which actually use v4l2_fh.

This breaks for example bttv which use the "filedata" pointer for its own uses,
and now all the ctrl ioctls try to use whatever its filedata points to as
v4l2_fh and think it has a ctrl_handler, leading to:

[  142.499214] BUG: unable to handle kernel NULL pointer dereference at 0000000000000021
[  142.499270] IP: [&lt;ffffffffa01cb959&gt;] v4l2_queryctrl+0x29/0x230 [videodev]
[  142.514649]  [&lt;ffffffffa01c7a77&gt;] v4l_queryctrl+0x47/0x90 [videodev]
[  142.517417]  [&lt;ffffffffa01c58b1&gt;] __video_do_ioctl+0x2c1/0x420 [videodev]
[  142.520116]  [&lt;ffffffffa01c7ee6&gt;] video_usercopy+0x1a6/0x470 [videodev]
...

This patch adds the missing test_bit(V4L2_FL_USES_V4L2_FH, &amp;vfd-&gt;flags) tests
to the ctrl ioctl helpers v4l2_fh paths, fixing the issues with for example
the bttv driver.

Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] Fix VIDIOC_TRY_EXT_CTRLS regression</title>
<updated>2012-07-30T14:55:24+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil@xs4all.nl</email>
</author>
<published>2012-07-18T12:34:59+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=9bc31633c20ca6a49071f2162c232ae556151cc2'/>
<id>urn:sha1:9bc31633c20ca6a49071f2162c232ae556151cc2</id>
<content type='text'>
Fixes an omission in the new v4l2_ioctls table: VIDIOC_TRY_EXT_CTRLS
must get the INFO_FL_CTRL flag, just like all the other control
related ioctls, otherwise the ioctl core won't know it also has
to check whether v4l2_fh-&gt;ctrl_handler is non-zero before it can
decide that this ioctl is not implemented.

Caught by v4l2-compliance while I was testing the mem2mem_testdev driver.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] v4l2-dev/ioctl.c: add vb2_queue support to video_device</title>
<updated>2012-07-06T20:30:54+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hans.verkuil@cisco.com</email>
</author>
<published>2012-06-22T10:29:35+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=5a5adf6b669cf1a3dd2af419cd68a4c491f384a3'/>
<id>urn:sha1:5a5adf6b669cf1a3dd2af419cd68a4c491f384a3</id>
<content type='text'>
This prepares struct video_device for easier integration with vb2.

It also introduces a new lock that protects the vb2_queue. It is up
to the driver to use it or not. And the driver can associate an owner
filehandle with the queue to check whether queuing requests are
permitted for the calling filehandle.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] v4l2-ioctl: remove v4l_(i2c_)print_ioctl</title>
<updated>2012-07-06T20:26:46+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hans.verkuil@cisco.com</email>
</author>
<published>2012-06-22T09:38:06+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4a085168b59ec0fb18eb7fa023dcc47f4db14655'/>
<id>urn:sha1:4a085168b59ec0fb18eb7fa023dcc47f4db14655</id>
<content type='text'>
v4l_i2c_print_ioctl wasn't used and v4l_print_ioctl could be replaced by
v4l_printk_ioctl.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] v4l2-dev.c: add debug sysfs entry</title>
<updated>2012-07-06T20:25:31+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hans.verkuil@cisco.com</email>
</author>
<published>2012-06-22T09:37:38+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=80131fe06e0bdd7b429594493c1317ddede89a61'/>
<id>urn:sha1:80131fe06e0bdd7b429594493c1317ddede89a61</id>
<content type='text'>
Since this could theoretically change the debug value while in the middle
of v4l2-ioctl.c, we make a copy of vfd-&gt;debug to ensure consistent debug
behavior.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] v4l2-ioctl.c: finalize table conversion</title>
<updated>2012-07-06T20:20:07+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hans.verkuil@cisco.com</email>
</author>
<published>2012-06-22T09:35:01+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f18d8e07b28e2950679edaa4edaa7ce410dd57fc'/>
<id>urn:sha1:f18d8e07b28e2950679edaa4edaa7ce410dd57fc</id>
<content type='text'>
Implement the default case which finalizes the table conversion and allows
us to remove the last part of the switch.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
</feed>
