linux-stable/drivers/media
Laurent Pinchart aff808e813 [media] v4l: tvp5150: Reset device at probe time, not in get/set format handlers
The tvp5150 doesn't support format setting through the subdev pad API
and thus implements the set format handler as a get format operation.
The single handler, tvp5150_fill_fmt(), resets the device by calling
tvp5150_reset(). This causes malfunction as the device can be reset at
will, possibly from userspace when the subdev userspace API is enabled.

The reset call was added in commit ec2c4f3f93 ("[media] media:
tvp5150: Add mbus_fmt callbacks"), probably as an attempt to set the
device to a known state before detecting the current TV standard.
However, the get format handler doesn't access the hardware to get the
TV standard since commit 963ddc63e2 ("[media] media: tvp5150: Add
cropping support"). There is thus no need to reset the device when
getting the format.

However, removing the tvp5150_reset() from the get/set format handlers
results in the function not being called at all if the bridge driver
doesn't use the .reset() operation. The operation is nowadays abused and
shouldn't be used, so shouldn't expect bridge drivers to call it. To
make sure the device is properly initialize, move the reset call from
the format handlers to the probe function.

Cc: stable@vger.kernel.org # For Kernel 4.5 and upper
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-12-21 07:28:20 -02:00
..
cec [media] cec: fix race between configuring and unconfiguring 2016-12-21 07:03:27 -02:00
common [media] v4l2-tpg: Init hv_enc field with a valid value 2016-11-29 12:12:13 -02:00
dvb-core [media] dvb-net: split the logic at dvb_net_ule() into other functions 2016-11-25 06:45:14 -02:00
dvb-frontends [media] mn88472: fix chip id check on probe 2016-12-01 12:47:22 -02:00
firewire [media] firewire: don't break long lines 2016-10-21 10:06:00 -02:00
i2c [media] v4l: tvp5150: Reset device at probe time, not in get/set format handlers 2016-12-21 07:28:20 -02:00
mmc
pci [media] media/cobalt: use pci_irq_allocate_vectors 2016-12-21 07:04:42 -02:00
platform [media] s5p-mfc: Add support for MFC v8 available in Exynos 5433 SoCs 2016-11-30 09:22:07 -02:00
radio [media] wl128x: use KERNEL_CONT where needed 2016-11-18 09:37:24 -02:00
rc [media] lirc: fix error paths in lirc_cdev_add() 2016-12-01 12:46:00 -02:00
spi [media] gs1662: drop kfree for memory allocated with devm_kzalloc 2016-10-24 17:59:08 -02:00
tuners Revert "[media] dvb_frontend: merge duplicate dvb_tuner_ops.release implementations" 2016-11-18 20:44:33 -02:00
usb [media] pctv452e: move buffer to heap, no mutex 2016-12-21 07:15:36 -02:00
v4l2-core [media] v4l: Add description of the Y8I, Y12I and Z16 formats 2016-11-23 20:04:43 -02:00
cec-edid.c [media] cec-edid: check for IEEE identifier 2016-08-22 14:04:51 -03:00
Kconfig [media] Kconfig: fix breakages when DVB_CORE is not selected 2016-11-18 17:59:17 -02:00
Makefile [media] cec: move the CEC framework out of staging and to media 2016-11-16 15:40:20 -02:00
media-device.c [media] media: remove obsolete Media Device Managed resource interfaces 2016-11-25 07:40:40 -02:00
media-devnode.c
media-entity.c [media] media-entity: clear media_gobj.mdev in _destroy() 2016-11-18 15:19:16 -02:00