<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/media, branch v4.8.16</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.8.16</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.8.16'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2016-12-02T08:10:33+00:00</updated>
<entry>
<title>xc2028: Fix use-after-free bug properly</title>
<updated>2016-12-02T08:10:33+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2016-11-17T09:49:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5b08489eba14f66efec11ca7521744d6fd83e246'/>
<id>urn:sha1:5b08489eba14f66efec11ca7521744d6fd83e246</id>
<content type='text'>
commit 22a1e7783e173ab3d86018eb590107d68df46c11 upstream.

The commit 8dfbcc4351a0 ("[media] xc2028: avoid use after free") tried
to address the reported use-after-free by clearing the reference.

However, it's clearing the wrong pointer; it sets NULL to
priv-&gt;ctrl.fname, but it's anyway overwritten by the next line
memcpy(&amp;priv-&gt;ctrl, p, sizeof(priv-&gt;ctrl)).

OTOH, the actual code accessing the freed string is the strcmp() call
with priv-&gt;fname:
	if (!firmware_name[0] &amp;&amp; p-&gt;fname &amp;&amp;
	    priv-&gt;fname &amp;&amp; strcmp(p-&gt;fname, priv-&gt;fname))
		free_firmware(priv);

where priv-&gt;fname points to the previous file name, and this was
already freed by kfree().

For fixing the bug properly, this patch does the following:

- Keep the copy of firmware file name in only priv-&gt;fname,
  priv-&gt;ctrl.fname isn't changed;
- The allocation is done only when the firmware gets loaded;
- The kfree() is called in free_firmware() commonly

Fixes: commit 8dfbcc4351a0 ('[media] xc2028: avoid use after free')
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dib0700: fix nec repeat handling</title>
<updated>2016-11-18T09:51:44+00:00</updated>
<author>
<name>Sean Young</name>
<email>sean@mess.org</email>
</author>
<published>2016-11-10T16:44:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2e594273d4c526a2a65c665619acd8ed46317fd0'/>
<id>urn:sha1:2e594273d4c526a2a65c665619acd8ed46317fd0</id>
<content type='text'>
commit ba13e98f2cebd55a3744c5ffaa08f9dca73bf521 upstream.

When receiving a nec repeat, ensure the correct scancode is repeated
rather than a random value from the stack.  This removes the need for
the bogus uninitialized_var() and also fixes the warnings:

    drivers/media/usb/dvb-usb/dib0700_core.c: In function ‘dib0700_rc_urb_completion’:
    drivers/media/usb/dvb-usb/dib0700_core.c:679: warning: ‘protocol’ may be used uninitialized in this function

[sean addon: So after writing the patch and submitting it, I've bought the
             hardware on ebay. Without this patch you get random scancodes
             on nec repeats, which the patch indeed fixes.]

Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Tested-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>v4l: vsp1: Prevent pipelines from running when not streaming</title>
<updated>2016-11-10T15:38:57+00:00</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart+renesas@ideasonboard.com</email>
</author>
<published>2016-07-08T09:20:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4a22930a74acd6976db1eb128337c493ae972875'/>
<id>urn:sha1:4a22930a74acd6976db1eb128337c493ae972875</id>
<content type='text'>
commit e4e70a147a48618a36ae1b81c641516cb9d45993 upstream.

Pipelines can only be run if all their video nodes are streaming. Commit
b4dfb9b35a19 ("[media] v4l: vsp1: Stop the pipeline upon the first
STREAMOFF") fixed the pipeline stop sequence, but introduced a race
condition that makes it possible to run a pipeline after stopping the
stream on a video node by queuing a buffer on the other side of the
pipeline.

Fix this by clearing the buffers ready flag when stopping the stream,
which will prevent the QBUF handler from running the pipeline.

Fixes: b4dfb9b35a19 ("[media] v4l: vsp1: Stop the pipeline upon the first STREAMOFF")

Reported-by: Kieran Bingham &lt;kieran@bingham.xyz&gt;
Tested-by: Kieran Bingham &lt;kieran@bingham.xyz&gt;
Signed-off-by: Laurent Pinchart &lt;laurent.pinchart+renesas@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cx231xx: can't proceed if I2C bus register fails</title>
<updated>2016-10-28T07:45:24+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@s-opensource.com</email>
</author>
<published>2016-09-05T08:56:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7e511d9ee3f4fcf6d6b655b45e8571819c779a39'/>
<id>urn:sha1:7e511d9ee3f4fcf6d6b655b45e8571819c779a39</id>
<content type='text'>
commit 461af077d349b11106ca084e9ef2973a753d33ff upstream.

The driver should not ignore errors while registering the I2C
bus, as this device can't even minimally work without the buses,
as it uses those buses internally to talk with the several IP
blocks inside the chip.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cx231xx: fix GPIOs for Pixelview SBTVD hybrid</title>
<updated>2016-10-28T07:45:24+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2016-09-04T13:06:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5dfa69791d0fe7dd8f0cf08030636f4ac3ca871c'/>
<id>urn:sha1:5dfa69791d0fe7dd8f0cf08030636f4ac3ca871c</id>
<content type='text'>
commit 24b923f073ac37eb744f56a2c7f77107b8219ab2 upstream.

This device uses GPIOs: 28 to switch between analog and
digital modes: on digital mode, it should be set to 1.

The code that sets it on analog mode is OK, but it misses
the logic that sets it on digital mode.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cx231xx: don't return error on success</title>
<updated>2016-10-28T07:45:24+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2016-09-04T12:56:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c28907151b188ba5d944b07719642449f4efea1d'/>
<id>urn:sha1:c28907151b188ba5d944b07719642449f4efea1d</id>
<content type='text'>
commit 1871d718a9db649b70f0929d2778dc01bc49b286 upstream.

The cx231xx_set_agc_analog_digital_mux_select() callers
expect it to return 0 or an error. Returning a positive value
makes the first attempt to switch between analog/digital to fail.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mb86a20s: fix demod settings</title>
<updated>2016-10-28T07:45:24+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2016-09-04T13:43:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=43e5cd3be47759c2820c27dd6682e2ac19074abf'/>
<id>urn:sha1:43e5cd3be47759c2820c27dd6682e2ac19074abf</id>
<content type='text'>
commit 505a0ea706fc1db4381baa6c6bd2e596e730a55e upstream.

With the current settings, only one channel locks properly.
That's likely because, when this driver was written, Brazil
were still using experimental transmissions.

Change it to reproduce the settings used by the newer drivers.
That makes it lock on other channels.

Tested with both PixelView SBTVD Hybrid (cx231xx-based) and
C3Tech Digital Duo HDTV/SDTV (em28xx-based) devices.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mb86a20s: fix the locking logic</title>
<updated>2016-10-28T07:45:24+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2016-09-04T13:16:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f761acfaf21f8862be946a960ab965282d085a5b'/>
<id>urn:sha1:f761acfaf21f8862be946a960ab965282d085a5b</id>
<content type='text'>
commit dafb65fb98d85d8e78405e82c83e81975e5d5480 upstream.

On this frontend, it takes a while to start output normal
TS data. That only happens on state S9. On S8, the TS output
is enabled, but it is not reliable enough.

However, the zigzag loop is too fast to let it sync.

As, on practical tests, the zigzag software loop doesn't
seem to be helping, but just slowing down the tuning, let's
switch to hardware algorithm, as the tuners used on such
devices are capable of work with frequency drifts without
any help from software.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>[media] cx23885/saa7134: assign q-&gt;dev to the PCI device</title>
<updated>2016-09-19T15:38:05+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil@xs4all.nl</email>
</author>
<published>2016-09-18T14:24:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d8feef9bd447381952a33e6284241006f394c080'/>
<id>urn:sha1:d8feef9bd447381952a33e6284241006f394c080</id>
<content type='text'>
Fix a regression caused by commit 2bc46b3ad3c1 ("[media] media/pci:
convert drivers to use the new vb2_queue dev field").

Three places where q-&gt;dev should be set were missed, causing
a WARN.

Fixes: 2bc46b3ad3c1 ("[media] media/pci: convert drivers to use the new vb2_queue dev field").

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Reported-by: Marton Balint &lt;cus@passwd.hu&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] rcar-fcp: Make sure rcar_fcp_enable() returns 0 on success</title>
<updated>2016-09-15T12:02:16+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2016-08-09T15:36:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7892a1f64a447b6f65fe2888688883b7c26d81d3'/>
<id>urn:sha1:7892a1f64a447b6f65fe2888688883b7c26d81d3</id>
<content type='text'>
When resuming from suspend-to-RAM on r8a7795/salvator-x:

    dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1
    PM: Device fe940000.fdp1 failed to resume noirq: error 1
    dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1
    PM: Device fe944000.fdp1 failed to resume noirq: error 1
    dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1
    PM: Device fe948000.fdp1 failed to resume noirq: error 1

According to its documentation, rcar_fcp_enable() returns 0 on success
or a negative error code if an error occurs.  Hence
fdp1_pm_runtime_resume() and vsp1_pm_runtime_resume() forward its return
value to their callers.

However, rcar_fcp_enable() forwards the return value of
pm_runtime_get_sync(), which can actually be 1 on success, leading to
the resume failure above.

To fix this, consider only negative values returned by
pm_runtime_get_sync() to be failures.

Fixes: 7b49235e83b2347c ("[media] v4l: Add Renesas R-Car FCP driver")

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
</feed>
