History log of /linux-master/drivers/media/pci/sta2x11/sta2x11_vip.c
Revision Date Author Comments
# 3de49ae8 13-Feb-2024 Arnd Bergmann <arnd@arndb.de>

media: sta2x11: fix irq handler cast

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]


# d74e3166 07-Feb-2023 Arnd Bergmann <arnd@arndb.de>

gpiolib: remove legacy gpio_export()

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>


# f2d8b691 22-Jan-2022 Sakari Ailus <sakari.ailus@linux.intel.com>

media: v4l: ioctl: Set bus_info in v4l_querycap()

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>


# 6417f031 16-Mar-2021 Leon Romanovsky <leon@kernel.org>

module: remove never implemented MODULE_SUPPORTED_DEVICE

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>


# 11788d9b 13-Jul-2020 Hans Verkuil <hverkuil-cisco@xs4all.nl>

media: media/pci: use vb2_video_unregister_device()

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>


# 2856bbc5 17-Jul-2020 Vaibhav Gupta <vaibhavgupta40@gmail.com>

media: sta2x11: use generic power management

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>


# 3e30a927 02-Feb-2020 Hans Verkuil <hverkuil-cisco@xs4all.nl>

media: media/pci: rename VFL_TYPE_GRABBER to _VIDEO

'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>


# 2169e6da 11-Jun-2019 Hans Verkuil <hverkuil-cisco@xs4all.nl>

media: media/pci: don't set description for ENUM_FMT

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>


# 21615365 17-Jun-2019 Hans Verkuil <hverkuil@xs4all.nl>

media: media/pci: set device_caps in struct video_device

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>


# 1237a75a 29-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 314

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>


# 16790554 18-Feb-2019 Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

media: pci: fix several typos

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>


# cc1e6315 10-Sep-2018 Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

media: replace strcpy() by strscpy()

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>


# 51be5a2b 07-Aug-2018 Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

media: sta2x11: add a missing parameter description

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>


# cd63c028 15-Jun-2018 Ezequiel Garcia <ezequiel@collabora.com>

media: sta2x11: Add video_device and vb2_queue locks

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>


# 0bade8b5 27-Apr-2018 Arvind Yadav <arvind.yadav.cs@gmail.com>

media: sta2x11: Use gpio_is_valid() and remove unnecessary check

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>


# 9ec2b402 29-Nov-2017 Mauro Carvalho Chehab <mchehab@kernel.org>

media: sta2x11: document missing function parameters

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>


# 507e1909 26-Aug-2017 Bhumika Goyal <bhumirks@gmail.com>

media: pci: make video_device const

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>


# 8b6fe20a 21-Jan-2017 Bhumika Goyal <bhumirks@gmail.com>

[media] media: pci: constify vb2_ops structure

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>


# 36c0f8b3 15-Apr-2016 Hans Verkuil <hans.verkuil@cisco.com>

[media] vb2: replace void *alloc_ctxs by struct device *alloc_devs

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>


# 2bc46b3a 14-Feb-2016 Hans Verkuil <hans.verkuil@cisco.com>

[media] media/pci: convert drivers to use the new vb2_queue dev field

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>


# dc962085 25-Apr-2016 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] sta2x11: remove unused vars

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>


# 7b9f31f3 22-Apr-2016 Hans Verkuil <hans.verkuil@cisco.com>

[media] sta2x11_vip: fix s_std

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>


# d6dd645e 03-Nov-2015 Junghak Sung <jh1009.sung@samsung.com>

[media] media: videobuf2: Move timestamp to vb2_buffer

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>


# df9ecb0c 27-Oct-2015 Hans Verkuil <hans.verkuil@cisco.com>

[media] vb2: drop v4l2_format argument from queue_setup

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>


# 33119e80 06-Oct-2015 Junghak Sung <jh1009.sung@samsung.com>

[media] media: videobuf2: Change queue_setup argument

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>


# 2d700715 22-Sep-2015 Junghak Sung <jh1009.sung@samsung.com>

[media] media: videobuf2: Restructure vb2_buffer

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>


# b59b100c 07-May-2015 Hans Verkuil <hverkuil@xs4all.nl>

[media] sta2x11: use monotonic timestamp

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>


# 4db4ca74 09-Mar-2015 Hans Verkuil <hans.verkuil@cisco.com>

[media] sta2x11: embed video_device

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>


# 87f4ebcd 24-Sep-2014 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] sta2x11_vip: fix address space casting

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>


# d52e2381 27-May-2014 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

[media] v4l: Support extending the v4l2_pix_format structure

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>


# 95cd5d5e 19-Jun-2014 Ramakrishnan Muthukrishnan <ramakrmu@cisco.com>

[media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIO

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>


# 8774bed9 28-Apr-2014 Laurent Pinchart <laurent.pinchart@ideasonboard.com>

[media] v4l: subdev: Move [gs]_std operation to video ops

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>


# e37559b2 16-Apr-2014 Hans Verkuil <hans.verkuil@cisco.com>

[media] vb2: stop_streaming should return void

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>


# 9c0863b1 04-Mar-2014 Hans Verkuil <hans.verkuil@cisco.com>

[media] vb2: call buf_finish from __queue_cancel

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>


# 06470642 04-Mar-2014 Hans Verkuil <hans.verkuil@cisco.com>

[media] vb2: change result code of buf_finish to void

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>


# f1b84d36 02-Dec-2013 Jingoo Han <jg1.han@samsung.com>

[media] media: pci: remove DEFINE_PCI_DEVICE_TABLE macro

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>


# d017650b 13-May-2013 Wei Yongjun <yongjun_wei@trendmicro.com.cn>

[media] sta2x11_vip: fix error return code in sta2x11_vip_init_one()

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>


# 314527ac 15-Mar-2013 Hans Verkuil <hans.verkuil@cisco.com>

[media] v4l2: pass std by value to the write-only s_std ioctl

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>


# 8dc97ea2 05-Feb-2013 Federico Vaga <federico.vaga@gmail.com>

[media] sta2x11_vip: convert to videobuf2, control framework, file handler

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>


# 4c62e976 21-Dec-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Drivers: media: remove __dev* attributes.

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>


# 8e6057b5 15-Sep-2012 Sakari Ailus <sakari.ailus@linux.intel.com>

[media] v4l: Convert drivers to use monotonic timestamps

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>


# e5cdf69d 14-Aug-2012 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] move the remaining PCI devices to drivers/media/pci

Move meye and sta2x11_vip into the drivers/media/pci subdirs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>