summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'upstream-fixes' into patchworkMauro Carvalho Chehab2013-12-1317-31/+63
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge the media fixes merged upstream for v3.13-rc4 * upstream-fixes: (30 commits) [media] videobuf2-dma-sg: fix possible memory leak [media] vb2: regression fix: always set length field. [media] mt9p031: Include linux/of.h header [media] rtl2830: add parent for I2C adapter [media] media: marvell-ccic: use devm to release clk [media] ths7303: Declare as static a private function [media] em28xx-video: Swap release order to avoid lock nesting [media] usbtv: Add support for PAL video source [media] media_tree: Fix spelling errors [media] videobuf2: Add support for file access mode flags for DMABUF exporting [media] radio-shark2: Mark shark_resume_leds() inline to kill compiler warning [media] radio-shark: Mark shark_resume_leds() inline to kill compiler warning [media] af9035: unlock on error in af9035_i2c_master_xfer() [media] af9033: fix broken I2C [media] v4l: omap3isp: Don't check for missing get_fmt op on remote subdev [media] af9035: fix broken I2C and USB I/O [media] wm8775: fix broken audio routing [media] marvell-ccic: drop resource free in driver remove [media] tef6862/radio-tea5764: actually assign clamp result [media] cx231xx: use after free on error path in probe ...
| * [media] videobuf2-dma-sg: fix possible memory leakGeyslan G. Bem2013-12-101-1/+2
| | | | | | | | | | | | | | Fix the return when 'buf->pages' allocation error. Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
| * [media] vb2: regression fix: always set length field.Hans Verkuil2013-12-101-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit dc77523c5da5513df1bbc74db2a522a94f4cec0e ensured that m.offset is only set for the MMAP memory mode by calling __setup_offsets only for that mode. However, __setup_offsets also initializes the length fields, and that should be done regardless of the memory mode. Because of that change the v4l2-ctl test application fails for the USERPTR mode. This fix creates a __setup_lengths function that sets the length, and __setup_offsets just sets the offset and no longer touches the length. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
| * [media] mt9p031: Include linux/of.h headerSachin Kamat2013-12-091-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> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] rtl2830: add parent for I2C adapterAntti Palosaari2013-12-091-0/+1
| | | | | | | | | | | | | | | | | | i2c i2c-6: adapter [RTL2830 tuner I2C adapter] registered BUG: unable to handle kernel NULL pointer dereference at 0000000000000220 IP: [<ffffffffa0002900>] i2c_register_adapter+0x130/0x390 [i2c_core] Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] media: marvell-ccic: use devm to release clkLibin Yang2013-12-091-31/+8
| | | | | | | | | | | | | | | | | | | | | | | | This patch uses devm to release the clks instead of releasing manually. And it adds enable/disable mipi_clk when getting its rate. Signed-off-by: Libin Yang <lbyang@marvell.com> Acked-by: Jonathan Corbet <corbet@lwn.net> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] ths7303: Declare as static a private functionRicardo Ribalda2013-12-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git grep shows that the function is only called from ths7303.c Fix this build warning: CC drivers/media/i2c/ths7303.o drivers/media/i2c/ths7303.c:86:5: warning: no previous prototype for ‘ths7303_setval’ [-Wmissing-prototypes] int ths7303_setval(struct v4l2_subdev *sd, enum ths7303_filter_mode mode) ^ Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx-video: Swap release order to avoid lock nestingRicardo Ribalda2013-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | vb2_fop_release might take the video queue mutex lock. In order to avoid nesting mutexes the private mutex is taken after the fop_release has finished. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] usbtv: Add support for PAL video sourceGeorg Kaindl2013-12-091-38/+136
| | | | | | | | | | | | | | | | Signed-off-by: Georg Kaindl <gkaindl@mac.com> Tested-by: Lubomir Rintel <lkundrak@v3.sk> Tested-by: Marcin Nowak <marcin.nowak@simplusnet.pl> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] media_tree: Fix spelling errorsJonathan McCrohan2013-12-0943-65/+65
| | | | | | | | | | | | | | | | | | | | | | | | Fix various spelling errors in strings and comments throughout the media tree. The majority of these were found using Lucas De Marchi's codespell tool. [m.chehab@samsung.com: discard hunks with conflicts] Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] videobuf2: Add support for file access mode flags for DMABUF exportingPhilipp Zabel2013-12-094-10/+12
| | | | | | | | | | | | | | | | | | | | Currently it is not possible for userspace to map a DMABUF exported buffer with write permissions. This patch allows to also pass O_RDONLY/O_RDWR when exporting the buffer, so that userspace may map it with write permissions. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] radio-shark2: Mark shark_resume_leds() inline to kill compiler warningHans de Goede2013-12-091-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This mirrors the patch to the radio-shark driver by Geert Uytterhoeven. If SHARK_USE_LEDS=1, but CONFIG_PM=n: drivers/media/radio/radio-shark2.c:240: warning: ‘shark_resume_leds’ defined but not used Instead of making the #ifdef logic even more complicated (there are already two definitions of shark_resume_leds()), mark shark_resume_leds() inline to kill the compiler warning. shark_resume_leds() is small and it has only one caller. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] radio-shark: Mark shark_resume_leds() inline to kill compiler warningGeert Uytterhoeven2013-12-091-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | If SHARK_USE_LEDS=1, but CONFIG_PM=n: drivers/media/radio/radio-shark.c:275: warning: ‘shark_resume_leds’ defined but not used Instead of making the #ifdef logic even more complicated (there are already two definitions of shark_resume_leds()), mark shark_resume_leds() inline to kill the compiler warning. shark_resume_leds() is small and it has only one caller. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] af9035: unlock on error in af9035_i2c_master_xfer()Dan Carpenter2013-12-041-2/+5
| | | | | | | | | | | | | | | | | | | | | | We introduced a couple new error paths which are missing unlocks. Fixes: 7760e148350b ('[media] af9035: Don't use dynamic static allocation') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: stable@vger.kernel.org
| * [media] af9033: fix broken I2CAntti Palosaari2013-12-041-6/+6
| | | | | | | | | | | | | | | | | | | | | | Driver did not work anymore since I2C has gone broken due to recent commit: commit 37ebaf6891ee81687bb558e8375c0712d8264ed8 [media] dvb-frontends: Don't use dynamic static allocation Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: stable@vger.kernel.org
| * [media] v4l: omap3isp: Don't check for missing get_fmt op on remote subdevLaurent Pinchart2013-12-041-5/+2
| | | | | | | | | | | | | | | | | | | | | | The remote subdev of any video node in the OMAP3 ISP is an internal subdev that is guaranteed to implement get_fmt. Don't check the return value for -ENOIOCTLCMD, as this can't happen. While at it, move non-critical code out of the mutex-protected section. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] af9035: fix broken I2C and USB I/OAntti Palosaari2013-12-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | There was three small buffer len calculation bugs which caused driver non-working. These are coming from recent commit: commit 7760e148350bf6df95662bc0db3734e9d991cb03 [media] af9035: Don't use dynamic static allocation Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: stable@vger.kernel.org
| * [media] wm8775: fix broken audio routingHans Verkuil2013-11-291-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 5aa9ae5ed5d449a85fbf7aac3d1fdc241c542a79 inverted the mute control state test in s_routing which caused the audio routing to fail. This broke ivtv support for the Hauppauge video/audio input bracket (which adds additional video and audio inputs) all the way back in kernel 2.6.36. This fix fixes the condition and it also removes a nonsense check on the balance control. Bisected-by: Rajil Saraswat <rajil.s@gmail.com> Signed-off-by: Andy Walls <awalls@md.metrocast.net> Reported-by: Rajil Saraswat <rajil.s@gmail.com> Tested-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: stable@vger.kernel.org # for v3.10 and up Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] marvell-ccic: drop resource free in driver removeLibin Yang2013-11-291-7/+0
| | | | | | | | | | | | | | | | | | | | | | The mmp-driver is using devm_* to allocate the resource. The old resource release methods are not appropriate here. Signed-off-by: Libin Yang <lbyang@marvell.com> Acked-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: stable@vger.kernel.org # for v3.12 and up Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] tef6862/radio-tea5764: actually assign clamp resultHans Verkuil2013-11-292-2/+2
| | | | | | | | | | | | | | | | | | | | When adding frequency clamping to the tef6862 and radio-tea5764 drivers I forgot to actually *assign* the clamp result to the frequency. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: Hans Petter Selasky <hps@bitfrost.no> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Cc: stable@vger.kernel.org # for 3.11 and up
| * [media] cx231xx: use after free on error path in probeDan Carpenter2013-11-291-1/+1
| | | | | | | | | | | | | | | | | | We dereference "dev" after it has already been freed. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] saa7164: fix return value check in saa7164_initdev()Wei Yongjun2013-11-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | In case of error, the function kthread_run() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] bttv: don't setup the controls if there are no video devicesHans Verkuil2013-11-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The no_video flag was checked in all other cases except one. Calling v4l2_ctrl_handler_setup() if no_video is 1 will crash. This wasn't noticed before since there are only two card types that set no_video to 1, so this type of hardware is quite rare. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: Lorenz Röhrl <sheepshit@gmx.de> Tested-by: Lorenz Röhrl <sheepshit@gmx.de> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] af9035: add [0413:6a05] Leadtek WinFast DTV Dongle DualAntti Palosaari2013-11-291-0/+2
| | | | | | | | | | | | | | | | | | | | It is IT9135 dual design. Thanks to Michael Piko for reporting that! Reported-by: Michael Piko <michael@piko.com.au> Signed-off-by: Antti Palosaari <crope@iki.fi> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] cxd2820r_c: fix if_ctl calculationEvgeny Plehov2013-11-291-1/+1
| | | | | | | | | | | | | | | | | | fixes tuning for DVB-C Signed-off-by: Evgeny Plehov <EvgenyPlehov@ukr.net> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] technisat-usb2: fix typo in variable nameFelipe Pena2013-11-291-1/+1
| | | | | | | | | | | | | | | | | | The variable txlen was used instead of rxlen in boundary check. (copy-paste error) Signed-off-by: Felipe Pena <felipensp@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] dvb_demux: clean up whitespace in comments from previous patch (trivial)Michael Krufky2013-11-291-2/+2
| | | | | | | | | | | | | | removes trailing whitespace and rebalance line length in comment block Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] dvb_demux: fix deadlock in dmx_section_feed_release_filter()Alexey Khoroshilov2013-11-291-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dmx_section_feed_release_filter() locks dvbdmx->mutex and if the feed is still filtering, it calls feed->stop_filtering(feed). stop_filtering() is implemented by dmx_section_feed_stop_filtering() that first of all try to lock the same mutex: dvbdmx->mutex. That leads to a deadlock. It does not happen often in practice because all callers of release_filter() stop filtering by themselves. So the problem can happen in case of race condition only. The patch releases dvbdmx->mutex before call to feed->stop_filtering(feed) and reacquires the mutex after that. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] gspca_sunplus: Add new usb-id for 06d6:0041Hans de Goede2013-11-291-0/+1
| | | | | | | | | | | | | | Reported-by: mjs <mjstork@gmail.com> Tested-by: mjs <mjstork@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] gspca-stk1135: Add delay after configuring clockOndrej Zary2013-11-291-0/+3
| | | | | | | | | | | | | | | | | | Add a small delay at the end of configure_clock() to allow sensor to initialize. This is needed by Asus VX2S laptop webcam to detect sensor type properly (the already-supported MT9M112). Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] v4l: vsp1: Fix error return code in vsp1_video_init()Wei Yongjun2013-11-291-1/+3
| | | | | | | | | | | | | | | | | | Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] v4l: vsp1: Add LUT supportLaurent Pinchart2013-12-1110-3/+344
| | | | | | | | | | | | | | | | The Look-Up Table looks up values in 8-bit indexed tables separately for each color component. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] v4l: vsp1: Add SRU supportLaurent Pinchart2013-12-119-1/+431
| | | | | | | | | | | | | | | | The Super Resolution Unit performs super resolution processing with optional upscaling by a factor of two. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] v4l: vsp1: Add HST and HSI supportLaurent Pinchart2013-12-118-1/+287
| | | | | | | | | | | | | | | | The Hue Saturation value Transform and Hue Saturation value Inverse transform entities convert from RGB to HSV and back. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] v4l: Add media format codes for AHSV8888 on 32-bit bussesLaurent Pinchart2013-12-112-0/+160
| | | | | | | | | | Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] v4l: vsp1: Add cropping supportLaurent Pinchart2013-12-114-16/+141
| | | | | | | | | | | | | | | | Implement the get and set selection operations on the RPF and WPF entities. Only the crop targets are currently available. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] v4l: vsp1: Supply frames to the DU continuouslyLaurent Pinchart2013-12-111-0/+13
| | | | | | | | | | | | | | | | | | When operating in DU output mode (deep pipeline to the DU through the LIF), the VSP1 needs to constantly supply frames to the display. To ensure reuse the last queued buffer instead of returning it to the user. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] mt9v032: Add support for the MT9V034Laurent Pinchart2013-12-111-8/+46
| | | | | | | | | | | | | | | | The MT9V034 sensor is very similar to the MT9V032, with a couple of different registers and parameters. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] mt9v032: Add support for model-specific parametersLaurent Pinchart2013-12-111-15/+67
| | | | | | | | | | | | | | | | To prepare support of the MT9V034, add the necessary infrastructure to support model-specific parameters. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] mt9v032: Add support for monochrome modelsLaurent Pinchart2013-12-111-3/+34
| | | | | | | | | | | | | | | | Identify the model based on the I2C device name and configure formats accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] mt9v032: Fix binning configurationLaurent Pinchart2013-12-111-23/+45
| | | | | | | | | | | | | | | | | | The sensor can scale the image down using binning by 1, 2 or 4 in both directions. Update size enumeration and ratio and binning factor computation accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] mt9v032: Fix pixel array sizeLaurent Pinchart2013-12-111-2/+3
| | | | | | | | | | | | | | | | The active pixel array size is 753x481 with 4 additional black rows at the top. Fix the driver accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] mt9v032: Remove unused macroLaurent Pinchart2013-12-111-2/+0
| | | | | | | | | | | | | | The EXT_CLK macro is unused, remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] v4l: omap4iss: resizer: Fix comment regarding bypass modeLaurent Pinchart2013-12-111-1/+3
| | | | | | | | | | | | | | The comment explaining the usage of the bypass bit is wrong, fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] v4l: omap4iss: Cancel streaming when a fatal error occursLaurent Pinchart2013-12-115-3/+68
| | | | | | | | | | | | | | | | | | | | | | When a fatal error that prevents any further video streaming occurs in a pipeline, all queued buffers must be marked as erroneous and new buffers must be prevented from being queued. Implement this behaviour with a new omap4iss_pipeline_cancel_stream() function that can be used by submodules to cancel streaming. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] v4l: omap4iss: csi2: Replace manual if statement with a subclk fieldLaurent Pinchart2013-12-112-8/+6
| | | | | | | | | | | | | | | | | | | | Instead of manually checking whether the CSI2 module is CSI2a or CSI2b in order to select the right subclock to enable/disable, add a subclk field to the iss_csi2 structure, initialize it with the corresponding subclock value and use it at runtime. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] v4l: omap4iss: Reset the ISS when the pipeline can't be stoppedLaurent Pinchart2013-12-114-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a failure to stop a module in the pipeline is detected, the only way to recover is to reset the ISS. However, as other users can be using a different pipeline with other modules, the ISS can't be reset synchronously with the error detection. Keep track of modules that have failed to stop, and reset the ISS accordingly when the last user releases the last reference to the ISS. Refuse to start streaming on a pipeline that contains a crashed module, as the hardware wouldn't work anyway. Modify the omap4iss_pipeline_set_stream() function to record the new ISS pipeline state only when no error occurs, except when stopping the pipeline in which case the pipeline is still marked as stopped. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] v4l: omap4iss: Enable/disabling the ISP interrupts globallyLaurent Pinchart2013-12-115-36/+30
| | | | | | | | | | | | | | | | | | | | ISP interrupts are enabled/disabled when starting/stopping the IPIPEIF or resizer. This doesn't permit using the two modules in separate pipelines. Fix it by enabling/disabling the ISP interrupts at the same time as the ISS interrupts, in the ISS device get/put operations. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] v4l: omap4iss: Propagate stop timeouts from submodules to the driver ↵Laurent Pinchart2013-12-115-13/+15
| | | | | | | | | | | | | | | | | | | | | | core Return an error from the s_stream handlers when stopping the stream failed instead of just logging the error and ignoring it. While we're at it, move the logging code from submodules to the driver code. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] v4l: omap4iss: Add enum_fmt_vid_cap ioctl supportLaurent Pinchart2013-12-111-0/+36
| | | | | | | | | | | | | | | | List the pixel formats compatible with the active format currently configured on the connected pad. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>