aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/media (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-07-13Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-mediaLinus Torvalds10-95/+107
Pull media updates from Mauro Carvalho Chehab: "This series contain: - new i2c video drivers: ml86v7667 (video decoder), ths8200 (video encoder) - a new video driver for EasyCap cards based on Fushicai USBTV007 - Improved support for OF and embedded systems, with V4L2 async initialization and a better support for clocks - API cleanups on the ioctls used by the v4l2 debug tool - Lots of cleanups - As usual, several driver improvements and new cards additions - Revert two changesets that change the minimal symbol rate for stv0399, as request by Manu - Update MAINTAINERS and other files to point to my new e-mail" * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (378 commits) MAINTAINERS & ABI: Update to point to my new email [media] stb0899: restore minimal rate to 5Mbauds [media] exynos4-is: Correct colorspace handling at FIMC-LITE [media] exynos4-is: Set valid initial format on FIMC.n subdevs [media] exynos4-is: Set valid initial format on FIMC-IS-ISP subdev pads [media] exynos4-is: Fix format propagation on FIMC-IS-ISP subdev [media] exynos4-is: Set valid initial format at FIMC-LITE [media] exynos4-is: Fix format propagation on FIMC-LITE.n subdevs [media] MAINTAINERS: Update S5P/Exynos FIMC driver entry [media] Documentation: Update driver's directory in video4linux/fimc.txt [media] exynos4-is: Change fimc-is firmware file names [media] exynos4-is: Add support for Exynos5250 MIPI-CSIS [media] exynos4-is: Add Exynos5250 SoC support to fimc-lite driver [media] exynos4-is: Drop drvdata handling in fimc-lite for non-dt platforms [media] media: i2c: tvp514x: remove manual setting of subdev name [media] media: i2c: tvp7002: remove manual setting of subdev name [media] mem2mem: set missing v4l2_dev pointer [media] wl128x: add missing struct v4l2_device [media] tvp514x: Fix init seqeunce [media] saa7134: Fix sparse warnings by adding __user annotation ...
2013-07-03Merge branch 'exotic-arch-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68kLinus Torvalds1-1/+2
Pull "exotic" arch fixes from Geert Uytterhoeven: "This is a collection of several exotic architecture fixes, and a few other fixes for issues that were detected while doing the former" * 'exotic-arch-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (35 commits) lib: Move fonts from drivers/video/console/ to lib/fonts/ console/font: Refactor font support code selection logic Revert "staging/solo6x10: depend on CONFIG_FONTS" input: cros_ec_keyb_clear_keyboard() depends on CONFIG_PM_SLEEP score: Wire up asm-generic/xor.h score: Remove unneeded <asm/dma-mapping.h> openrisc: Wire up asm-generic/xor.h h8300/boot: Use POSIX "$((..))" instead of bashism "$[...]" h8300: Mark H83002 and H83048 CPU support broken h8300: Switch h8300 to drivers/Kconfig h8300: Limit timer channel ranges in Kconfig h8300: Wire up asm-generic/xor.h h8300: Fill the system call table using a CALL() macro h8300: Fix <asm/tlb.h> h8300: Hardcode symbol prefixes in asm sources h8300: add missing definition for read_barries_depends() frv: head.S - Remove commented-out initialization code cris: Wire up asm-generic/vga.h parport: disable PC-style parallel port support on cris console: Disable VGA text console support on cris ...
2013-06-24Merge 3.10-rc7 into driver-core-nextGreg Kroah-Hartman3-3/+6
We want the firmware merge fixes, and other bits, in here now. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-23console/font: Refactor font support code selection logicGeert Uytterhoeven1-0/+2
The current Makefile rules to build font support are messy and buggy. Replace them by Kconfig rules: - Introduce CONFIG_FONT_SUPPORT, which controls the building of all font code, - Select CONFIG_FONT_SUPPORT for all drivers that use fonts, - Select CONFIG_FONT_8x16 for all drivers that default to the VGA8x16 font, - Drop the bogus console dependency for CONFIG_VIDEO_VIVI, - Always process drivers/video/console/Makefile, as some drivers need fonts even if CONFIG_VT is not set. This fixes (if CONFIG_SOLO6X10=y and there are no built-in console drivers): drivers/built-in.o: In function `solo_osd_print': drivers/staging/media/solo6x10/solo6x10-enc.c:144: undefined reference to `.find_font' This fixes (if CONFIG_VT=n): drivers/built-in.o: In function `vivi_init': vivi.c:(.init.text+0x1a3da): undefined reference to `find_font' Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> [original part] Acked-by: Randy Dunlap <rdunlap@infradead.org> [drivers/video/Makefile]
2013-06-23Revert "staging/solo6x10: depend on CONFIG_FONTS"Geert Uytterhoeven1-1/+0
This reverts commit 8c090cfbf980581454ae4caae731574fedd7dce8. CONFIG_FONTS is not about enabling font support, but about enabling manual selection of built-in fonts. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-06-21[media] go7007: fix return 0 for unsupported devices in go7007_usb_probe()Alexey Khoroshilov1-2/+2
probe() should not return 0 for unsupported devices, but go7007_usb_probe() does. The patch fixes it to return -ENODEV. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-20Merge branch 'linus' into patchworkMauro Carvalho Chehab3-3/+7
* linus: (1465 commits) ARM: tegra30: clocks: Fix pciex clock registration lseek(fd, n, SEEK_END) does *not* go to eof - n Linux 3.10-rc6 smp.h: Use local_irq_{save,restore}() in !SMP version of on_each_cpu(). powerpc: Fix missing/delayed calls to irq_work powerpc: Fix emulation of illegal instructions on PowerNV platform powerpc: Fix stack overflow crash in resume_kernel when ftracing snd_pcm_link(): fix a leak... use can_lookup() instead of direct checks of ->i_op->lookup move exit_task_namespaces() outside of exit_notify() fput: task_work_add() can fail if the caller has passed exit_task_work() xfs: don't shutdown log recovery on validation errors xfs: ensure btree root split sets blkno correctly xfs: fix implicit padding in directory and attr CRC formats xfs: don't emit v5 superblock warnings on write mei: me: clear interrupts on the resume path mei: nfc: fix nfc device freeing mei: init: Flush scheduled work before resetting the device sctp: fully initialize sctp_outq in sctp_outq_init netiucv: Hold rtnl between name allocation and device registration. ...
2013-06-19[media] davinci_vpfe: Clean up media entity after unregistering subdevSakari Ailus5-14/+14
media_entity_cleanup() frees the links array which will be accessed by media_entity_remove_links() called by v4l2_device_unregister_subdev(). Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-18Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-mediaLinus Torvalds3-3/+6
Pull media fixes from Mauro Carvalho Chehab: "Series of fixes for 3.10. There are some usual driver fixes (mostly on s5p/exynos playform drivers), plus some fixes at V4L2 core" * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (40 commits) [media] soc_camera: error dev remove and v4l2 call [media] sh_veu: fix the buffer size calculation [media] sh_veu: keep power supply until the m2m context is released [media] sh_veu: invoke v4l2_m2m_job_finish() even if a job has been aborted [media] v4l2-ioctl: don't print the clips list [media] v4l2-ctrls: V4L2_CTRL_CLASS_FM_RX controls are also valid radio controls [media] cx88: fix NULL pointer dereference [media] DocBook/media/v4l: update version number [media] exynos4-is: Remove "sysreg" clock handling [media] exynos4-is: Fix reported colorspace at FIMC-IS-ISP subdev [media] exynos4-is: Ensure fimc-is clocks are not enabled until properly configured [media] exynos4-is: Prevent NULL pointer dereference when firmware isn't loaded [media] s5p-mfc: Add NULL check for allocated buffer [media] s5p-mfc: added missing end-of-lines in debug messages [media] s5p-mfc: v4l2 controls setup routine moved to initialization code [media] s5p-mfc: separate encoder parameters for h264 and mpeg4 [media] s5p-mfc: Remove special clock usage in driver [media] s5p-mfc: Remove unused s5p_mfc_get_decoded_status_v6() function [media] v4l2: mem2mem: save irq flags correctly [media] coda: v4l2-compliance fix: add VIDIOC_CREATE_BUFS support ...
2013-06-17[media] staging/media: lirc_imon: fix leaks in imon_probe()Alexey Khoroshilov1-3/+4
Error handling of usb_submit_urb() is not as all others in imon_probe(). It just unlocks mutexes and returns nonzero leaving all already allocated resources unfreed. The patch makes sure all the resources are deallocated. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-17[media] solo6x10: reimplement SAA712x setup routineIsmael Luceno1-46/+66
This cleans up the saa712x setup code and there are no functional changes. Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net> [hans.verkuil@cisco.com: add clarification that this is cleanup only] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-17[media] dt3155v4l: remove deprecated current_normHans Verkuil1-1/+0
Since this driver provides a g_std op the current_norm field isn't used anyway, so just drop it. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-08[media] media: Rename media_entity_remote_source to media_entity_remote_padAndrzej Hajda1-6/+6
Function media_entity_remote_source actually returns the remote pad to the given one, regardless if this is the source or the sink pad. Name media_entity_remote_pad is more adequate for this function. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-03Finally eradicate CONFIG_HOTPLUGStephen Rothwell1-1/+0
Ever since commit 45f035ab9b8f ("CONFIG_HOTPLUG should be always on"), it has been basically impossible to build a kernel with CONFIG_HOTPLUG turned off. Remove all the remaining references to it. Cc: Russell King <linux@arm.linux.org.uk> Cc: Doug Thompson <dougthompson@xmission.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Pavel Machek <pavel@ucw.cz> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-27[media] staging/solo6x10: select the desired fontXiong Zhou1-0/+1
Make sure FONT_8x16 can be found by find_font(). Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-27[media] drivers/staging: davinci: vpfe: fix dependency for building the driverLad, Prabhakar1-1/+1
from commit 3778d05036cc7ddd983ae2451da579af00acdac2 [media: davinci: kconfig: fix incorrect selects] VIDEO_VPFE_CAPTURE was removed but there was a negative dependancy for building the DM365 VPFE MC based capture driver (VIDEO_DM365_VPFE), This patch fixes this dependency by replacing the VIDEO_VPFE_CAPTURE with VIDEO_DM365_ISIF, so as when older DM365 ISIF v4l driver is selected the newer media controller driver for DM365 isnt visible. Reported-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-21[media] solo6x10: Approximate frame intervals with non-standard denominatorIsmael Luceno1-23/+15
Instead of falling back to 1/25 (PAL) or 1/30 (NTSC). Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-21[media] davinci: vpfe: fix error return code in vpfe_probe()Wei Yongjun1-2/+4
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> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-16staging/solo6x10: depend on CONFIG_FONTSArnd Bergmann1-0/+1
The new SOLO6X10 driver needs the built-in console fonts, specifically the VGA8x16 font and building it without console support results in a link error error. drivers/built-in.o: In function `solo_osd_print': :(.text+0x7d3424): undefined reference to `find_font' This adds a dependency on the CONFIG_FONTS symbol and changes the console code to always build the base driver even if there are no specific fonts built-in. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Hans Verkuil <hans.verkuil@cisco.com> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-02Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linuxLinus Torvalds1-5/+2
Pull i2c changes from Wolfram Sang: - an arbitration driver. While the driver is quite simple, it caused discussion if we need additional arbitration on top of the one specified in the I2C standard. Conclusion is that I accept a few generic mechanisms, but not very specific ones. - the core lost the detach_adapter() call. It has no users anymore and was in the way for other cleanups. attach_adapter() is sadly still there since there are users waiting to be converted. - the core gained a bus recovery infrastructure. I2C defines a way to recover if the data line is stalled. This mechanism is now in the core and drivers can now pass some data to make use of it. - bigger driver cleanups for designware, s3c2410 - removing superfluous refcounting from drivers - removing Ben Dooks as second maintainer due to inactivity. Thanks for all your work so far, Ben! - bugfixes, feature additions, devicetree fixups, simplifications... * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (38 commits) i2c: xiic: must always write 16-bit words to TX_FIFO i2c: octeon: use HZ in timeout value i2c: octeon: Fix i2c fail problem when a process is terminated by a signal i2c: designware-pci: drop superfluous {get|put}_device i2c: designware-plat: drop superfluous {get|put}_device i2c: davinci: drop superfluous {get|put}_device MAINTAINERS: Ben Dooks is inactive regarding I2C i2c: mux: Add i2c-arb-gpio-challenge 'mux' driver i2c: at91: convert to dma_request_slave_channel_compat() i2c: mxs: do error checking and handling in PIO mode i2c: mxs: remove races in PIO code i2c-designware: switch to use runtime PM autosuspend i2c-designware: use usleep_range() in the busy-loop i2c-designware: enable/disable the controller properly i2c-designware: use dynamic adapter numbering on Lynxpoint i2c-designware-pci: use managed functions pcim_* and devm_* i2c-designware-pci: use dev_err() instead of printk() i2c-designware: move to managed functions (devm_*) i2c: remove CONFIG_HOTPLUG ifdefs i2c: s3c2410: Add SMBus emulation for block read ...
2013-04-22[media] solo6x10: Fix pixelformat accepted/reported by the encoderIsmael Luceno1-11/+32
The 6010 produces MPEG-4 part 2, while 6110 produces H.264. Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-22[media] go7007: dubious one-bit signed bitfieldsDan Carpenter1-2/+2
Because they're signed, "is_video" and "is_audio" can be 0 and -1 instead of 0 and 1 as intended. It doesn't cause a bug, but it makes Sparse complain: drivers/staging/media/go7007/go7007-priv.h:94:31: error: dubious one-bit signed bitfield drivers/staging/media/go7007/go7007-priv.h:95:31: error: dubious one-bit signed bitfield Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-22[media] solo6x10: Update the encoder mode on VIDIOC_S_FMTIsmael Luceno1-0/+1
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] staging/media: fix go7007 dependencies and buildRandy Dunlap1-1/+1
VIDEO_GO7007 uses usb interfaces so it should depend on USB. It also selects CYPRESS_FIRMWARE, which depends on USB. Fixes build errors and a kconfig warning: go7007-loader.c:(.text+0xcc7d0): undefined reference to `usb_get_dev' go7007-loader.c:(.init.text+0x49f0): undefined reference to `usb_register_driver' go7007-loader.c:(.exit.text+0x17ce): undefined reference to `usb_deregister' warning: (DVB_USB_AZ6007 && VIDEO_GO7007) selects CYPRESS_FIRMWARE which has unmet direct dependencies (MEDIA_SUPPORT && USB) Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] dt3155v4l: fix timestamp handlingHans Verkuil1-1/+3
Use the monotonic clock and set the timestamp_type that vb2 expects. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] dt3155v4l: fix incorrect mutex lockingHans Verkuil1-1/+2
A mutex_unlock was missing in the 'success' path of the open() call, and also at one error path in the same function. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-02i2c: Ignore return value of i2c_del_adapter()Lars-Peter Clausen1-5/+2
i2c_del_adapter() always returns 0. So all checks testing whether it will be non zero will always evaluate to false and the conditional code is dead code. This patch updates all callers of i2c_del_mux_adapter() to ignore the return value and assume that it will always succeed (which it will). In a subsequent patch the return type of i2c_del_adapter() will be made void. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Reviewed-by: Jean Delvare <khali@linux-fr.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-03-29[media] media: move dvb-usb-v2/cypress_firmware.c to media/commonHans Verkuil3-8/+5
Loading the cypress firmware is not dvb specific and should be common functionality. Move the source to media/common and make it a standalone module. As a result we can remove the dependency on dvb-usb in go7007, which has nothing to do with dvb. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29[media] solo6x10: The size of the thresholds ioctls was too largeHans Verkuil2-2/+9
On powerpc the maximum size for the ioctl argument is 8191, and it was 8192. However, the 64x64 array of threshold values is more than is actually needed in practice for PAL and NTSC formats. A 45x45 array will do just fine. So change the size accordingly to fix this problem. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29[media] ioctl numbers are unsigned intMauro Carvalho Chehab1-1/+1
ioctl's number is unsigned int. Fix it at vidioc_default. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29[media] staging: davinci: Fix typo in staging/media/davinciMasanari Iida4-9/+9
Correct spelling typo in staging/media/davinci Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-26[media] go7007: fix invalid use of sizeof in go7007_usb_i2c_master_xfer()Wei Yongjun1-1/+1
sizeof() when applied to a pointer typed expression gives the size of the pointer, not that of the pointed data. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: prefix sources with 'solo6x10-'Hans Verkuil12-1/+3
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: rename headersHans Verkuil9-7/+7
Prefix the headers with 'solo6x10-'. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: clean up motion detection handlingHans Verkuil3-54/+97
An earlier patch temporarily disabled regional motion detection. This patch adds it back: the 'Motion Detection Enable' control is now a 'Motion Detection Mode'. And to set/get the regional thresholds two new ioctls were added to get/set those thresholds. The BUF_FLAG constants were also updated to prevent clashing with existing buffer flags. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: disable the 'priv' abuseHans Verkuil1-0/+8
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: fix sequence handlingHans Verkuil3-2/+6
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: use V4L2_PIX_FMT_MPEG4, not _FMT_MPEGHans Verkuil1-12/+6
FMT_MPEG is for multiplexed streams, not elementary streams. The same is true for the V4L2_CID_MPEG_VIDEO_ENCODING control. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: small big-endian fixHans Verkuil1-1/+1
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: also stop DMA if the SOLO_PCI_ERR_P2M_DESC is raisedHans Verkuil1-1/+1
Otherwise the computer will hang. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: drop video_type and add proper s_std supportHans Verkuil6-52/+67
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: add call to pci_dma_mapping_errorHans Verkuil1-0/+2
Check the result of the dma mapping. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: fix 'BUG: key ffff88081a2a9b58 not in .data!'Hans Verkuil1-0/+1
Caused by a missing sysfs_attr_init(). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: convert the display node to vb2Hans Verkuil4-207/+103
As a consequence the ioctl op has been replaced by unlocked_ioctl. Since we are now using the core lock the locking scheme has been simplified as well. The main reason for converting this driver to vb2 was that the locking scheme in v4l2.c was hopeless. It was easier to just convert the driver then to try and salvage a threading and videobuf nightmare. The videobuf2 framework is far, far superior compared to the old videobuf. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: convert encoder nodes to vb2Hans Verkuil3-379/+140
As a consequence the ioctl op has been replaced by unlocked_ioctl. Since we are now using the core lock the locking scheme has been simplified as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: move global fields in solo_enc_fh to solo_enc_devHans Verkuil2-221/+175
All fields in solo_enc_fh do not belong there since they refer to global properties. After moving all these fields to solo_enc_dev the solo_dev_fh struct can be removed completely. Note that this also kills the 'listener' feature of this driver. This feature (where multiple filehandles can read the video) is illegal in the V4L2 API. Do this in userspace: it's much more efficient to copy memory than it is to DMA to every listener. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: move global fields in solo_dev_fh to solo_devHans Verkuil2-137/+101
All fields in solo_dev_fh do not belong there since they refer to global properties. After moving all these fields to solo_dev the solo_dev_fh struct can be removed completely. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: add support for prio and control event handlingHans Verkuil2-3/+33
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: fix various format-related compliancy issuesHans Verkuil2-35/+46
- try_fmt should never return -EBUSY. - invalid pix->field values were not mapped to a valid value. - the priv field of struct v4l2_pix_format wasn't zeroed. - the try_fmt error code was not checked in set_fmt. - enum_framesizes/intervals is valid for both MJPEG and MPEG pixel formats. - enum_frameintervals didn't check width and height and reported the wrong range. - s_parm didn't set readbuffers. - don't fail on invalid colorspace, just replace with the valid colorspace. - bytesperline should be 0 for compressed formats. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: add control frameworkHans Verkuil5-329/+132
Note that the MOTION_THRESHOLD functionality has been temporarily reduced: only the global threshold can be set, not the per-block. This will be addressed in a later patch: controls are not the proper way to do this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>