summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [media] tvp7002: Include linux/of.h headerSachin Kamat2013-10-311-0/+1
| | | | | | | | | 'of_match_ptr' is defined in linux/of.h. Include it explicitly to avoid build breakage in the future. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] tvp514x: Include linux/of.h headerSachin Kamat2013-10-311-0/+1
| | | | | | | | | 'of_match_ptr' is defined in linux/of.h. Include it explicitly to avoid build breakage in the future. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] ths8200: Include linux/of.h headerSachin Kamat2013-10-311-0/+1
| | | | | | | | | 'of_match_ptr' is defined in linux/of.h. Include it explicitly to avoid build breakage in the future. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] adv7343: Include linux/of.h headerSachin Kamat2013-10-311-0/+1
| | | | | | | | | 'of_match_ptr' is defined in linux/of.h. Include it explicitly to avoid build breakage in the future. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: Fix typo in v4l2_subdev_get_try_crop()Laurent Pinchart2013-10-311-1/+1
| | | | | | | | | The helper function is defined by a macro that is erroneously called with the compose rectangle instead of the crop rectangle. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] media: i2c: add driver for dual LED Flash, lm3560Daniel Jeong2013-10-314-0/+595
| | | | | | | | | | | | | Adds the driver for the LM3560, dual LED Flash The LM3560 has two 1A constant current driver for high current white LEDs. It is controlled via an I2C compatible interface(up to 400kHz). Each flash brightness, torch brightness and enable/disable can be controlled independantly, but flash timeout and operation mode are shared. Signed-off-by: Daniel Jeong <gshark.jeong@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] rtl28xxu: add 15f4:0131 Astrometa DVB-T2Antti Palosaari2013-10-311-0/+3
| | | | | | | | Components are RTL2832P + R828D + MN88472. Currently support only DVB-T as there is no driver for MN88472 demod. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] rtl28xxu: add RTL2832P + R828D supportAntti Palosaari2013-10-312-0/+40
| | | | | | | | RTL2832P is version of RTL2832U with extra TS interface. As for now, we support only integrated RTL2832 demod. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] rtl2832: add new tuner R828DAntti Palosaari2013-10-312-0/+2
| | | | | | | Use R820T config for R828D too as those are about same tuner. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] r820t: add support for R828DAntti Palosaari2013-10-311-9/+13
| | | | | | | | | | | | | | | | Small changes in order to support tuner version R828D @ 16 MHz clock. There was 'vco_fine_tune' check, which seems to adjust synthesizer output divider (mixer dix / LO div / Rout) by one. R828D seems to return vco_fine_tune=1 every time and that condition causes tuning fail as output divider was increased by one. Resolve problem by skipping whole condition in case of R828D tuner. Just to mention, other tuner, R820T, seems to return 2 here. Synthesizer maximum frequency check was hard coded to check synthesizer N and thus worked correctly only for clock frequencies around 30 MHz. As whole test is quite useless in any case, I removed it totally. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] media/i2c: ths8200: fix build failure with gcc 4.5.4Russell King - ARM Linux2013-10-311-7/+11
| | | | | | | | | | | | | | | | v3.12-rc fails to build with this error: drivers/media/i2c/ths8200.c:49:2: error: unknown field 'bt' specified in initializer drivers/media/i2c/ths8200.c:50:3: error: field name not in record or union initializer drivers/media/i2c/ths8200.c:50:3: error: (near initialization for 'ths8200_timings_cap.reserved') drivers/media/i2c/ths8200.c:51:3: error: field name not in record or union initializer drivers/media/i2c/ths8200.c:51:3: error: (near initialization for 'ths8200_timings_cap.reserved') ... with gcc 4.5.4. This error was not detected in builds prior to v3.12-rc. This patch fixes this. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Cc: stable@vger.kernel.org # For kernel v3.12 Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] Add support for KWorld UB435-Q V2Jean-Francois Thibert2013-10-313-1/+50
| | | | | | | | | | | | | | | This patch adds support for the UB435-Q V2. You might need to use the device once with the Windows driver provided by KWorld in order to permanently reprogram the device descriptors. Thanks to Jarod Wilson for the initial attempt at adding support for this device. [m.chehab@samsung.com: Fixed Whitespace mangling, Coding Style and improved the error handling at DVB attach] Signed-off-by: Jean-Francois Thibert <jfthibert@google.com> Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] staging/media: fix msi3101 build errorsRandy Dunlap2013-10-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix build error when VIDEOBUF2_CORE=m and USB_MSI3101=y. drivers/built-in.o: In function `msi3101_buf_queue': sdr-msi3101.c:(.text+0x1298d6): undefined reference to `vb2_buffer_done' drivers/built-in.o: In function `msi3101_cleanup_queued_bufs': sdr-msi3101.c:(.text+0x1299c7): undefined reference to `vb2_buffer_done' drivers/built-in.o: In function `msi3101_isoc_handler': sdr-msi3101.c:(.text+0x12a08d): undefined reference to `vb2_plane_vaddr' sdr-msi3101.c:(.text+0x12a0b9): undefined reference to `vb2_buffer_done' drivers/built-in.o: In function `msi3101_probe': sdr-msi3101.c:(.text+0x12a1c5): undefined reference to `vb2_vmalloc_memops' sdr-msi3101.c:(.text+0x12a1d7): undefined reference to `vb2_queue_init' drivers/built-in.o:(.rodata+0x34cf0): undefined reference to `vb2_ioctl_reqbufs' drivers/built-in.o:(.rodata+0x34cf4): undefined reference to `vb2_ioctl_querybuf' drivers/built-in.o:(.rodata+0x34cf8): undefined reference to `vb2_ioctl_qbuf' drivers/built-in.o:(.rodata+0x34d00): undefined reference to `vb2_ioctl_dqbuf' drivers/built-in.o:(.rodata+0x34d04): undefined reference to `vb2_ioctl_create_bufs' drivers/built-in.o:(.rodata+0x34d08): undefined reference to `vb2_ioctl_prepare_buf' drivers/built-in.o:(.rodata+0x34d18): undefined reference to `vb2_ioctl_streamon' drivers/built-in.o:(.rodata+0x34d1c): undefined reference to `vb2_ioctl_streamoff' drivers/built-in.o:(.rodata+0x35580): undefined reference to `vb2_fop_read' drivers/built-in.o:(.rodata+0x35588): undefined reference to `vb2_fop_poll' drivers/built-in.o:(.rodata+0x35598): undefined reference to `vb2_fop_mmap' drivers/built-in.o:(.rodata+0x355a0): undefined reference to `vb2_fop_release' drivers/built-in.o:(.data+0x23b40): undefined reference to `vb2_ops_wait_prepare' drivers/built-in.o:(.data+0x23b44): undefined reference to `vb2_ops_wait_finish' Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] ddbridge: Remove casting the return value which is a void pointerJingoo Han2013-10-311-1/+1
| | | | | | | | | Casting the return value which is a void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] ngene: Remove casting the return value which is a void pointerJingoo Han2013-10-311-1/+1
| | | | | | | | | Casting the return value which is a void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] dm1105: remove unneeded not-null testAlexandru Juncu2013-10-311-2/+1Star
| | | | | | | | | i2c_adap is a field of a struct and will always be allocated so its address will never be null. Suggested by coccinelle, manually verified. Signed-off-by: Alexandru Juncu <alexj@rosedu.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] sh_mobile_ceu_camera: remove deprecated IRQF_DISABLEDMichael Opdenacker2013-10-311-1/+1
| | | | | | | | | This patch proposes to remove the use of the IRQF_DISABLED flag It's a NOOP since 2.6.35 and it will be removed one day. Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] media: rcar_vin: Add preliminary r8a7790 supportValentine Barshak2013-10-311-1/+4
| | | | | | Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] V4L2: em28xx: tell the ov2640 driver to balance clock enabling ↵Guennadi Liakhovetski2013-10-311-0/+1
| | | | | | | | | | | | | | | internally The em28xx driver only calls subdevices' .s_power() method to power them down, relying on the hardware to wake up automatically, which is usually the case with tuners. This was acceptable with the old .standby() method, but is wrong with .s_power(). Fixing the driver would be difficult due to a broad supported hardware base. Instead this patch makes use of the unbalanced_power soc-camera subdevice flag to tell the ov2640 driver to balance calls to v4l2_clk_enable() and v4l2_clk_disable() internally. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] V4L2: soc-camera: work around unbalanced calls to .s_power()Guennadi Liakhovetski2013-10-312-6/+30
| | | | | | | | | | | | | | | | | | | | Some non soc-camera drivers, e.g. em28xx, use subdevice drivers, originally written for soc-camera, which use soc_camera_power_on() and soc_camera_power_off() helpers to implement their .s_power() methods. Those helpers in turn can enable and disable a clock, if it is supplied to them as a parameter. This works well when camera host drivers balance their calls to subdevices' .s_power() methods. However, some such drivers fail to do that, which leads to unbalanced calls to v4l2_clk_enable() / v4l2_clk_disable(), which then in turn produce kernel warnings. Such behaviour is wrong and should be fixed, however, sometimes it is difficult, because some of those drivers are rather old and use lots of subdevices, which all should be tested after such a fix. To support such drivers this patch adds a work-around, allowing host drivers or platforms to set a flag, in which case soc-camera helpers will only enable the clock, if it is disabled, and disable it only once on the first call to .s_power(0). Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] V4L2: em28xx: register a V4L2 clock sourceGuennadi Liakhovetski2013-10-313-10/+35
| | | | | | | | | | Camera sensors usually require a master clock for data sampling. This patch registers such a clock source for em28xx cameras. This fixes the currently broken em28xx ov2640 camera support and can also be used by other camera sensors. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] V4L2: add a v4l2-clk helper macro to produce an I2C device IDGuennadi Liakhovetski2013-10-311-0/+3
| | | | | | | | | | | To obtain a clock reference consumers supply their device object to the V4L2 clock framework. The latter then uses the consumer device name to find a matching clock. For that to work V4L2 clock providers have to provide the same device name, when registering clocks. This patch adds a helper macro to generate a suitable device name for I2C devices. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] V4L2: add v4l2-clock helpers to register and unregister a fixed-rate ↵Guennadi Liakhovetski2013-10-312-0/+53
| | | | | | | | | | | clock Many bridges and video host controllers supply fixed rate always on clocks to their I2C devices. This patch adds two simple helpers to register and unregister such a clock. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] soc-camera: switch to using the new struct v4l2_subdev_platform_dataGuennadi Liakhovetski2013-10-312-20/+21
| | | | | | | | This prepares soc-camera to use struct v4l2_subdev_platform_data for its subdevice-facing API, which would allow subdevice driver re-use. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] V4L2: add a common V4L2 subdevice platform data typeGuennadi Liakhovetski2013-10-311-0/+13
| | | | | | | | | | | This struct shall be used by subdevice drivers to pass per-subdevice data, e.g. power supplies, to generic V4L2 methods, at the same time allowing optional host-specific extensions via the host_priv pointer. To avoid having to pass two pointers to those methods, add a pointer to this new struct to struct v4l2_subdev. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] imx074: fix error handling for failed async subdevice registrationGuennadi Liakhovetski2013-10-311-1/+3
| | | | | | | If v4l2_async_register_subdev() fails, don't skip the clean up. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] V4L2: (cosmetic) remove redundant use of unlikely()Guennadi Liakhovetski2013-10-311-2/+2
| | | | | | | | BUG*() and WARN*() macros specify their conditions as unlikely, using BUG_ON(unlikely(condition)) is redundant, remove it. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] s5p-mfc: remove deprecated IRQF_DISABLEDMichael Opdenacker2013-10-281-1/+1
| | | | | | | | | This patch proposes to remove the use of the IRQF_DISABLED flag It's a NOOP since 2.6.35 and it will be removed one day. Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] s5p-mfc: call wake_up_dev if in suspend modePrathyush K2013-10-281-4/+6
| | | | | | | | | | | | | | | | | | | If a frame is still decoding when system enters suspend mode, we wait on the device queue for a interrupt condition. This sometimes leads to a timeout because the device queue might not be woken up everytime. Usually, the context queue gets woken up when that context's frame gets decoded. This patch adds a condition to wake up the device queue along with the context queue when the system is in suspend mode. Since the device queue is now woken up, we don't have to check the context's int_cond flag while waiting. Also, we can skip calling try_run after waking up the device queue to ensure that we don't have to wait for more than one frame to be processed. Signed-off-by: Prathyush K <prathyush.k@samsung.com> Signed-off-by: Arun Mankuzhi <arun.m@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] s5p-mfc: Adjust the default values of some encoder paramsArun Kumar K2013-10-281-4/+4
| | | | | | | | | | | | The patch sets the default values of MAX_QP and GOP size encoder parameters to some firmware recommended default values. This enables the applications to get a better encoded output using the default settings itself. Signed-off-by: Kiran AVND <avnd.kiran@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] platform: Kconfig: Select SRAM for VIDEO_CODAFabio Estevam2013-10-281-0/+1
| | | | | | | | | | | | Running the coda driver without CONFIG_SRAM selected leads to the following probe error: coda 63ff4000.vpu: iram pool not available coda: probe of 63ff4000.vpu failed with error -12 In order to avoid it, select CONFIG_SRAM inside VIDEO_CODA. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] coda: v4l2-compliance fix: zero pixel format priv fieldPhilipp Zabel2013-10-281-0/+2
| | | | | | | | | If unused, the pixel format priv field has to be cleared by the driver in try_fmt. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] coda: v4l2-compliance fix: implement try_decoder_cmdPhilipp Zabel2013-10-281-8/+20
| | | | | | | | | Implement try_decoder_cmd to let userspace determine available commands and flags. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] coda: v4l2-compliance fix: overwrite invalid pixel formats with the ↵Philipp Zabel2013-10-281-16/+56
| | | | | | | | | | | | current setting This patch fixes the v4l2-compliance "TRY_FMT(G_FMT) != G_FMT" issue. The driver now overwrites invalid formats with the current setting, using coda_get_max_dimensions to find device specific max width/height. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] coda: prefix v4l2_ioctl_ops with coda_ instead of vidioc_Philipp Zabel2013-10-281-60/+63
| | | | | | | | | | | Moving the ioctl handler callbacks into the coda namespace helps tremendously to make sense of backtraces. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> [k.debski@samsung.com: fix whitespace error near coda_subscribe_event] Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] coda: use picture type returned from hardwarePhilipp Zabel2013-10-281-2/+1Star
| | | | | | | | | Instead of copying v4l2_buf.flags from the source buffer, set the destination buffer flags as reported by the hardware codec. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] coda: move coda_product_name above vidioc_querycapPhilipp Zabel2013-10-281-16/+19
| | | | | | | | | Use the product name (currently CodaDx6 or CODA7541) to fill the v4l2_capabilities.name field. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] coda: fix FMO value setting for CodaDx6Philipp Zabel2013-10-281-3/+1Star
| | | | | | | | | | The register is only written on CodaDx6, so the temporary variable to be written only needs to be initialized on CodaDx6. Also, drop two no-op lines. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] coda: add compressed flag to format enumeration outputPhilipp Zabel2013-10-281-0/+2
| | | | | | | | Correctly flag compressed formats in the ENUM_FMT ioctl output. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] coda: only set buffered input queue for decoderPhilipp Zabel2013-10-281-2/+3
| | | | | | | | | | | Allow device_run with no buffers queued after streamoff only when the current instance is a decoder. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> [k.debski@samsung.com: Add commit description] Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] coda: allow more than four instances on CODA7541Philipp Zabel2013-10-281-4/+10
| | | | | | | | | | | With the new firmware, there are not anymore four register sets, but a single register set, which the driver has to conserve across context switches. This allows to handle more than four instances at the same time. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l2-mem2mem: Don't schedule the context if abort job is calledShaik Ameer Basha2013-10-281-0/+12
| | | | | | | | | | | | | | | | | | | When the current context is running, 1] If release is called, it waits until the job is finished. 2] As soon as the job is finished, v4l2_mem_ctx_release()tries to release the vb2 queues. 3] But if the current context can be scheduled in the v4l2_m2m_job_finish() it schedules the context and tries to call device_run(). 4] As the release() and device_run() sequence can't be predicted sometimes device_run() may get empty vb2 buffers. This patch adds the ABORT state to the job_flags. Once the job_abort() or release() is called on the context, the same context will not be scheduled in the v4l2_m2m_job_finish(). Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] exynos-gsc: Handle ctx job finish when abortedShaik Ameer Basha2013-10-282-13/+17
| | | | | | | | | | | | | | | | | | | | | | | When the current context is running, 1] If release() or streamoff() is called on the current context, it waits until the job is aborted or finished. 2] If the job is finished, driver will call the v4l2_m2m_job_finish(). 3] If the job is aborted inside device_run callback, then driver has to inform the v4l2 mem2mem framework about the same by calling v4l2_m2m_job_finish() with VB2_BUF_STATE_ERROR. The current code doesn't call v4l2_m2m_job_finish() in the case, where the job is aborted from the device_run callback. This scenerio is producing a hang as the other queued contexts are not getting scheduled. By adding the ABORT state, driver can understand the current job is aborted and not finished. By checking this flag, driver can call v4l2_m2m_job_finish() with VB2_BUF_STATE_ERROR. Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com> Signed-off-by: Avnd Kiran <avnd.kiran@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l2-mem2mem: clear m2m queue ready counter in v4l2_m2m_streamoffPhilipp Zabel2013-10-281-0/+1
| | | | | | | | | | v4l2_m2m_streamoff drops the list of ready buffers but failed to reset the num_rdy counter to zero. This would lead to v4l2_m2m_num_src/dst_bufs_ready reporting wrong values after streamoff. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l2-mem2mem: fix context removal from job queue in v4l2_m2m_streamoffPhilipp Zabel2013-10-281-1/+2
| | | | | | | | | | Just clearing the m2m_ctx->queue list_head will leave the m2m_dev->job_queue in a broken state and can cause scheduling of device_runs after streamoff was called. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] mem2mem_testdev: Remove casting the return value which is a void pointerJingoo Han2013-10-281-2/+1Star
| | | | | | | | | | Casting the return value which is a void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] m2m-deinterlace: Remove casting the return value which is a void pointerJingoo Han2013-10-281-2/+1Star
| | | | | | | | | | Casting the return value which is a void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] s5p-g2d: Remove casting the return value which is a void pointerJingoo Han2013-10-281-1/+1
| | | | | | | | | | Casting the return value which is a void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: ti-vpe: Add de-interlacer support in VPEArchit Taneja2013-10-281-34/+358
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the de-interlacer block in VPE. For de-interlacer to work, we need to enable 2 more sets of VPE input ports which fetch data from the 'last' and 'last to last' fields of the interlaced video. Apart from that, we need to enable the Motion vector output and input ports, and also allocate DMA buffers for them. We need to make sure that two most recent fields in the source queue are available and in the 'READY' state. Once a mem2mem context gets access to the VPE HW(in device_run), it extracts the addresses of the 3 buffers, and provides it to the data descriptors for the 3 sets of input ports((LUMA1, CHROMA1), (LUMA2, CHROMA2), and (LUMA3, CHROMA3)) respectively for the 3 consecutive fields. The motion vector and output port descriptors are configured and the list is submitted to VPDMA. Once the transaction is done, the v4l2 buffer corresponding to the oldest field(the 3rd one) is changed to the state 'DONE', and the buffers corresponding to 1st and 2nd fields become the 2nd and 3rd field for the next de-interlace operation. This way, for each deinterlace operation, we have the 3 most recent fields. After each transaction, we also swap the motion vector buffers, the new input motion vector buffer contains the resultant motion information of all the previous frames, and the new output motion vector buffer will be used to hold the updated motion vector to capture the motion changes in the next field. The motion vector buffers are allocated using the DMA allocation API. The de-interlacer is removed from bypass mode, it requires some extra default configurations which are now added. The chrominance upsampler coefficients are added for interlaced frames. Some VPDMA parameters like frame start event and line mode are configured for the 2 extra sets of input ports. Signed-off-by: Archit Taneja <archit@ti.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: ti-vpe: Add VPE mem to mem driverArchit Taneja2013-10-286-0/+2298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VPE is a block which consists of a single memory to memory path which can perform chrominance up/down sampling, de-interlacing, scaling, and color space conversion of raster or tiled YUV420 coplanar, YUV422 coplanar or YUV422 interleaved video formats. We create a mem2mem driver based primarily on the mem2mem-testdev example. The de-interlacer, scaler and color space converter are all bypassed for now to keep the driver simple. Chroma up/down sampler blocks are implemented, so conversion beteen different YUV formats is possible. Each mem2mem context allocates a buffer for VPE MMR values which it will use when it gets access to the VPE HW via the mem2mem queue, it also allocates a VPDMA descriptor list to which configuration and data descriptors are added. Based on the information received via v4l2 ioctls for the source and destination queues, the driver configures the values for the MMRs, and stores them in the buffer. There are also some VPDMA parameters like frame start and line mode which needs to be configured, these are configured by direct register writes via the VPDMA helper functions. The driver's device_run() mem2mem op will add each descriptor based on how the source and destination queues are set up for the given ctx, once the list is prepared, it's submitted to VPDMA, these descriptors when parsed by VPDMA will upload MMR registers, start DMA of video buffers on the various input and output clients/ports. When the list is parsed completely(and the DMAs on all the output ports done), an interrupt is generated which we use to notify that the source and destination buffers are done. The rest of the driver is quite similar to other mem2mem drivers, we use the multiplane v4l2 ioctls as the HW support coplanar formats. Signed-off-by: Archit Taneja <archit@ti.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>