<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/media, branch v4.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-03-10T18:10:59Z</updated>
<entry>
<title>[media] media-device: map new functions into old types for legacy API</title>
<updated>2016-03-10T18:10:59Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2016-03-05T10:13:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b2cd27448b33de9069d580d8f229efef434b64e6'/>
<id>urn:sha1:b2cd27448b33de9069d580d8f229efef434b64e6</id>
<content type='text'>
The legacy media controller userspace API exposes entity types that
carry both type and function information. The new API replaces the type
with a function. It preserves backward compatibility by defining legacy
functions for the existing types and using them in drivers.

This works fine, as long as newer entity functions won't be added.

Unfortunately, some tools, like media-ctl with --print-dot argument
rely on the now legacy MEDIA_ENT_T_V4L2_SUBDEV and MEDIA_ENT_T_DEVNODE
numeric ranges to identify what entities will be shown.

Also, if the entity doesn't match those ranges, it will ignore the
major/minor information on devnodes, and won't be getting the devnode
name via udev or sysfs.

As we're now adding devices outside the old range, the legacy ioctl
needs to map the new entity functions into a type at the old range,
or otherwise we'll have a regression.

Detected on all released media-ctl versions (e. g. versions &lt;= 1.10).

Fix this by deriving the type from the function to emulate the legacy
API if the function isn't in the legacy functions range.

Reported-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] adv7604: fix tx 5v detect regression</title>
<updated>2016-02-16T11:38:51Z</updated>
<author>
<name>Hans Verkuil</name>
<email>hansverk@cisco.com</email>
</author>
<published>2016-02-10T10:09:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0ba4581c84cfb39fd527f6b3457f1c97f6356c04'/>
<id>urn:sha1:0ba4581c84cfb39fd527f6b3457f1c97f6356c04</id>
<content type='text'>
The 5 volt detect functionality broke in 3.14: the code reads IO register 0x70
again after it has already been cleared. Instead it should use the cached
irq_reg_0x70 value and the io_write to 0x71 to clear 0x70 can be dropped since
this has already been done.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;      # for v3.14 and up
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] media.h: get rid of MEDIA_ENT_F_CONN_TEST</title>
<updated>2016-02-16T11:15:23Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2016-02-12T17:44:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9727a9545adec59f4bccb83d1a709711f4acf242'/>
<id>urn:sha1:9727a9545adec59f4bccb83d1a709711f4acf242</id>
<content type='text'>
Defining it as a connector was a bad idea. Remove it while it is
not too late.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] media: i2c/adp1653: probe: fix erroneous return value</title>
<updated>2016-02-10T11:27:29Z</updated>
<author>
<name>Anton Protopopov</name>
<email>a.s.protopopov@gmail.com</email>
</author>
<published>2016-02-07T04:27:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b888d232142c0ac111c7e82d1731c6fbd56fc1fe'/>
<id>urn:sha1:b888d232142c0ac111c7e82d1731c6fbd56fc1fe</id>
<content type='text'>
The adp1653_probe() function may return positive value EINVAL
which is obviously wrong.

Signed-off-by: Anton Protopopov &lt;a.s.protopopov@gmail.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] saa7134-alsa: Only frees registered sound cards</title>
<updated>2016-02-04T18:26:10Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2016-02-04T17:59:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ac75fe5d8fe4a0bf063be18fb29684405279e79e'/>
<id>urn:sha1:ac75fe5d8fe4a0bf063be18fb29684405279e79e</id>
<content type='text'>
That prevents this bug:
[ 2382.269496] BUG: unable to handle kernel NULL pointer dereference at 0000000000000540
[ 2382.270013] IP: [&lt;ffffffffa01fe616&gt;] snd_card_free+0x36/0x70 [snd]
[ 2382.270013] PGD 0
[ 2382.270013] Oops: 0002 [#1] SMP
[ 2382.270013] Modules linked in: saa7134_alsa(-) tda1004x saa7134_dvb videobuf2_dvb dvb_core tda827x tda8290 tuner saa7134 tveeprom videobuf2_dma_sg videobuf2_memops videobuf2_v4l2 videobuf2_core v4l2_common videodev media auth_rpcgss nfsv4 dns_resolver nfs lockd grace sunrpc tun bridge stp llc ebtables ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack it87 hwmon_vid snd_hda_codec_idt snd_hda_codec_generic iTCO_wdt iTCO_vendor_support snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core snd_seq pcspkr i2c_i801 snd_seq_device snd_pcm snd_timer lpc_ich snd mfd_core soundcore binfmt_misc i915 video i2c_algo_bit drm_kms_helper drm r8169 ata_generic serio_raw pata_acpi mii i2c_core [last unloaded: videobuf2_memops]
[ 2382.270013] CPU: 0 PID: 4899 Comm: rmmod Not tainted 4.5.0-rc1+ #4
[ 2382.270013] Hardware name: PCCHIPS P17G/P17G, BIOS 080012  05/14/2008
[ 2382.270013] task: ffff880039c38000 ti: ffff88003c764000 task.ti: ffff88003c764000
[ 2382.270013] RIP: 0010:[&lt;ffffffffa01fe616&gt;]  [&lt;ffffffffa01fe616&gt;] snd_card_free+0x36/0x70 [snd]
[ 2382.270013] RSP: 0018:ffff88003c767ea0  EFLAGS: 00010286
[ 2382.270013] RAX: ffff88003c767eb8 RBX: 0000000000000000 RCX: 0000000000006260
[ 2382.270013] RDX: ffffffffa020a060 RSI: ffffffffa0206de1 RDI: ffff88003c767eb0
[ 2382.270013] RBP: ffff88003c767ed8 R08: 0000000000019960 R09: ffffffff811a5412
[ 2382.270013] R10: ffffea0000d7c200 R11: 0000000000000000 R12: ffff88003c767ea8
[ 2382.270013] R13: 00007ffe760617f7 R14: 0000000000000000 R15: 0000557625d7f1e0
[ 2382.270013] FS:  00007f80bb1c0700(0000) GS:ffff88003f400000(0000) knlGS:0000000000000000
[ 2382.270013] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 2382.270013] CR2: 0000000000000540 CR3: 000000003c00f000 CR4: 00000000000006f0
[ 2382.270013] Stack:
[ 2382.270013]  000000003c767ed8 ffffffff00000000 ffff880000000000 ffff88003c767eb8
[ 2382.270013]  ffff88003c767eb8 ffffffffa049a890 00007ffe76060060 ffff88003c767ef0
[ 2382.270013]  ffffffffa049889d ffffffffa049a500 ffff88003c767f48 ffffffff8111079c
[ 2382.270013] Call Trace:
[ 2382.270013]  [&lt;ffffffffa049889d&gt;] saa7134_alsa_exit+0x1d/0x780 [saa7134_alsa]
[ 2382.270013]  [&lt;ffffffff8111079c&gt;] SyS_delete_module+0x19c/0x1f0
[ 2382.270013]  [&lt;ffffffff8170fc2e&gt;] entry_SYSCALL_64_fastpath+0x12/0x71
[ 2382.270013] Code: 20 a0 48 c7 c6 e1 6d 20 a0 48 89 e5 41 54 53 4c 8d 65 d0 48 89 fb 48 83 ec 28 c7 45 d0 00 00 00 00 49 8d 7c 24 08 e8 7a 55 ed e0 &lt;4c&gt; 89 a3 40 05 00 00 48 89 df e8 eb fd ff ff 85 c0 75 1a 48 8d
[ 2382.270013] RIP  [&lt;ffffffffa01fe616&gt;] snd_card_free+0x36/0x70 [snd]
[ 2382.270013]  RSP &lt;ffff88003c767ea0&gt;
[ 2382.270013] CR2: 0000000000000540

Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] vb2-core: call threadio-&gt;fnc() if !VB2_BUF_STATE_ERROR</title>
<updated>2016-02-04T11:15:51Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2016-02-03T21:30:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1f2c450185b7b8d50d38d37ee30387ff4cd337f8'/>
<id>urn:sha1:1f2c450185b7b8d50d38d37ee30387ff4cd337f8</id>
<content type='text'>
changeset 70433a152f0 ("media: videobuf2: Refactor vb2_fileio_data
and vb2_thread") broke videobuf2-dvb.

The root cause is that, instead of calling threadio-&gt;fnc() for
all types of events except for VB2_BUF_STATE_ERROR, it was calling
it only for VB2_BUF_STATE_DONE.

With that, the DVB thread were never called.

Cc: stable@vger.kernel.org # Kernel &gt;= 4.3
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] vb2: fix nasty vb2_thread regression</title>
<updated>2016-02-04T11:13:46Z</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil@xs4all.nl</email>
</author>
<published>2016-01-27T12:08:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fac710e45d0b12443acd4d905c9acec27ab4ca14'/>
<id>urn:sha1:fac710e45d0b12443acd4d905c9acec27ab4ca14</id>
<content type='text'>
The vb2_thread implementation was made generic and was moved from
videobuf2-v4l2.c to videobuf2-core.c in commit af3bac1a. Unfortunately
that clearly was never tested since it broke read() causing NULL address
references.

The root cause was confused handling of vb2_buffer vs v4l2_buffer (the pb
pointer in various core functions).

The v4l2_buffer no longer exists after moving the code into the core and
it is no longer needed. However, the vb2_thread code passed a pointer to
a vb2_buffer to the core functions were a v4l2_buffer pointer was expected
and vb2_thread expected that the vb2_buffer fields would be filled in
correctly.

This is obviously wrong since v4l2_buffer != vb2_buffer. Note that the
pb pointer is a void pointer, so no type-checking took place.

This patch fixes this problem:

1) allow pb to be NULL for vb2_core_(d)qbuf. The vb2_thread code will use
   a NULL pointer here since they don't care about v4l2_buffer anyway.
2) let vb2_core_dqbuf pass back the index of the received buffer. This is
   all vb2_thread needs: this index is the index into the q-&gt;bufs array
   and vb2_thread just gets the vb2_buffer from there.
3) the fileio-&gt;b pointer (that originally contained a v4l2_buffer) is
   removed altogether since it is no longer needed.

Tested with vivid and the cobalt driver.

Cc: stable@vger.kernel.org # Kernel &gt;= 4.3
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Reported-by: Matthias Schwarzott &lt;zzam@gentoo.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] tda1004x: only update the frontend properties if locked</title>
<updated>2016-02-04T11:10:45Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2016-02-03T19:33:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e8beb02343e7582980c6705816cd957cf4f74c7a'/>
<id>urn:sha1:e8beb02343e7582980c6705816cd957cf4f74c7a</id>
<content type='text'>
The tda1004x was updating the properties cache before locking.
If the device is not locked, the data at the registers are just
random values with no real meaning.

This caused the driver to fail with libdvbv5, as such library
calls GET_PROPERTY from time to time, in order to return the
DVB stats.

Tested with a saa7134 card 78:
	ASUSTeK P7131 Dual, vendor PCI ID: 1043:4862

Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] media: i2c: Don't export ir-kbd-i2c module alias</title>
<updated>2016-02-01T15:19:31Z</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javier@osg.samsung.com</email>
</author>
<published>2016-01-27T14:03:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=329d88da4df9a96da43018aceabd3a06e6a7e7ae'/>
<id>urn:sha1:329d88da4df9a96da43018aceabd3a06e6a7e7ae</id>
<content type='text'>
This is a partial revert of commit ed8d1cf07cb16d ("[media] Export I2C
module alias information in missing drivers") that exported the module
aliases for the I2C drivers that were missing to make autoload to work.

But there is a bug report [0] that auto load of the ir-kbd-i2c driver
cause the Hauppauge HD-PVR driver to not behave correctly.

This is a hdpvr latent bug that was just exposed by ir-kbd-i2c module
autoloading working and will also happen if the I2C driver is built-in
or a user calls modprobe to load the module and register the driver.

But there is a regression experimented by users so until the real bug
is fixed, let's not export the module alias for the ir-kbd-i2c driver
even when this just masks the actual issue.

[0]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810726

Fixes: ed8d1cf07cb1 ("[media] Export I2C module alias information in missing drivers")

Cc: &lt;stable@vger.kernel.org&gt; # 4.3+
Signed-off-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] exynos4-is: make VIDEO_SAMSUNG_EXYNOS4_IS tristate</title>
<updated>2016-01-25T14:53:17Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2015-12-04T22:20:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a63abe389d56f6f7b1541c2084b453c9dfdb89dc'/>
<id>urn:sha1:a63abe389d56f6f7b1541c2084b453c9dfdb89dc</id>
<content type='text'>
With CONFIG_V4L2=m and VIDEO_SAMSUNG_EXYNOS4_IS=y, we can select the
individual drivers as built-in code when that should not be possible:

drivers/built-in.o: In function `s5pcsis_set_fmt':
policy.c:(.text+0x13afdc): undefined reference to `v4l_bound_align_image'
drivers/built-in.o: In function `s5pcsis_probe':
policy.c:(.text+0x13b440): undefined reference to `v4l2_of_parse_endpoint'
policy.c:(.text+0x13b72c): undefined reference to `v4l2_subdev_init'

Changing VIDEO_SAMSUNG_EXYNOS4_IS to tristate means that the dependency
from CONFIG_V4L2 propates to the individual Kconfig symbols and they
can only be built as loadable modules if V4L2 or any other of the
dependencies itself is a module.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
</feed>
