summaryrefslogtreecommitdiff
path: root/drivers/media/pci/sta2x11/sta2x11_vip.c
AgeCommit message (Collapse)Author
2024-02-16media: sta2x11: fix irq handler castArnd Bergmann
clang-16 warns about casting incompatible function pointers: drivers/media/pci/sta2x11/sta2x11_vip.c:1057:6: error: cast from 'irqreturn_t (*)(int, struct sta2x11_vip *)' (aka 'enum irqreturn (*)(int, struct sta2x11_vip *)') to 'irq_handler_t' (aka 'enum irqreturn (*)(int, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] Change the prototype of the irq handler to the regular version with a local variable to adjust the argument type. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil: update argument documentation]
2023-03-06gpiolib: remove legacy gpio_export()Arnd Bergmann
There are only a handful of users of gpio_export() and related functions. As these are just wrappers around the modern gpiod_export() helper, remove the wrappers and open-code the gpio_to_desc in all callers to shrink the legacy API. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2022-04-24media: v4l: ioctl: Set bus_info in v4l_querycap()Sakari Ailus
The bus_info field is set by most drivers based on the type of the device bus as well as the name of the device. Do this in v4l_querycap() so drivers don't need to. This keeps compatibility with non-default and silly bus_info. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2021-03-17module: remove never implemented MODULE_SUPPORTED_DEVICELeon Romanovsky
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>
2020-08-28media: media/pci: use vb2_video_unregister_device()Hans Verkuil
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>
2020-07-19media: sta2x11: use generic power managementVaibhav Gupta
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>
2020-02-24media: media/pci: rename VFL_TYPE_GRABBER to _VIDEOHans Verkuil
'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>
2019-07-22media: media/pci: don't set description for ENUM_FMTHans Verkuil
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>
2019-06-24media: media/pci: set device_caps in struct video_deviceHans Verkuil
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>
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 314Thomas Gleixner
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>
2019-03-01media: pci: fix several typosMauro Carvalho Chehab
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-09-11media: replace strcpy() by strscpy()Mauro Carvalho Chehab
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>
2018-08-07media: sta2x11: add a missing parameter descriptionMauro Carvalho Chehab
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>
2018-07-04media: sta2x11: Add video_device and vb2_queue locksEzequiel Garcia
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>
2018-05-09media: sta2x11: Use gpio_is_valid() and remove unnecessary checkArvind Yadav
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>
2017-11-30media: sta2x11: document missing function parametersMauro Carvalho Chehab
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>
2017-08-27media: pci: make video_device constBhumika Goyal
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>
2017-02-03[media] media: pci: constify vb2_ops structureBhumika Goyal
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>
2016-07-08[media] vb2: replace void *alloc_ctxs by struct device *alloc_devsHans Verkuil
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 Verkuil
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-25[media] sta2x11: remove unused varsMauro Carvalho Chehab
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>
2016-04-25[media] sta2x11_vip: fix s_stdHans Verkuil
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>
2015-12-18[media] media: videobuf2: Move timestamp to vb2_bufferJunghak Sung
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 Verkuil
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-10-20[media] media: videobuf2: Change queue_setup argumentJunghak Sung
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 Sung
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-05-18[media] sta2x11: use monotonic timestampHans Verkuil
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>
2015-04-02[media] sta2x11: embed video_deviceHans Verkuil
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>
2014-09-26[media] sta2x11_vip: fix address space castingMauro Carvalho Chehab
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>
2014-07-17[media] v4l: Support extending the v4l2_pix_format structureLaurent Pinchart
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>
2014-07-04[media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIORamakrishnan Muthukrishnan
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>
2014-05-24[media] v4l: subdev: Move [gs]_std operation to video opsLaurent Pinchart
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>
2014-04-23[media] vb2: stop_streaming should return voidHans Verkuil
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>
2014-03-11[media] vb2: call buf_finish from __queue_cancelHans Verkuil
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>
2014-03-11[media] vb2: change result code of buf_finish to voidHans Verkuil
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>
2013-12-10[media] media: pci: remove DEFINE_PCI_DEVICE_TABLE macroJingoo Han
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>
2013-05-27[media] sta2x11_vip: fix error return code in sta2x11_vip_init_one()Wei Yongjun
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>
2013-03-24[media] v4l2: pass std by value to the write-only s_std ioctlHans Verkuil
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>
2013-02-06[media] sta2x11_vip: convert to videobuf2, control framework, file handlerFederico Vaga
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>
2013-01-24Merge branch 'v4l_for_linus' into staging/for_v3.9Mauro Carvalho Chehab
* 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
2013-01-03Drivers: media: remove __dev* attributes.Greg Kroah-Hartman
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>
2012-12-21[media] v4l: Convert drivers to use monotonic timestampsSakari Ailus
Convert drivers using wall clock time (CLOCK_REALTIME) to timestamp from the monotonic timer (CLOCK_MONOTONIC). Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] move the remaining PCI devices to drivers/media/pciMauro Carvalho Chehab
Move meye and sta2x11_vip into the drivers/media/pci subdirs. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>