aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/cobalt (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-05-21treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner1-0/+1
Add SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any form These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-20media: Kconfig files: use the right help coding styleMauro Carvalho Chehab1-1/+1
Checkpatch wants to use 'help' instead of '---help---': WARNING: prefer 'help' over '---help---' for new help texts Let's change it globally at the media subsystem, as otherwise people would keep using the old way. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-19media: cobalt: replace VB2_BUF_STATE_REQUEUEING by _ERRORHans Verkuil1-1/+1
The cobalt driver is the only driver that uses VB2_BUF_STATE_REQUEUEING. Replace it by VB2_BUF_STATE_ERROR so we can drop support for the REQUEUEING state. The requeueing state was used in the cobalt driver to optimize buffer handling while waiting for a valid signal: by requeueing buffers internally there was no need for userspace to handle and requeue buffers with the ERROR flag set. However, requeueing also makes the buffer handling unordered, which is generally a bad idea. Requeueing also does not work with requests and any future fence support. Since it is really a minor optimization in the cobalt driver it is best to just return the buffer in an ERROR state. With this change support for requeueing can now be removed in vb2. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-01media: pci: fix several typosMauro Carvalho Chehab1-1/+1
Use codespell to fix lots of typos over frontends. Manually verified to avoid false-positives. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-11-20media: vidioc_cropcap -> vidioc_g_pixelaspectHans Verkuil1-4/+6
Now vidioc_cropcap is only used to return the pixelaspect, so rename it accordingly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-11-20media: cropcap/g_selection splitHans Verkuil1-4/+34
If g_selection is implemented, then the v4l2-ioctl cropcap code assumes that cropcap just implements the pixelaspect part and that g_selection provides the crop bounds and default rectangles. There are still some drivers that only implement cropcap and not g_selection. Split up cropcap into a cropcap and g_selection for those drivers. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-09-11media: use strscpy() instead of strlcpy()Mauro Carvalho Chehab3-10/+10
The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL terminated strings. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-08-31media: cobalt: Use v4l2_calc_timeperframe helperJose Abreu1-2/+7
Currently, cobalt driver always returns 60fps in g_parm. This patch uses the new v4l2_calc_timeperframe helper to calculate the time per frame value. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-07-27media: pci: cobalt: Replace GFP_ATOMIC with GFP_KERNEL in cobalt_probe()Jia-Ju Bai1-1/+1
cobalt_probe() is never called in atomic context. It calls kzalloc() with GFP_ATOMIC, which is not necessary. GFP_ATOMIC can be replaced with GFP_KERNEL. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-02-14media: cobalt: add SPDX license infoHans Verkuil26-325/+26
Replace the old license information with the corresponding SPDX license. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-01-23media: cobalt: select CONFIG_SND_PCMArnd Bergmann1-0/+1
The cobalt sound driver has a dependency on ALSA, but not on the PCM helper code, so this can lead to an extremely rare link error in randconfig builds: ERROR: "snd_pcm_period_elapsed" [drivers/media/pci/cobalt/cobalt.ko] undefined! ERROR: "_snd_pcm_stream_lock_irqsave" [drivers/media/pci/cobalt/cobalt.ko] undefined! ERROR: "snd_pcm_hw_constraint_integer" [drivers/media/pci/cobalt/cobalt.ko] undefined! ERROR: "snd_pcm_set_ops" [drivers/media/pci/cobalt/cobalt.ko] undefined! ERROR: "snd_pcm_stream_unlock_irqrestore" [drivers/media/pci/cobalt/cobalt.ko] undefined! ERROR: "snd_pcm_lib_ioctl" [drivers/media/pci/cobalt/cobalt.ko] undefined! ERROR: "snd_pcm_new" [drivers/media/pci/cobalt/cobalt.ko] undefined! The other audio drivers select 'SND_PCM' for this, so let's do the same. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-09-23media: cobalt: do not register subdev nodesHans Verkuil1-3/+0
In the distant past the adv7604 driver used private controls. In order to access them the v4l-subdevX nodes were needed. Later the is_private tag was removed in the adv7604 driver and the need for v4l-subdevX device nodes disappeared. Remove the creation of those device nodes from this driver. Note: the cobalt card is only used inside Cisco and we never actually used the v4l-subdevX nodes for anything. So this API change can be done safely without breaking anything. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-09-23media: cobalt: remove redundant zero check on retvalColin Ian King1-2/+0
The error handling paths all end up with retval being non-zero, so the check for retval being zero is always false and hence is redundant. Remove it. Detected by CoverityScan CID#1309479 ("Logically dead code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-26media: pci: make i2c_adapter constBhumika Goyal1-1/+1
Make these const as they are only used in a copy operation. Done using Coccinelle Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: pci: make snd_pcm_hardware constBhumika Goyal1-2/+2
Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-09media: cobalt: constify pci_device_idArvind Yadav1-1/+1
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by <linux/pci.h> work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06[media] cobalt: fix unchecked return valuesPan Bian1-0/+2
Function pci_find_ext_capability() may return 0, which is an invalid address. In function cobalt_pcie_status_show(), its return value is used without validation. This patch adds checks to validate the return address. Signed-off-by: Pan Bian <bianpan2016@163.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-30[media] cobalt: fix spelling mistake: "Celcius" -> "Celsius"Colin Ian King1-2/+2
trivial fix to spelling mistake in cobalt_info message. Anders Celsius was the Swedish astronomer. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-12-21[media] media/cobalt: use pci_irq_allocate_vectorsChristoph Hellwig2-8/+2
Simply the interrupt setup by using the new PCI layer helpers. Despite using pci_enable_msi_range, this driver was only requesting a single MSI vector anyway. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16[media] cobalt: fix copy-and-paste errorHans Verkuil1-1/+1
The vmr_stat variable was filled with the contents of the control register, not the status register. Classic copy-and-paste error. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16[media] cobalt: add cropcap supportHans Verkuil1-0/+21
Now that the timings contain picture aspect ratio information, we can support cropcap to return the pixel aspect ratio. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-19[media] pci: constify snd_pcm_ops structuresJulia Lawall1-2/+2
Check for snd_pcm_ops structures that are only stored in the ops field of a snd_soc_platform_driver structure or passed as the third argument to snd_pcm_set_ops. The corresponding field or parameter is declared const, so snd_pcm_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_pcm_ops i@p = { ... }; @ok1@ identifier r.i; struct snd_soc_platform_driver e; position p; @@ e.ops = &i@p; @ok2@ identifier r.i; expression e1, e2; position p; @@ snd_pcm_set_ops(e1, e2, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_pcm_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_pcm_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-06[media] cobalt: update EDIDHans Verkuil1-23/+24
Update the cobalt EDID, fixing various incorrect values (wrong name, product code, various video capabilities). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-24[media] cobalt: support reduced fpsHans Verkuil1-2/+5
Add support for reduced fps (i.e. 59.94 Hz instead of 60 Hz) for the HDMI output. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12[media] ezkit/cobalt: drop unused op_656_range settingHans Verkuil1-2/+0
The adv7604/adv7842 drivers now handle that register setting themselves and need no input from platform data anymore. This was a left-over from the time that the pixelport output format was decided by the platform data. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] vb2: replace void *alloc_ctxs by struct device *alloc_devsHans Verkuil1-1/+1
Make this a proper typed array. Drop the old allocate context code since that is no longer used. Note that the memops functions now get a struct device pointer instead of the struct device ** that was there initially (actually a void pointer to a struct containing only a struct device pointer). This code is now a lot cleaner. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media/pci: convert drivers to use the new vb2_queue dev fieldHans Verkuil3-11/+1
Stop using alloc_ctx and just fill in the device pointer. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Federico Vaga <federico.vaga@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-04-13[media] cobalt: add MTD dependencyArnd Bergmann1-0/+1
The cobalt driver fails to link when it is built-in and MTD is disabled or a loadable module: drivers/media/built-in.o: In function `cobalt_flash_probe': :(.text+0xb8b46): undefined reference to `mtd_device_parse_register' :(.text+0xb8b88): undefined reference to `do_map_probe' drivers/media/built-in.o: In function `cobalt_flash_remove': :(.text+0xb8bb4): undefined reference to `mtd_device_unregister' :(.text+0xb8bbe): undefined reference to `map_destroy' This adds a Kconfig dependency to ensure we can call the API. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-18[media] media: videobuf2: Move timestamp to vb2_bufferJunghak Sung1-1/+1
Move timestamp from struct vb2_v4l2_buffer to struct vb2_buffer for common use, and change its type to u64 in order to handling y2038 problem. This patch also includes all device drivers' changes related to this restructuring. Signed-off-by: Junghak Sung <jh1009.sung@samsung.com> Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-18[media] vb2: drop v4l2_format argument from queue_setupHans Verkuil1-8/+4
The queue_setup callback has a void pointer that is just for V4L2 and is the pointer to the v4l2_format struct that was passed to VIDIOC_CREATE_BUFS. The idea was that drivers would use the information from that struct to buffers suitable for the requested format. After the vb2 split series this pointer is now a void pointer, which is ugly, and the reality is that all existing drivers will effectively just look at the sizeimage field of v4l2_format. To make this more generic the queue_setup callback is changed: the void pointer is dropped, instead if the *num_planes argument is 0, then use the current format size, if it is non-zero, then it contains the number of requested planes and the sizes array contains the requested sizes. If either is unsupported, then return -EINVAL, otherwise use the requested size(s). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03[media] v4l2-dv-timings: add new arg to v4l2_match_dv_timingsHans Verkuil1-1/+1
Add the new match_reduced_fps argument to v4l2_match_dv_timings(). Depending on the situation you may or may not desire to match the reduced_fps flag. Typically only HDMI transmitters will need to check for this flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17[media] include/media: split I2C headers from V4L2 coreMauro Carvalho Chehab3-6/+6
Currently, include/media is messy, as it contains both the V4L2 core headers and some driver-specific headers on the same place. That makes harder to identify what core headers should be documented and what headers belong to I2C drivers that are included only by bridge/main drivers that would require the functions provided by them. Let's move those i2c specific files to its own subdirectory. The files to move were produced via the following script: mkdir include/media/i2c (cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done) (cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/*/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done) for i in include/media/*.h; do n=`basename $i`; (for j in $(git grep -l $n); do dirname $j; done)|sort|uniq|grep -ve '^.$' > list; num=$(wc -l list|cut -d' ' -f1); if [ $num == 1 ]; then if [ "`grep i2c list`" != "" ]; then git mv $i include/media/i2c; fi; fi; done And the references corrected via this script: MAIN_DIR="media/" PREV_DIR="media/" DIRS="i2c/" echo "Checking affected files" >&2 for i in $DIRS; do for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do n=`basename $j` git grep -l $n done done|sort|uniq >files && ( echo "Handling files..." >&2; echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\"; ( cd include/$MAIN_DIR; for j in $DIRS; do for i in $(ls $j); do echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\"; done; done; echo "cat > a && mv a \$i; done"; ); echo "Handling documentation..." >&2; echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\"; ( cd include/$MAIN_DIR; for j in $DIRS; do for i in $(ls $j); do echo " perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\"; done; done; echo "cat > a && mv a \$i; done" ); ) >script && . ./script Merged Sakari Ailus patch that moves smiapp.h to include/media/i2c. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
2015-10-20[media] media: videobuf2: Change queue_setup argumentJunghak Sung1-2/+2
Replace struct v4l2_format * with void * to make queue_setup() for common use. And then, modify all device drivers related with this change. Signed-off-by: Junghak Sung <jh1009.sung@samsung.com> Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> [hans.verkuil@cisco.com: fix missing const in fimc-lite.c] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] media: videobuf2: Restructure vb2_bufferJunghak Sung3-14/+19
Remove v4l2 stuff - v4l2_buf, v4l2_plane - from struct vb2_buffer. Add new member variables - bytesused, length, offset, userptr, fd, data_offset - to struct vb2_plane in order to cover all information of v4l2_plane. struct vb2_plane { <snip> unsigned int bytesused; unsigned int length; union { unsigned int offset; unsigned long userptr; int fd; } m; unsigned int data_offset; } Replace v4l2_buf with new member variables - index, type, memory - which are common fields for buffer management. struct vb2_buffer { <snip> unsigned int index; unsigned int type; unsigned int memory; unsigned int num_planes; struct vb2_plane planes[VIDEO_MAX_PLANES]; <snip> }; v4l2 specific fields - flags, field, timestamp, timecode, sequence - are moved to vb2_v4l2_buffer in videobuf2-v4l2.c struct vb2_v4l2_buffer { struct vb2_buffer vb2_buf; __u32 flags; __u32 field; struct timeval timestamp; struct v4l2_timecode timecode; __u32 sequence; }; Signed-off-by: Junghak Sung <jh1009.sung@samsung.com> Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] cobalt: fix Kconfig dependencyHans Verkuil1-1/+1
The cobalt driver should depend on VIDEO_V4L2_SUBDEV_API. This fixes this kbuild error: tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 99bc7215bc60f6cd414cf1b85cd9d52cc596cccb commit: 85756a069c55e0315ac5990806899cfb607b987f [media] cobalt: add new driver config: x86_64-randconfig-s0-09201514 (attached as .config) reproduce: git checkout 85756a069c55e0315ac5990806899cfb607b987f # save the attached .config to linux build tree make ARCH=x86_64 All error/warnings (new ones prefixed by >>): drivers/media/i2c/adv7604.c: In function 'adv76xx_get_format': >> drivers/media/i2c/adv7604.c:1853:9: error: implicit declaration of function 'v4l2_subdev_get_try_format' [-Werror=implicit-function-declaration] fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad); ^ drivers/media/i2c/adv7604.c:1853:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion] fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad); ^ drivers/media/i2c/adv7604.c: In function 'adv76xx_set_format': drivers/media/i2c/adv7604.c:1882:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion] fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad); ^ cc1: some warnings being treated as errors Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-09-25[media] media/pci/cobalt: Use %*ph to print small buffersAlexander Kuleshov1-5/+3
printk() supports %*ph format specifier for printing a small buffers, let's use it intead of %02x %02x... Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-09-05Merge tag 'media/v4.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-mediaLinus Torvalds3-9/+16
Pull media updates from Mauro Carvalho Chehab: - new DVB frontend drivers: ascot2e, cxd2841er, horus3a, lnbh25 - new HDMI capture driver: tc358743 - new driver for NetUP DVB new boards (netup_unidvb) - IR support for DVBSky cards (smipcie-ir) - Coda driver has gain macroblock tiling support - Renesas R-Car gains JPEG codec driver - new DVB platform driver for STi boards: c8sectpfe - added documentation for the media core kABI to device-drivers DocBook - lots of driver fixups, cleanups and improvements * tag 'media/v4.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (297 commits) [media] c8sectpfe: Remove select on undefined LIBELF_32 [media] i2c: fix platform_no_drv_owner.cocci warnings [media] cx231xx: Use wake_up_interruptible() instead of wake_up_interruptible_nr() [media] tc358743: only queue subdev notifications if devnode is set [media] tc358743: add missing Kconfig dependency/select [media] c8sectpfe: Use %pad to print 'dma_addr_t' [media] DocBook media: Fix typo "the the" in xml files [media] tc358743: make reset gpio optional [media] tc358743: set direction of reset gpio using devm_gpiod_get [media] dvbdev: document most of the functions/data structs [media] dvb_frontend.h: document the struct dvb_frontend [media] dvb-frontend.h: document struct dtv_frontend_properties [media] dvb-frontend.h: document struct dvb_frontend_ops [media] dvb: Use DVBFE_ALGO_HW where applicable [media] dvb_frontend.h: document struct analog_demod_ops [media] dvb_frontend.h: Document struct dvb_tuner_ops [media] Docbook: Document struct analog_parameters [media] dvb_frontend.h: get rid of dvbfe_modcod [media] add documentation for struct dvb_tuner_info [media] dvb_frontend: document dvb_frontend_tune_settings ...
2015-07-22[media] cobalt: allow fewer than 8 PCIe lanesHans Verkuil1-5/+6
Currently the cobalt driver refuses to load if fewer than 8 PCIe lanes are assigned. This patch changes this and just issues a warning. The only time it will refuse to load is if the number of assigned lanes is less than what the PCIe host is capable of since this suggests that the card isn't seated correctly in the slot. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-07-22[media] cobalt: accept unchanged timings when vb2_is_busy()Hans Verkuil1-3/+8
When vb2_is_busy() it should still be possible to call S_DV_TIMINGS provided the new timings are the same as the current timings. For input 1 (test generator) the size is always 1080p, so just return that. Fixes a v4l2-compliance issue. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-07-17[media] adv7604/cobalt: Allow compile test if !GPIOLIBGeert Uytterhoeven1-1/+2
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer functionality only, can still be compiled if GPIOLIB is not enabled. Relax the dependency of VIDEO_ADV7604 and VIDEO_COBALT (the latter selects the former) on GPIOLIB if COMPILE_TEST is enabled. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-07-17[media] vb2: Only requeue buffers immediately once streaming is startedSakari Ailus1-1/+1
Buffers can be returned back to videobuf2 in driver's streamon handler. In this case vb2_buffer_done() with buffer state VB2_BUF_STATE_QUEUED will cause the driver's buf_queue vb2 operation to be called, queueing the same buffer again only to be returned to videobuf2 using vb2_buffer_done() and so on. Add a new buffer state VB2_BUF_STATE_REQUEUEING which, when used as the state argument to vb2_buffer_done(), will result in buffers queued to the driver. Using VB2_BUF_STATE_QUEUED will leave the buffer to videobuf2, as it was before "[media] vb2: allow requeuing buffers while streaming". Fixes: ce0eff016f72 ("[media] vb2: allow requeuing buffers while streaming") [mchehab@osg.samsung.com: fix warning: enumeration value 'VB2_BUF_STATE_REQUEUEING' not handled in switch] Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: stable@vger.kernel.org # for v4.1 Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-07-01[media] media/pci/cobalt: fix Kconfig and build when SND is not enabledRandy Dunlap1-0/+1
Fix build errors in cobalt driver when CONFIG_SND is not enabled. Fixes these build errors: ERROR: "snd_pcm_period_elapsed" [drivers/media/pci/cobalt/cobalt.ko] undefined! ERROR: "_snd_pcm_stream_lock_irqsave" [drivers/media/pci/cobalt/cobalt.ko] undefined! ERROR: "snd_pcm_hw_constraint_integer" [drivers/media/pci/cobalt/cobalt.ko] undefined! ERROR: "snd_pcm_set_ops" [drivers/media/pci/cobalt/cobalt.ko] undefined! ERROR: "snd_pcm_stream_unlock_irqrestore" [drivers/media/pci/cobalt/cobalt.ko] undefined! ERROR: "snd_pcm_lib_ioctl" [drivers/media/pci/cobalt/cobalt.ko] undefined! ERROR: "snd_card_new" [drivers/media/pci/cobalt/cobalt.ko] undefined! ERROR: "snd_card_free" [drivers/media/pci/cobalt/cobalt.ko] undefined! ERROR: "snd_card_register" [drivers/media/pci/cobalt/cobalt.ko] undefined! ERROR: "snd_pcm_new" [drivers/media/pci/cobalt/cobalt.ko] undefined! Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-10[media] cobalt: fix 64-bit divisionHans Verkuil2-8/+8
There are still some 64-bit division problems in the cobalt code. Replace it by div_u64. [mchehab@osg.samsung.com: folded with an additional diff sent by Hans via a priv e-mail] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-09[media] adv7511: log the currently set infoframesHans Verkuil1-0/+1
The adv7511 sets up InfoFrames that are used when transmitting video. Log the contents of those InfoFrames so it is possible to see exactly what the transmitter is sending. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-05[media] cobalt: simplify colorspace codeHans Verkuil1-13/+4
Simplify cobalt_g/try_fmt_vid_cap by not setting the colorspace fields in pix again (since v4l2_fill_pix_format does that already), and by using v4l2_fill_mbus_format in cobalt_s_fmt_vid_out which allows the get_fmt call to be dropped as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-05[media] cobalt: support transfer functionHans Verkuil2-0/+7
Add support for the transfer function to the cobalt driver: make sure it is passed on to/retrieved from the sub-device correctly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] adv7604/cobalt: missing GPIOLIB dependencyHans Verkuil1-1/+1
The adv7604 driver depends on GPIOLIB, and therefore cobalt depends on it as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] cobalt: fix sparse warningsHans Verkuil1-110/+124
drivers/media/pci/cobalt/cobalt-v4l2.c:189:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:191:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:192:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:193:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:194:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:195:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:196:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:197:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:198:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:199:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:201:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:202:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:203:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:234:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:240:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:246:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:266:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:267:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:271:28: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:275:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:276:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:312:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:313:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:314:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:315:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:317:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:320:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:321:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:321:36: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:324:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:327:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:328:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:328:41: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:329:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:331:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:332:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:334:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:335:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:336:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:362:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:367:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:368:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:420:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:421:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:422:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:423:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:516:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:516:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:518:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:518:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:518:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:525:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:525:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:546:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:546:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:548:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:549:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:550:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:551:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:552:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:553:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:554:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:555:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:556:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:556:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:556:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:563:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:564:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:564:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:569:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:595:16: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:602:9: warning: dereference of noderef expression Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] cobalt: fix sparse warningsHans Verkuil2-29/+29
drivers/media/pci/cobalt/cobalt-i2c.c:130:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:147:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:151:26: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:156:34: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:206:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:210:26: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:215:34: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:225:27: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:335:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:336:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:337:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:348:34: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:352:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:353:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:356:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:357:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:359:17: warning: dereference of noderef expression Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] cobalt: fix sparse warningsHans Verkuil1-23/+28
drivers/media/pci/cobalt/cobalt-irq.c:62:33: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:64:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:65:23: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:72:21: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:73:25: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:74:25: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:82:33: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:83:33: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:91:25: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:94:23: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:103:25: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:107:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:109:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:116:13: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:119:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:120:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:122:17: warning: dereference of noderef expression Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>