summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/sta2x11
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'media/v5.13-1' of ↵Linus Torvalds2021-04-282-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - addition of a maintainer's profile for the media subsystem - addition of i.MX8 IP support - qcom/camss gained support for hardware version Titan 170 - new RC keymaps - Lots of other improvements, cleanups and bug fixes * tag 'media/v5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (488 commits) media: coda: fix macroblocks count control usage media: rkisp1: params: fix wrong bits settings media: cedrus: Fix H265 status definitions media: meson-ge2d: fix rotation parameters media: v4l2-ctrls: fix reference to freed memory media: venus : hfi: add venus image info into smem media: venus: Fix internal buffer size calculations for v6. media: venus: helpers: keep max bandwidth when mbps exceeds the supported range media: venus: fix hw overload error log condition media: venus: core: correct firmware name for sm8250 media: venus: core,pm: fix potential infinite loop media: venus: core: Fix kerneldoc warnings media: gscpa/stv06xx: fix memory leak media: cx25821: remove unused including <linux/version.h> media: staging: media/meson: remove redundant dev_err call media: adv7842: support 1 block EDIDs, fix clearing EDID media: adv7842: configure all pads media: allegro: change kernel-doc comment blocks to normal comments media: camss: ispif: Remove redundant dev_err call in msm_ispif_subdev_init() media: i2c: rdamc21: Fix warning on u8 cast ...
| * media: media/pci: fix kerneldoc issues in two headersHans Verkuil2021-03-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes these kerneldoc warnings: drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'v4l2_dev' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'snd_card' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'name' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'type' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'dma_mode' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'pci_dev' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'mmio' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'dma_ops' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'video_channels' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'audio_channels' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'audio_rate' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'period_size' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'audio_enabled' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'dma_delay_timer' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'pending_dma_en' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'pending_dma_cmd' not described in 'tw686x_dev' drivers/media/pci/sta2x11/sta2x11_vip.h:25: warning: Function parameter or member 'i2c_id' not described in 'vip_config' drivers/media/pci/sta2x11/sta2x11_vip.h:25: warning: Function parameter or member 'i2c_addr' not described in 'vip_config' Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
| * media: drivers: media: pci: sta2x11: fix Kconfig dependency on GPIOLIBJulian Braha2021-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When STA2X11_VIP is enabled, and GPIOLIB is disabled, Kbuild gives the following warning: WARNING: unmet direct dependencies detected for VIDEO_ADV7180 Depends on [n]: MEDIA_SUPPORT [=y] && GPIOLIB [=n] && VIDEO_V4L2 [=y] && I2C [=y] Selected by [y]: - STA2X11_VIP [=y] && MEDIA_SUPPORT [=y] && MEDIA_PCI_SUPPORT [=y] && MEDIA_CAMERA_SUPPORT [=y] && PCI [=y] && VIDEO_V4L2 [=y] && VIRT_TO_BUS [=y] && I2C [=y] && (STA2X11 [=n] || COMPILE_TEST [=y]) && MEDIA_SUBDRV_AUTOSELECT [=y] This is because STA2X11_VIP selects VIDEO_ADV7180 without selecting or depending on GPIOLIB, despite VIDEO_ADV7180 depending on GPIOLIB. Signed-off-by: Julian Braha <julianbraha@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
* | module: remove never implemented MODULE_SUPPORTED_DEVICELeon Romanovsky2021-03-171-1/+0
|/ | | | | | | | | | MODULE_SUPPORTED_DEVICE was added in pre-git era and never was implemented. We can safely remove it, because the kernel has grown to have many more reliable mechanisms to determine if device is supported or not. Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* media: media/pci: use vb2_video_unregister_device()Hans Verkuil2020-08-281-4/+2
| | | | | | | | | | | Use vb2_video_unregister_device() to automatically stop streaming at unregister time. This avoids the use of vb2_queue_release() which should not be called by drivers that set vdev->queue. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
* media: sta2x11: use generic power managementVaibhav Gupta2020-07-191-48/+15
| | | | | | | | | | | | | | | | | With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. Thus, there is no need to call the PCI helper functions like pci_enable_device(), pci_save/restore_sate(), etc. Compile-tested only. Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
* media: Kconfig files: use select for V4L2 subdevs and MCMauro Carvalho Chehab2020-04-141-3/+3
| | | | | | | | | | | | | | | | | | | | | There are lots of drivers that only work when the media controller and/or the V4L2 subdev APIs are present. Right now, someone need to first enable those APIs before using those drivers. Well, ideally, drivers, should, instead *optionally* depend on it, in order for PC camera drivers to be able to use them, but nowadays most drivers are UVC cameras, with don't require a sensor driver. So, be it. Let's instead make them select the MEDIA_CONTROLLER and the SUBDEV API, in order to make easier for people to be able of enabling them. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
* media: media/pci: rename VFL_TYPE_GRABBER to _VIDEOHans Verkuil2020-02-241-1/+1
| | | | | | | | | 'GRABBER' is a weird name, all other types map to the /dev device names. Rename to 'VIDEO' to be consistent with the other types. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
* media: media/pci: don't set description for ENUM_FMTHans Verkuil2019-07-221-2/+0
| | | | | | | | | | | | The V4L2 core sets the description for the driver in order to ensure consistent naming. So drop the strscpy of the description in drivers. Also remove any description strings in driver-internal structures since those are no longer needed. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: media/pci: set device_caps in struct video_deviceHans Verkuil2019-06-241-4/+2
| | | | | | | | | | | | | | | | Instead of filling in the struct v4l2_capability device_caps field, fill in the struct video_device device_caps field. That way the V4L2 core knows what the capabilities of the video device are. But this only really works if all drivers use this, so convert all pci drivers in this patch. Tested with cx88-blackbird and ivtv PVR-350. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 314Thomas Gleixner2019-06-051-17/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms and conditions of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 51 franklin st fifth floor boston ma 02110 1301 usa the full gnu general public license is included in this distribution in the file called copying extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 2 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Armijn Hemel <armijn@tjaldur.nl> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190530000434.706787045@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174Thomas Gleixner2019-05-301-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 655 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner2019-05-212-0/+2
| | | | | | | | | | | | | | 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>
* media: pci: fix several typosMauro Carvalho Chehab2019-03-011-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>
* media: replace strcpy() by strscpy()Mauro Carvalho Chehab2018-09-111-3/+3
| | | | | | | | | The strcpy() function is being deprecated upstream. Replace it by the safer strscpy(). Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: sta2x11: add a missing parameter descriptionMauro Carvalho Chehab2018-08-071-0/+1
| | | | | | | | Fixes this warning: drivers/media/pci/sta2x11/sta2x11_vip.c:156: warning: Function parameter or member 'v4l_lock' not described in 'sta2x11_vip' Fixes: cd63c0288fd7 ("media: sta2x11: Add video_device and vb2_queue locks") Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: sta2x11: Add video_device and vb2_queue locksEzequiel Garcia2018-07-041-0/+6
| | | | | | | | | | | | | | | | | Currently, this driver does not serialize its video4linux ioctls, which is a bug, as race conditions might appear. In addition, video_device and vb2_queue locks are now both mandatory. Add them, and implement wait_prepare and wait_finish. To stay on the safe side, this commit uses a single mutex for both locks. Better latency can be obtained by separating these if needed. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: Remove depends on HAS_DMA in case of platform dependencyGeert Uytterhoeven2018-05-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their dependencies on HAS_DMA, to prevent compiling subsystems or drivers that cannot work anyway. This simplifies the dependencies, and allows to improve compile-testing. Note: - The various VIDEOBUF*DMA* symbols had to loose their dependencies on HAS_DMA, as they are selected by several individual drivers. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Mark Brown <broonie@kernel.org> Acked-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: sta2x11: Use gpio_is_valid() and remove unnecessary checkArvind Yadav2018-05-091-16/+15
| | | | | | | | | | | | | | | | Replace the manual validity checks for the GPIO with the gpio_is_valid(). In vip_gpio_reserve(), Error checking for gpio pin is not correct. If pwr_pin = -1, It will return 0. This should be return an error. In sta2x11_vip_init_one(), Error checking for gpio 'reset_pin' is unnecessary. Because vip_gpio_reserve() is also checking for valid gpio pin. So removed extra error checking for gpio 'reset_pin'. 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+samsung@kernel.org>
* media: sta2x11_vip: allow build with COMPILE_TESTMauro Carvalho Chehab2018-05-041-1/+1
| | | | | | | | This driver doesn't use any weird API. So, allow building it with COMPILE_TEST. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: sta2x11: document missing function parametersMauro Carvalho Chehab2017-11-301-0/+11
| | | | | | | | | | | | | | | | | | | | As warned: drivers/media/pci/sta2x11/sta2x11_vip.c:414: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:442: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:476: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:493: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:524: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:548: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:566: warning: No description found for parameter 'file' drivers/media/pci/sta2x11/sta2x11_vip.c:566: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:594: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:651: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:717: warning: No description found for parameter 'priv' Most of the above are for the unused priv argument. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: pci: make video_device constBhumika Goyal2017-08-271-1/+1
| | | | | | | | Make these const as they are either used during a copy operation or passed to a const argument of the function cx88_vdev_init. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: pci: constify vb2_ops structureBhumika Goyal2017-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Declare vb2_ops structure as const as it is only stored in the ops field of a vb2_queue structure. This field is of type const, so vb2_ops structures having same properties can be made const too. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct vb2_ops i@p={...}; @ok1@ identifier r1.i; position p; struct sta2x11_vip vip; struct vb2_queue q; @@ ( vip.vb_vidq.ops=&i@p | q.ops=&i@p ) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct vb2_ops i; File size before: text data bss dec hex filename 8448 440 0 8888 22b8 media/pci/sta2x11/sta2x11_vip.o File size after: text data bss dec hex filename 8552 352 0 8904 22c8 media/pci/sta2x11/sta2x11_vip.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: Drop FSF's postal address from the source code filesSakari Ailus2017-01-271-4/+0
| | | | | | | | | | | | | | | | | | | | | Drop the FSF's postal address from the source code files that typically contain mostly the license text. Of the 628 removed instances, 578 are outdated. The patch has been created with the following command without manual edits: git grep -l "675 Mass Ave\|59 Temple Place\|51 Franklin St" -- \ drivers/media/ include/media|while read i; do i=$i perl -e ' open(F,"< $ENV{i}"); $a=join("", <F>); $a =~ s/[ \t]*\*\n.*You should.*\n.*along with.*\n.*(\n.*USA.*$)?\n//m && $a =~ s/(^.*)Or, (point your browser to) /$1To obtain the license, $2\n$1/m; close(F); open(F, "> $ENV{i}"); print F $a; close(F);'; done Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
* [media] vb2: replace void *alloc_ctxs by struct device *alloc_devsHans Verkuil2016-07-081-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>
* [media] media/pci: convert drivers to use the new vb2_queue dev fieldHans Verkuil2016-07-081-16/+2
| | | | | | | | 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>
* [media] sta2x11: remove unused varsMauro Carvalho Chehab2016-04-251-2/+0
| | | | | | | | | | | | | | | | | Changeset 7b9f31f3b3ca ("[media] sta2x11_vip: fix s_std") removed autodetect code, but it kept two vars unused: drivers/media/pci/sta2x11/sta2x11_vip.c: In function 'vidioc_s_std': drivers/media/pci/sta2x11/sta2x11_vip.c:448:6: warning: unused variable 'status' [-Wunused-variable] int status; ^ drivers/media/pci/sta2x11/sta2x11_vip.c:447:14: warning: unused variable 'oldstd' [-Wunused-variable] v4l2_std_id oldstd = vip->std; ^ Remove them. Fixes: 7b9f31f3b3ca ("[media] sta2x11_vip: fix s_std") Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] sta2x11_vip: fix s_stdHans Verkuil2016-04-251-16/+10
| | | | | | | | | | | | | | | The s_std ioctl was broken in this driver, partially due to the changes to the adv7180 driver (this affected the handling of V4L2_STD_ALL) and partially because the new standard was never stored in vip->std. The handling of V4L2_STD_ALL has been rewritten to just call querystd and the new standard is now stored correctly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Federico Vaga <federico.vaga@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: videobuf2: Move timestamp to vb2_bufferJunghak Sung2015-12-181-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>
* [media] vb2: drop v4l2_format argument from queue_setupHans Verkuil2015-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | 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>
* [media] media: videobuf2: Change queue_setup argumentJunghak Sung2015-10-201-1/+1
| | | | | | | | | | | | | | | 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>
* [media] media: videobuf2: Restructure vb2_bufferJunghak Sung2015-10-011-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [media] sta2x11: use monotonic timestampHans Verkuil2015-05-181-1/+2
| | | | | | | | | V4L2 drivers should use MONOTONIC timestamps instead of gettimeofday, which is affected by daylight savings time. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Federico Vaga <federico.vaga@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] sta2x11: embed video_deviceHans Verkuil2015-04-021-23/+12
| | | | | | | | | Embed the video_device struct to simplify the error handling and in order to (eventually) get rid of video_device_alloc/release. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Federico Vaga <federico.vaga@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] adv7180: Add media controller supportLars-Peter Clausen2015-02-021-0/+1
| | | | | | | | | | | | | | | | | | | | | Add media controller support to the adv7180 driver by registering a media entity instance for it as well as implementing pad ops for configuring the format. As there currently don't seem to be any users of the video ops format operations those are removed as well in this patch. Also set the V4L2_SUBDEV_FL_HAS_DEVNODE flag for the subdevice so it is possible to create a subdevice device node. Since the driver now depends on VIDEO_V4L2_SUBDEV_API all drivers which select the driver need to depend on that symbol as well. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Federico Vaga <federico.vaga@gmail.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@osg.samsung.com>
* [media] sta2x11_vip: fix address space castingMauro Carvalho Chehab2014-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:1140:30: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:1140:30: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:1140:30: got void volatile [noderef] <asn:2>*iomem drivers/media/pci/sta2x11/sta2x11_vip.c:1184:30: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:1184:30: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:1184:30: got void volatile [noderef] <asn:2>*iomem drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] be sure that HAS_DMA is enabled for vb2-dma-contigMauro Carvalho Chehab2014-08-261-0/+1
| | | | | | | vb2-dma-contig depends on HAS_DMA, but the Kbuild doesn't take it into account at select. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: Support extending the v4l2_pix_format structureLaurent Pinchart2014-07-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | The v4l2_pix_format structure has no reserved field. It is embedded in the v4l2_framebuffer structure which has no reserved fields either, and in the v4l2_format structure which has reserved fields that were not previously required to be zeroed out by applications. To allow extending v4l2_pix_format, inline it in the v4l2_framebuffer structure, and use the priv field as a magic value to indicate that the application has set all v4l2_pix_format extended fields and zeroed all reserved fields following the v4l2_pix_format field in the v4l2_format structure. The availability of this API extension is reported to userspace through the new V4L2_CAP_EXT_PIX_FORMAT capability flag. Just checking that the priv field is still set to the magic value at [GS]_FMT return wouldn't be enough, as older kernels don't zero the priv field on return. To simplify the internal API towards drivers zero the extended fields and set the priv field to the magic value for applications not aware of the extensions. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIORamakrishnan Muthukrishnan2014-07-041-1/+0
| | | | | | | | | | | Since all the drivers that use `struct v4l2_fh' use the core priority checking, the setting of the flag in the drivers can be removed. Signed-off-by: Ramakrishnan Muthukrishnan <ramakrmu@cisco.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: subdev: Move [gs]_std operation to video opsLaurent Pinchart2014-05-241-2/+2
| | | | | | | | | | | | The g_std and s_std operations are video-related, move them to the video ops where they belong. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] vb2: stop_streaming should return voidHans Verkuil2014-04-231-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | The vb2 core ignores any return code from the stop_streaming op. And there really isn't anything it can do anyway in case of an error. So change the return type to void and update any drivers that implement it. The int return gave drivers the idea that this operation could actually fail, but that's really not the case. The pwc amd sdr-msi3101 drivers both had this construction: if (mutex_lock_interruptible(&s->v4l2_lock)) return -ERESTARTSYS; This has been updated to just call mutex_lock(). The stop_streaming op expects this to really stop streaming and I very much doubt this will work reliably if stop_streaming just returns without really stopping the DMA. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Pawel Osciak <pawel@osciak.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] vb2: call buf_finish from __queue_cancelHans Verkuil2014-03-111-1/+2
| | | | | | | | | | | | | | | If a queue was canceled, then the buf_finish op was never called for the pending buffers. So add this call to queue_cancel. Before calling buf_finish set the buffer state to PREPARED, which is the correct state. That way the states DONE and ERROR will only be seen in buf_finish if streaming is in progress. Since buf_finish can now be called from non-streaming state we need to adapt the handful of drivers that actually need to know this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] vb2: change result code of buf_finish to voidHans Verkuil2014-03-111-3/+1
| | | | | | | | | | The buf_finish op should always work, so change the return type to void. Update the few drivers that use it. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Pawel Osciak <pawel@osciak.com> Reviewed-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] media: pci: remove DEFINE_PCI_DEVICE_TABLE macroJingoo Han2013-12-101-1/+1
| | | | | | | | Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] sta2x11_vip: fix error return code in sta2x11_vip_init_one()Wei Yongjun2013-05-271-1/+2
| | | | | | | | | | | | The orig code will release all the resources if v4l2_device_register() failed and return 0. But what we need in this case is to return an negative error code to let the caller known we are failed. So the patch save the return value of v4l2_device_register() to 'ret' and return it when error. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] sta2x11_vip: Fix compilation if I2C is not setMauro Carvalho Chehab2013-04-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Fengguang Wu <fengguang.wu@intel.com>: > drivers/media/pci/sta2x11/sta2x11_vip.c: In function 'sta2x11_vip_init_one': > drivers/media/pci/sta2x11/sta2x11_vip.c:1314:2: error: implicit declaration of function 'i2c_get_adapter' [-Werror=implicit-function-declaration] > drivers/media/pci/sta2x11/sta2x11_vip.c:1314:15: warning: assignment makes pointer from integer without a cast [enabled by default] > drivers/media/pci/sta2x11/sta2x11_vip.c:1330:2: error: implicit declaration of function 'i2c_put_adapter' [-Werror=implicit-function-declaration] And also: > warning: (STA2X11_VIP) selects VIDEO_ADV7180 which has unmet direct dependencies (MEDIA_SUPPORT && VIDEO_V4L2 && I2C) > drivers/media/i2c/adv7180.c: In function '__adv7180_status': > drivers/media/i2c/adv7180.c:194:2: error: implicit declaration of function 'i2c_smbus_read_byte_data' [-Werror=implicit-function-declaration] > drivers/media/i2c/adv7180.c: In function 'adv7180_s_routing': > drivers/media/i2c/adv7180.c:251:2: error: implicit declaration of function 'i2c_smbus_write_byte_data' [-Werror=implicit-function-declaration] > drivers/media/i2c/adv7180.c: In function 'adv7180_probe': > drivers/media/i2c/adv7180.c:551:2: error: implicit declaration of function 'i2c_check_functionality' [-Werror=implicit-function-declaration] > drivers/media/i2c/adv7180.c:554:2: error: implicit declaration of function 'i2c_adapter_id' [-Werror=implicit-function-declaration] > drivers/media/i2c/adv7180.c: At top level: > drivers/media/i2c/adv7180.c:663:1: warning: data definition has no type or storage class [enabled by default] > drivers/media/i2c/adv7180.c:663:1: warning: type defaults to 'int' in declaration of 'module_i2c_driver' [-Wimplicit-int] > drivers/media/i2c/adv7180.c:663:1: warning: parameter names (without types) in function declaration [enabled by default] > drivers/media/i2c/adv7180.c:649:26: warning: 'adv7180_driver' defined but not used [-Wunused-variable] This is due to the lack of I2C support: ... > CONFIG_I2C is not set ... So, Make sure that sta2x11_vip depends on I2C. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: pass std by value to the write-only s_std ioctlHans Verkuil2013-03-241-9/+9
| | | | | | | | | | | | | This ioctl is defined as IOW, so pass the argument by value instead of by reference. I could have chosen to add const instead, but this is 1) easier to handle in drivers and 2) consistent with the s_std subdev operation. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Jonathan Corbet <corbet@lwn.net> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] sta2x11_vip: convert to videobuf2, control framework, file handlerFederico Vaga2013-02-062-641/+434
| | | | | | | | | | | | | | This patch re-write the driver and use the videobuf2 interface instead of the old videobuf. Moreover, it uses also the control framework which allows the driver to inherit controls from its subdevice (ADV7180). Finally the driver does not implement custom file operation but it uses the generic ones from videobuf2 and v4l2_fh Signed-off-by: Federico Vaga <federico.vaga@gmail.com> Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* Merge branch 'v4l_for_linus' into staging/for_v3.9Mauro Carvalho Chehab2013-01-241-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * v4l_for_linus: (464 commits) [media] uvcvideo: Set error_idx properly for S_EXT_CTRLS failures [media] uvcvideo: Cleanup leftovers of partial revert [media] uvcvideo: Return -EACCES when trying to set a read-only control Linux 3.8-rc3 mm: reinstante dropped pmd_trans_splitting() check cred: Remove tgcred pointer from struct cred drm/ttm: fix fence locking in ttm_buffer_object_transfer ARM: clps711x: Fix bad merge of clockevents setup ARM: highbank: save and restore L2 cache and GIC on suspend ARM: highbank: add a power request clear ARM: highbank: fix secondary boot and hotplug ARM: highbank: fix typos with hignbank in power request functions ARM: dts: fix highbank cpu mpidr values ARM: dts: add device_type prop to cpu nodes on Calxeda platforms drm/prime: drop reference on imported dma-buf come from gem xen/netfront: improve truesize tracking ARM: mx5: Fix MX53 flexcan2 clock ARM: OMAP2+: am33xx-hwmod: Fix wrongly terminated am33xx_usbss_mpu_irqs array sctp: fix Kconfig bug in default cookie hmac selection EDAC: Cleanup device deregistering path ... Conflicts: drivers/media/pci/dm1105/dm1105.c drivers/media/platform/soc_camera/mx2_camera.c
| * Drivers: media: remove __dev* attributes.Greg Kroah-Hartman2013-01-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>