summaryrefslogtreecommitdiffstats
path: root/drivers/media
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'v4l_for_linus' of ↵Linus Torvalds2011-05-184-15/+54
|\ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: [media] V4L: soc-camera: regression fix: calculate .sizeimage in soc_camera.c [media] v4l2-subdev: fix broken subdev control enumeration [media] Fix cx88 remote control input [media] v4l: Release module if subdev registration fails
| * [media] V4L: soc-camera: regression fix: calculate .sizeimage in soc_camera.cSergio Aguirre2011-05-041-6/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A recent patch has given individual soc-camera host drivers a possibility to calculate .sizeimage and .bytesperline pixel format fields internally, however, some drivers relied on the core calculating these values for them, following a default algorithm. This patch restores the default calculation for such drivers. Based on initial patch by Guennadi Liakhovetski, found here: http://www.spinics.net/lists/linux-media/msg31282.html Except that this covers try_fmt aswell. Signed-off-by: Sergio Aguirre <saaguirre@ti.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] v4l2-subdev: fix broken subdev control enumerationHans Verkuil2011-05-041-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The v4l2_subdev_* functions are meant for older V4L2 drivers that do not use the control framework yet. These functions should not be used by subdev_do_ioctl. Most of those backwards compatibility functions are just stubs, but commit 87a0c94ce616b231f3c0bd09d7dbd39d43b0557a actually changed the behavior of v4l2_subdev_queryctrl, so calling that one from subdev_do_ioctl broke the control enumeration in subdev nodes. The fix is simply not to use those compatibility functions in v4l2-subdev.c. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] Fix cx88 remote control inputLawrence Rust2011-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | In the IR interrupt handler of cx88-input.c there's a 32-bit multiply overflow which causes IR pulse durations to be incorrectly calculated. This is a regression caused by commit 2997137be8eba. Cc: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] v4l: Release module if subdev registration failsLaurent Pinchart2011-05-041-1/+4
| | | | | | | | | | | | | | | | | | | | If v4l2_device_register_subdev() fails, the reference to the subdev module taken by the function isn't released. Fix this. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: stable@kernel.org Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | Merge branch 'v4l_for_linus' of ↵Linus Torvalds2011-05-0414-13/+44
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: [media] ngene: Fix CI data transfer regression Fix CI data transfer regression introduced by previous cleanup. [media] v4l: make sure drivers supply a zeroed struct v4l2_subdev [media] Missing frontend config for LME DM04/QQBOX [media] rc_core: avoid kernel oops when rmmod saa7134 [media] imon: add conditional locking in change_protocol [media] rc: show RC_TYPE_OTHER in sysfs [media] ite-cir: modular build on ppc requires delay.h include [media] mceusb: add Dell transceiver ID
| * [media] ngene: Fix CI data transfer regressionOliver Endriss2011-04-291-0/+1
| | | | | | | | | | | | | | Fix CI data transfer regression introduced by previous cleanup. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] v4l: make sure drivers supply a zeroed struct v4l2_subdevHerton Ronaldo Krzesinski2011-04-298-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some v4l drivers currently don't initialize their struct v4l2_subdev with zeros, and this is a problem since some of the v4l2 code expects this. One example is the addition of internal_ops in commit 45f6f84, after that we are at risk of random oopses with these drivers when code in v4l2_device_register_subdev tries to dereference sd->internal_ops->*, as can be shown by the report at http://bugs.launchpad.net/bugs/745213 and analysis of its crash at https://lkml.org/lkml/2011/4/1/168 Use kzalloc within problematic drivers to ensure we have a zeroed struct v4l2_subdev. BugLink: http://bugs.launchpad.net/bugs/745213 Cc: <stable@kernel.org> Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] Missing frontend config for LME DM04/QQBOXMalcolm Priestley2011-04-291-0/+2
| | | | | | | | | | | | | | Forgot to add the DVB_STV0299/DVB_PLL to config Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] rc_core: avoid kernel oops when rmmod saa7134Hussam Al-Tayeb2011-04-291-1/+2
| | | | | | | | | | | | | | | | | | The following is a patch to avoid a kernel oops when running rmmod saa7134 on kernel 2.6.27.1. The change is as suggested by mchehab on irc.freenode.org Signed-off-by: Hussam Al-Tayeb <ht990332@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] imon: add conditional locking in change_protocolJarod Wilson2011-04-291-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The imon_ir_change_protocol function gets called two different ways, one way is from rc_register_device, for initial protocol selection/setup, and the other is via a userspace-initiated protocol change request, either by direct sysfs prodding or by something like ir-keytable. In the rc_register_device case, the imon context lock is already held, but when initiated from userspace, it is not, so we must acquire it, prior to calling send_packet, which requires that the lock is held. Without this change, there's an easily reproduceable deadlock when another function calls send_packet (such as either of the display write fops) after a userspace-initiated change_protocol. With a lock-debugging-enabled kernel, I was getting this: [ 15.014153] ===================================== [ 15.015048] [ BUG: bad unlock balance detected! ] [ 15.015048] ------------------------------------- [ 15.015048] ir-keytable/773 is trying to release lock (&ictx->lock) at: [ 15.015048] [<ffffffff814c6297>] mutex_unlock+0xe/0x10 [ 15.015048] but there are no more locks to release! [ 15.015048] [ 15.015048] other info that might help us debug this: [ 15.015048] 2 locks held by ir-keytable/773: [ 15.015048] #0: (&buffer->mutex){+.+.+.}, at: [<ffffffff8119d400>] sysfs_write_file+0x3c/0x144 [ 15.015048] #1: (s_active#87){.+.+.+}, at: [<ffffffff8119d4ab>] sysfs_write_file+0xe7/0x144 [ 15.015048] [ 15.015048] stack backtrace: [ 15.015048] Pid: 773, comm: ir-keytable Not tainted 2.6.38.4-20.fc15.x86_64.debug #1 [ 15.015048] Call Trace: [ 15.015048] [<ffffffff81089715>] ? print_unlock_inbalance_bug+0xca/0xd5 [ 15.015048] [<ffffffff8108b35c>] ? lock_release_non_nested+0xc1/0x263 [ 15.015048] [<ffffffff814c6297>] ? mutex_unlock+0xe/0x10 [ 15.015048] [<ffffffff814c6297>] ? mutex_unlock+0xe/0x10 [ 15.015048] [<ffffffff8108b67b>] ? lock_release+0x17d/0x1a4 [ 15.015048] [<ffffffff814c6229>] ? __mutex_unlock_slowpath+0xc5/0x125 [ 15.015048] [<ffffffff814c6297>] ? mutex_unlock+0xe/0x10 [ 15.015048] [<ffffffffa02964b6>] ? send_packet+0x1c9/0x264 [imon] [ 15.015048] [<ffffffff8108b376>] ? lock_release_non_nested+0xdb/0x263 [ 15.015048] [<ffffffffa0296731>] ? imon_ir_change_protocol+0x126/0x15e [imon] [ 15.015048] [<ffffffffa024a334>] ? store_protocols+0x1c3/0x286 [rc_core] [ 15.015048] [<ffffffff81326e4e>] ? dev_attr_store+0x20/0x22 [ 15.015048] [<ffffffff8119d4cc>] ? sysfs_write_file+0x108/0x144 ... The original report that led to the investigation was the following: [ 1679.457305] INFO: task LCDd:8460 blocked for more than 120 seconds. [ 1679.457307] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1679.457309] LCDd D ffff88010fcd89c8 0 8460 1 0x00000000 [ 1679.457312] ffff8800d5a03b48 0000000000000082 0000000000000000 ffff8800d5a03fd8 [ 1679.457314] 00000000012dcd30 fffffffffffffffd ffff8800d5a03fd8 ffff88010fcd86f0 [ 1679.457316] ffff8800d5a03fd8 ffff8800d5a03fd8 ffff88010fcd89d0 ffff8800d5a03fd8 [ 1679.457319] Call Trace: [ 1679.457324] [<ffffffff810ff1a5>] ? zone_statistics+0x75/0x90 [ 1679.457327] [<ffffffff810ea907>] ? get_page_from_freelist+0x3c7/0x820 [ 1679.457330] [<ffffffff813b0a49>] __mutex_lock_slowpath+0x139/0x320 [ 1679.457335] [<ffffffff813b0c41>] mutex_lock+0x11/0x30 [ 1679.457338] [<ffffffffa0d54216>] display_open+0x66/0x130 [imon] [ 1679.457345] [<ffffffffa01d06c0>] usb_open+0x180/0x310 [usbcore] [ 1679.457349] [<ffffffff81143b3b>] chrdev_open+0x1bb/0x2d0 [ 1679.457350] [<ffffffff8113d93d>] __dentry_open+0x10d/0x370 [ 1679.457352] [<ffffffff81143980>] ? chrdev_open+0x0/0x2d0 ... Bump the driver version here so its easier to tell if people have this locking fix or not, and also make locking during probe easier to follow. CC: stable@kernel.org Reported-by: Benjamin Hodgetts <ben@xnode.org> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] rc: show RC_TYPE_OTHER in sysfsJarod Wilson2011-04-291-0/+1
| | | | | | | | | | Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] ite-cir: modular build on ppc requires delay.h includeJarod Wilson2011-04-291-0/+1
| | | | | | | | | | Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] mceusb: add Dell transceiver IDJarod Wilson2011-04-291-0/+2
| | | | | | | | | | | | | | | | | | | | Add device ID for a Dell-branded, Philips device ID transceiver reported by an OpenELEC user on their forums. http://openelec.tv/forum/27-hardware-support/5622-adding-support-for-an-ir-receiver--dell-branded--#5622 Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | Merge branch 'spell-fix' of git://git.profusion.mobi/users/lucas/linux-2.6Linus Torvalds2011-04-281-1/+1
|\ \ | | | | | | | | | | | | * 'spell-fix' of git://git.profusion.mobi/users/lucas/linux-2.6: Revert wrong fixes for common misspellings
| * | Revert wrong fixes for common misspellingsLucas De Marchi2011-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | These changes were incorrectly fixed by codespell. They were now manually corrected. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* | | Merge branch 'v4l_for_linus' of ↵Linus Torvalds2011-04-2828-145/+361
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (42 commits) [media] media: vb2: correct queue initialization order [media] media: vb2: fix incorrect v4l2_buffer->flags handling [media] s5p-fimc: Add support for the buffer timestamps and sequence [media] s5p-fimc: Fix bytesperline and plane payload setup [media] s5p-fimc: Do not allow changing format after REQBUFS [media] s5p-fimc: Fix FIMC3 pixel limits on Exynos4 [media] tda18271: update tda18271c2_rf_cal as per NXP's rev.04 datasheet [media] tda18271: update tda18271_rf_band as per NXP's rev.04 datasheet [media] tda18271: fix bad calculation of main post divider byte [media] tda18271: prog_cal and prog_tab variables should be s32, not u8 [media] tda18271: fix calculation bug in tda18271_rf_tracking_filters_init [media] omap3isp: queue: Don't corrupt buf->npages when get_user_pages() fails [media] v4l: Don't register media entities for subdev device nodes [media] omap3isp: Don't increment node entity use count when poweron fails [media] omap3isp: lane shifter support [media] omap3isp: ccdc: support Y10/12, 8-bit bayer fmts [media] media: add missing 8-bit bayer formats and Y12 [media] v4l: add V4L2_PIX_FMT_Y12 format cx23885: Fix stv0367 Kconfig dependency [media] omap3isp: Use isp xclk defines ... Fix up trivial conflict (spelink errurs) in drivers/media/video/omap3isp/isp.c
| * [media] media: vb2: correct queue initialization orderMarek Szyprowski2011-04-191-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | q->memory entry is initialized to late, so if allocation of memory buffers fails, the buffers might not be freed correctly (q->memory is tested in __vb2_free_mem, which can be called before setting q->memory). Reported-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] media: vb2: fix incorrect v4l2_buffer->flags handlingMarek Szyprowski2011-04-191-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Videobuf2 core assumes that driver doesn't set any buffer flags. This is correct for buffer state flags that videobuf2 manages, but the other flags like V4L2_BUF_FLAG_{KEY,P,B}FRAME, V4L2_BUF_FLAG_TIMECODE and V4L2_BUF_FLAG_INPUT should be passed from or to the driver. Reported-by: Jonghun Han <jonghun.han@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] s5p-fimc: Add support for the buffer timestamps and sequenceSylwester Nawrocki2011-04-191-0/+10
| | | | | | | | | | | | | | | | | | Add support for buffer timestamps and the sequence number in the video capture driver. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] s5p-fimc: Fix bytesperline and plane payload setupSylwester Nawrocki2011-04-192-16/+20
| | | | | | | | | | | | | | | | | | | | Make sure the sizeimage for 3-planar color formats is width * height * 3/2 and the bytesperline is same for each plane in case of a multi-planar format. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] s5p-fimc: Do not allow changing format after REQBUFSSylwester Nawrocki2011-04-192-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Protecting the color format with vb2_is_streaming() is not sufficient as this prevents changing the format only after VIDIOC_STREAMON. To prevent the color format reconfiguration as soon as buffers are allocated use vb2_is_busy() instead. Also make the videobuf queue ops structure static. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] s5p-fimc: Fix FIMC3 pixel limits on Exynos4Sylwester Nawrocki2011-04-191-11/+19
| | | | | | | | | | | | | | | | | | | | | | Correct pixel limits for the fourth FIMC entity on Exynos4 SoCs. FIMC3 only supports the writeback input from the LCD mixer. Also rename s5pv310 variant to exynos4 which is needed after renaming s5pv310 series to Exynos4. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] tda18271: update tda18271c2_rf_cal as per NXP's rev.04 datasheetMichael Krufky2011-04-191-4/+5
| | | | | | | | | | | | Cc: Stefan Sibiga <stefansibiga@yahoo.ca> Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] tda18271: update tda18271_rf_band as per NXP's rev.04 datasheetMichael Krufky2011-04-191-2/+1Star
| | | | | | | | | | | | Cc: Stefan Sibiga <stefansibiga@yahoo.ca> Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] tda18271: fix bad calculation of main post divider byteMichael Krufky2011-04-191-10/+1Star
| | | | | | | | | | | | | | | | | | | | | | R_MPD bit 3 does not depend on analog vs. digital. Just use (0x7f & pd) directly from the values in the main pll table. Thanks to Stefan Sibiga for pointing this out. Cc: Stefan Sibiga <stefansibiga@yahoo.ca> Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] tda18271: prog_cal and prog_tab variables should be s32, not u8Michael Krufky2011-04-191-10/+11
| | | | | | | | | | | | | | | | Fix type of prog_cal and prog_tab variables to avoid any possible calculation errors. Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] tda18271: fix calculation bug in tda18271_rf_tracking_filters_initMichael Krufky2011-04-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | Misplaced parenthesis cause a calculation bug in tda18271_rf_tracking_filters_init Thanks to Stefan Sibiga for pointing this out. Cc: Stefan Sibiga <stefansibiga@yahoo.ca> Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] omap3isp: queue: Don't corrupt buf->npages when get_user_pages() failsLaurent Pinchart2011-04-191-1/+1
| | | | | | | | | | | | | | | | | | get_user_pages() can return a negative error code when it fails. Set buf->npages to 0 in that case, to prevent isp_video_buffer_cleanup() from releasing invalid pages. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] v4l: Don't register media entities for subdev device nodesLaurent Pinchart2011-04-191-5/+10
| | | | | | | | | | | | | | | | | | Subdevs already have their own entity, don't register as second one when registering the subdev device node. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] omap3isp: Don't increment node entity use count when poweron failsLaurent Pinchart2011-04-191-0/+2
| | | | | | | | | | | | | | | | | | | | When open a device node, all entities part of the same pipeline are powered on. If one of the entities fails to be powered on, the open operations fails. In that case the device node entity use count must not be incremented. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] omap3isp: lane shifter supportMichael Jones2011-04-195-30/+120
| | | | | | | | | | | | | | | | | | To use the lane shifter, set different pixel formats at each end of the link at the CCDC input. Signed-off-by: Michael Jones <michael.jones@matrix-vision.de> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] omap3isp: ccdc: support Y10/12, 8-bit bayer fmtsMichael Jones2011-04-192-0/+18
| | | | | | | | | | | | | | | | | | Add support for 8-bit bayer and 10- and 12-bit grey formats at the CCDC input. Y12 is truncated to Y10 at the CCDC output. Signed-off-by: Michael Jones <michael.jones@matrix-vision.de> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * cx23885: Fix stv0367 Kconfig dependencyMauro Carvalho Chehab2011-04-171-0/+1
| | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] omap3isp: Use isp xclk definesStanimir Varbanov2011-04-172-8/+9
| | | | | | | | | | | | | | Use isp defines for isp xclk selection in isp_set_xclk(). Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] omap3isp: isp: Reset the ISP when the pipeline can't be stoppedLaurent Pinchart2011-04-172-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a failure to stop a module in the pipeline is detected, the only way to recover is to reset the ISP. However, as other users can be using a different pipeline with other modules, the ISP can't be reset synchronously with the error detection. Mark the ISP as needing a reset when a failure to stop a pipeline is detected, and reset the ISP when the last user releases the last reference to the ISP. Modify the omap3isp_pipeline_set_stream() function to record the new ISP 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 <mchehab@redhat.com>
| * [media] omap3isp: stat: update struct ispstat_generic_config's commentsDavid Cohen2011-04-171-3/+3
| | | | | | | | | | | | | | | | | | struct ispstat_generic_config's comments refers to isph3a_aewb_config, isph3a_af_config and isphist_config. But those structs have had their names prefixed with 'omap3'. So, let's update the comments. Signed-off-by: David Cohen <david.cohen@nokia.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] media: Properly handle link flags in link setup, link notify callbackLaurent Pinchart2011-04-171-2/+6
| | | | | | | | | | | | | | | | | | The link flags were not properly handled in __media_entity_setup_link which could lead to link_notify callback to be called when the flags are not modified. Fix this. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] omap3isp: Fix trivial typosMichael Jones2011-04-174-7/+7
| | | | | | | | | | | | | | It doesn't get more trivial than these. Signed-off-by: Michael Jones <michael.jones@matrix-vision.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] omap3isp: resizer: Improved resizer rsz factor formulaSakari Ailus2011-04-171-10/+30
| | | | | | | | | | | | | | | | | | | | Round properly the rsz factor so that we get highest rsz so that the input width (or height) is highest possible smaller or equal to what the user asks. Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] omap3isp: resizer: Use 4-tap mode equations when the ratio is <= 512Laurent Pinchart2011-04-171-5/+22
| | | | | | | | | | | | | | | | | | | | As the number of phases/taps, used to select the correct equations to compute the ratio, depends on the ratio, start with the 7-tap mode equations to compute an approximation of the ratio, and switch to the 4-tap mode equations if the approximation is lower than or equal to 512. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] omap3isp: resizer: Center the crop rectangleLaurent Pinchart2011-04-131-4/+12
| | | | | | | | | | | | | | | | | | When the crop rectangle needs to be modified to match hardware requirements, center the resulting rectangle on the requested rectangle instead of removing pixels from the right and bottom sides only. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] V4L: mx3_camera: select VIDEOBUF2_DMA_CONTIG instead of ↵Uwe Kleine-König2011-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VIDEOBUF_DMA_CONTIG Since commit 379fa5d ([media] V4L: mx3_camera: convert to videobuf2) mx3_camera uses videobuf2, but that commit didn't upgrade the select resulting in the following build failure: drivers/built-in.o: In function `mx3_camera_init_videobuf': clkdev.c:(.text+0x86580): undefined reference to `vb2_dma_contig_memops' drivers/built-in.o: In function `mx3_camera_probe': clkdev.c:(.devinit.text+0x3548): undefined reference to `vb2_dma_contig_init_ctx' clkdev.c:(.devinit.text+0x3578): undefined reference to `vb2_dma_contig_cleanup_ctx' drivers/built-in.o: In function `mx3_camera_remove': clkdev.c:(.devexit.text+0x674): undefined reference to `vb2_dma_contig_cleanup_ctx' make[2]: *** [.tmp_vmlinux1] Error 1 make[1]: *** [sub-make] Error 2 make: *** [all] Error 2 Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] sh_mobile_csi2: fix module reloadingGuennadi Liakhovetski2011-04-131-2/+8
| | | | | | | | | | | | | | | | | | | | If the camera host driver (sh_mobile_ceu_camera.c) is unloaded and then reloaded, probe will fail, because camera client .set_bus_param() and .query_bus_param() methods have been set to NULL. Fix this by caching the original pointers and restoring them on driver-unbind. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] soc-camera: don't dereference I2C client after it has been removedGuennadi Liakhovetski2011-04-131-1/+2
| | | | | | | | | | | | | | | | i2c_unregister_device() frees the I2C client, so, dereferencing it afterwards is a bug, that leads to Oopses. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] imx074: return a meaningful error code instead of -1Guennadi Liakhovetski2011-04-131-1/+1
| | | | | | | | | | Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] soc-camera: fix a recent multi-camera breakage on sh-mobileGuennadi Liakhovetski2011-04-133-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | With the introduction of CSI2 support on sh-mobile, the host driver switched to using v4l2_device_call_until_err() with grp_id == 0 to call subdev operations on the sensor and the CSI2 subdev. However, this has broken multi-client set ups like the one on migor, because that way all operations get called on both clients. To fix this add a grp_id and set it to the client private context. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] videobuf2: fix an error messageGuennadi Liakhovetski2011-04-131-1/+1
| | | | | | | | | | | | | | | | buf->size is not yet initialised in videobuf2-dma-contig at the time of the error message, use "size." Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] videobuf2: fix core to correctly identify allocation failuresGuennadi Liakhovetski2011-04-131-1/+1
| | | | | | | | | | | | | | | | | | The videobuf2-dma-contig allocator returns an ERR_PTR() on failure, not a NULL like all other allocators. Fix videobuf2-core to also correctly recognise those failures. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx18: Fix list BUG for IDX stream, triggerable in cx18_probe() error ↵Andy Walls2011-04-131-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | clean up, If allocating stream buffers for one of the primary streams (e.g. YUV) failed during card probe, the error path clean up would try to manipulate the yet unitialized IDX stream structures. This caused a BUG due to unitialized list heads. Detect that case and ignore the uninitialized IDX stream. Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>