<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/media/platform/soc_camera/mx2_camera.c, branch v4.3.3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>[media] v4l2: replace s_mbus_fmt by set_fmt in bridge drivers</title>
<updated>2015-05-01T12:01:16+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hans.verkuil@cisco.com</email>
</author>
<published>2015-04-09T07:05:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ebf984bb151e9952cccd060d3aba0b4d30a87e81'/>
<id>ebf984bb151e9952cccd060d3aba0b4d30a87e81</id>
<content type='text'>
Replace all calls to s_mbus_fmt in bridge drivers by calls to the
set_fmt pad op.

Remove the old try/s_mbus_fmt video ops since they are now no longer used.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Cc: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Acked-by: Prabhakar Lad &lt;prabhakar.csengg@gmail.com&gt;
Acked-by: Scott Jiang &lt;scott.jiang.linux@gmail.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace all calls to s_mbus_fmt in bridge drivers by calls to the
set_fmt pad op.

Remove the old try/s_mbus_fmt video ops since they are now no longer used.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Cc: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Acked-by: Prabhakar Lad &lt;prabhakar.csengg@gmail.com&gt;
Acked-by: Scott Jiang &lt;scott.jiang.linux@gmail.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] v4l2: replace try_mbus_fmt by set_fmt in bridge drivers</title>
<updated>2015-05-01T11:59:28+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hans.verkuil@cisco.com</email>
</author>
<published>2015-04-09T07:05:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5eab4983777ba913efb42dd0f177b0dcdbd4f3d9'/>
<id>5eab4983777ba913efb42dd0f177b0dcdbd4f3d9</id>
<content type='text'>
Replace all calls to try_mbus_fmt in bridge drivers by calls to the
set_fmt pad op.

[mchehab@osg.samsung.com: fix a merge conflict at mcam-core.c]
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Cc: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Acked-by: Scott Jiang &lt;scott.jiang.linux@gmail.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace all calls to try_mbus_fmt in bridge drivers by calls to the
set_fmt pad op.

[mchehab@osg.samsung.com: fix a merge conflict at mcam-core.c]
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Cc: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Acked-by: Scott Jiang &lt;scott.jiang.linux@gmail.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] v4l2: replace video op g_mbus_fmt by pad op get_fmt</title>
<updated>2015-05-01T11:36:17+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hans.verkuil@cisco.com</email>
</author>
<published>2015-04-09T07:02:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=da298c6d98d531de778ba8dd6657b1093ef855d0'/>
<id>da298c6d98d531de778ba8dd6657b1093ef855d0</id>
<content type='text'>
The g_mbus_fmt video op is a duplicate of the pad op. Replace all uses
by the get_fmt pad op and remove the video op.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Acked-by: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Acked-by: Prabhakar Lad &lt;prabhakar.csengg@gmail.com&gt;
Cc: Kamil Debski &lt;k.debski@samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The g_mbus_fmt video op is a duplicate of the pad op. Replace all uses
by the get_fmt pad op and remove the video op.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Acked-by: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Acked-by: Prabhakar Lad &lt;prabhakar.csengg@gmail.com&gt;
Cc: Kamil Debski &lt;k.debski@samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] v4l2: replace enum_mbus_fmt by enum_mbus_code</title>
<updated>2015-05-01T11:33:45+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hans.verkuil@cisco.com</email>
</author>
<published>2015-04-09T07:01:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ebcff5fce6b189306756b0cb06779e15f1c93848'/>
<id>ebcff5fce6b189306756b0cb06779e15f1c93848</id>
<content type='text'>
Replace all calls to the enum_mbus_fmt video op by the pad
enum_mbus_code op and remove the duplicate video op.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Acked-by: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Acked-by: Scott Jiang &lt;scott.jiang.linux@gmail.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Kamil Debski &lt;k.debski@samsung.com&gt;
Acked-by: Prabhakar Lad &lt;prabhakar.csengg@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace all calls to the enum_mbus_fmt video op by the pad
enum_mbus_code op and remove the duplicate video op.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Acked-by: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Acked-by: Scott Jiang &lt;scott.jiang.linux@gmail.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Kamil Debski &lt;k.debski@samsung.com&gt;
Acked-by: Prabhakar Lad &lt;prabhakar.csengg@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] soc-camera: fix device capabilities in multiple camera host drivers</title>
<updated>2015-01-21T23:05:45+00:00</updated>
<author>
<name>Guennadi Liakhovetski</name>
<email>g.liakhovetski@gmx.de</email>
</author>
<published>2015-01-18T19:30:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7d96c3e446b4a786a6a4a7733deb9d1634a9ad4d'/>
<id>7d96c3e446b4a786a6a4a7733deb9d1634a9ad4d</id>
<content type='text'>
The V4L2 API requires both .capabilities and .device_caps fields of
struct v4l2_capability to be set. Otherwise the compliance checker
complains and since commit "v4l2-ioctl: WARN_ON if querycap didn't fill
device_caps" a compile-time warning is issued. Fix this non-compliance
in several soc-camera camera host drivers.

Reported-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Tested-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The V4L2 API requires both .capabilities and .device_caps fields of
struct v4l2_capability to be set. Otherwise the compliance checker
complains and since commit "v4l2-ioctl: WARN_ON if querycap didn't fill
device_caps" a compile-time warning is issued. Fix this non-compliance
in several soc-camera camera host drivers.

Reported-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Tested-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] platform: Make use of media_bus_format enum</title>
<updated>2014-11-14T19:54:08+00:00</updated>
<author>
<name>Boris BREZILLON</name>
<email>boris.brezillon@free-electrons.com</email>
</author>
<published>2014-11-10T17:28:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=27ffaeb0ab160852c87e2dfa505594020e9a3a06'/>
<id>27ffaeb0ab160852c87e2dfa505594020e9a3a06</id>
<content type='text'>
In order to have subsytem agnostic media bus format definitions we've
moved media bus definition to include/uapi/linux/media-bus-format.h and
prefixed values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT.

Reference new definitions in all platform drivers.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Acked-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Acked-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Acked-by: Sekhar Nori &lt;nsekhar@ti.com&gt;
Acked-by: Lad, Prabhakar &lt;prabhakar.csengg@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to have subsytem agnostic media bus format definitions we've
moved media bus definition to include/uapi/linux/media-bus-format.h and
prefixed values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT.

Reference new definitions in all platform drivers.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Acked-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Acked-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Acked-by: Sekhar Nori &lt;nsekhar@ti.com&gt;
Acked-by: Lad, Prabhakar &lt;prabhakar.csengg@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] mx2-camera: potential negative underflow bug</title>
<updated>2014-09-26T09:47:43+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2014-09-18T12:23:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5d6de11c331d61dd27cf02f54243ebd1fcfbbfb3'/>
<id>5d6de11c331d61dd27cf02f54243ebd1fcfbbfb3</id>
<content type='text'>
My static checker complains:

	drivers/media/platform/soc_camera/mx2_camera.c:1070
	mx2_emmaprp_resize() warn: no lower bound on 'num'

The heuristic is that it's looking for values which the user can
influence and we put an upper bound on them but we (perhaps
accidentally) allow negative numbers.

I am not very familiar with this code but I have looked at it and think
there might be a bug.  Making the variable unsigned seems like a safe
option either way and this silences the static checker warning.

The call tree is:
  -&gt; subdev_do_ioctl()
     -&gt; mx2_camera_set_fmt()
        -&gt; mx2_emmaprp_resize()
The check:
	if (num &gt; RESIZE_NUM_MAX)
can underflow and then we use "num" on the else path.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
My static checker complains:

	drivers/media/platform/soc_camera/mx2_camera.c:1070
	mx2_emmaprp_resize() warn: no lower bound on 'num'

The heuristic is that it's looking for values which the user can
influence and we put an upper bound on them but we (perhaps
accidentally) allow negative numbers.

I am not very familiar with this code but I have looked at it and think
there might be a bug.  Making the variable unsigned seems like a safe
option either way and this silences the static checker warning.

The call tree is:
  -&gt; subdev_do_ioctl()
     -&gt; mx2_camera_set_fmt()
        -&gt; mx2_emmaprp_resize()
The check:
	if (num &gt; RESIZE_NUM_MAX)
can underflow and then we use "num" on the else path.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] mx2_camera: get rid of a warning</title>
<updated>2014-08-26T21:52:14+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>m.chehab@samsung.com</email>
</author>
<published>2014-08-26T14:20:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=615f1bcb34317afc615043dd61ba54198f075629'/>
<id>615f1bcb34317afc615043dd61ba54198f075629</id>
<content type='text'>
drivers/media/platform/soc_camera/mx2_camera.c: In function 'mx27_camera_emma_prp_reset':
drivers/media/platform/soc_camera/mx2_camera.c:812:6: warning: variable 'cntl' set but not used [-Wunused-but-set-variable]
  u32 cntl;
      ^

Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
drivers/media/platform/soc_camera/mx2_camera.c: In function 'mx27_camera_emma_prp_reset':
drivers/media/platform/soc_camera/mx2_camera.c:812:6: warning: variable 'cntl' set but not used [-Wunused-but-set-variable]
  u32 cntl;
      ^

Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] vb2: stop_streaming should return void</title>
<updated>2014-04-23T13:12:51+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hans.verkuil@cisco.com</email>
</author>
<published>2014-04-17T05:47:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e37559b22c63b557d242bfa1a07ab1b8f7d5d9f1'/>
<id>e37559b22c63b557d242bfa1a07ab1b8f7d5d9f1</id>
<content type='text'>
The vb2 core ignores any return code from the stop_streaming op.
And there really isn't anything it can do anyway in case of an error.
So change the return type to void and update any drivers that implement it.

The int return gave drivers the idea that this operation could actually
fail, but that's really not the case.

The pwc amd sdr-msi3101 drivers both had this construction:

        if (mutex_lock_interruptible(&amp;s-&gt;v4l2_lock))
                return -ERESTARTSYS;

This has been updated to just call mutex_lock(). The stop_streaming op
expects this to really stop streaming and I very much doubt this will
work reliably if stop_streaming just returns without really stopping the
DMA.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Acked-by: Pawel Osciak &lt;pawel@osciak.com&gt;
Acked-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The vb2 core ignores any return code from the stop_streaming op.
And there really isn't anything it can do anyway in case of an error.
So change the return type to void and update any drivers that implement it.

The int return gave drivers the idea that this operation could actually
fail, but that's really not the case.

The pwc amd sdr-msi3101 drivers both had this construction:

        if (mutex_lock_interruptible(&amp;s-&gt;v4l2_lock))
                return -ERESTARTSYS;

This has been updated to just call mutex_lock(). The stop_streaming op
expects this to really stop streaming and I very much doubt this will
work reliably if stop_streaming just returns without really stopping the
DMA.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Acked-by: Pawel Osciak &lt;pawel@osciak.com&gt;
Acked-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[media] v4l: Rename vb2_queue.timestamp_type as timestamp_flags</title>
<updated>2014-03-05T19:34:14+00:00</updated>
<author>
<name>Sakari Ailus</name>
<email>sakari.ailus@iki.fi</email>
</author>
<published>2014-02-25T22:12:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ade48681f132188599c5cefa8a3287c2a26fb738'/>
<id>ade48681f132188599c5cefa8a3287c2a26fb738</id>
<content type='text'>
The timestamp_type field used to contain only the timestamp type. Soon it
will be used for timestamp source flags as well. Rename the field
accordingly.

[m.chehab@samsung.com: do the change also to drivers/staging/media and at s2255]
Signed-off-by: Sakari Ailus &lt;sakari.ailus@iki.fi&gt;
Acked-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The timestamp_type field used to contain only the timestamp type. Soon it
will be used for timestamp source flags as well. Rename the field
accordingly.

[m.chehab@samsung.com: do the change also to drivers/staging/media and at s2255]
Signed-off-by: Sakari Ailus &lt;sakari.ailus@iki.fi&gt;
Acked-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
