Age | Commit message (Collapse) | Author |
|
From: Hans Verkuil <hverkuil@xs4all.nl>
Introduce a struct v4l2_file_operations for v4l2 drivers.
Remove the unnecessary inode argument.
Move compat32 handling (and llseek) into the v4l2-dev core: this is now
handled in the v4l2 core and no longer in the drivers themselves.
Note that this changeset reverts an earlier patch that changed the return
type of__video_ioctl2 from int to long. This change will be reinstated
later in a much improved version.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
sh_mobile_ceu_camera.c is already prepared to support interlaced format, this
patch moves the choice of a field type down to host and / or camera drivers.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
drivers/media/video/pxa_camera.c | 10 ++++++++++
drivers/media/video/soc_camera.c | 19 +------------------
2 files changed, 11 insertions(+), 18 deletions(-)
|
|
From: Kuninori Morimoto <morimoto.kuninori@renesas.com>
This patch presents new method to be able to select V4L2 input type
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
drivers/media/video/soc_camera.c | 17 +++++++++++++----
include/media/soc_camera.h | 1 +
2 files changed, 14 insertions(+), 4 deletions(-)
|
|
From: Kuninori Morimoto <morimoto.kuninori@renesas.com>
This patch presents new method to be able to check v4l2_std_id
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
drivers/media/video/soc_camera.c | 9 ++++++++-
include/media/soc_camera.h | 1 +
2 files changed, 9 insertions(+), 1 deletions(-)
|
|
From: Guennadi Liakhovetski <lg@denx.de>
Move mutex from host drivers to camera device object, take into account
videobuf locking.
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
---
drivers/media/video/pxa_camera.c | 15 ++---
drivers/media/video/sh_mobile_ceu_camera.c | 9 +--
drivers/media/video/soc_camera.c | 99 +++++++++++++++++++++++-----
include/media/soc_camera.h | 8 ++-
4 files changed, 96 insertions(+), 35 deletions(-)
|
|
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Simplify multiple drivers by replacing f->fmt.pix.* with a single pointer
dereference, merge some needlessly broken lines, verify host and camera
operations pointers on registration.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
drivers/media/video/mt9m001.c | 20 ++++----
drivers/media/video/mt9m111.c | 10 ++--
drivers/media/video/mt9v022.c | 20 ++++----
drivers/media/video/pxa_camera.c | 21 +++-----
drivers/media/video/soc_camera.c | 74 +++++++++++++++++------------
drivers/media/video/soc_camera_platform.c | 5 +-
6 files changed, 81 insertions(+), 69 deletions(-)
|
|
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
As reported by Antonio Ospite <ospite@studenti.unina.it> two platforms with a
mt9m111 camera require opposite pixel clock polarity, which means one of them
inverts it. This patch adds support for inversion flags and switches all
available camera drivers to using them.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
drivers/media/video/mt9m001.c | 15 +++++++--------
drivers/media/video/mt9m111.c | 6 +++++-
drivers/media/video/mt9v022.c | 3 +++
drivers/media/video/ov772x.c | 10 +++++-----
drivers/media/video/soc_camera.c | 34 ++++++++++++++++++++++++++++++++++
include/media/soc_camera.h | 11 +++++++++++
6 files changed, 65 insertions(+), 14 deletions(-)
|
|
Allocate and fill a list of formats, supported by this specific
camera-host combination. Use it for format enumeration. Take care to stay
backwards-compatible.
Camera hosts rely on sensor formats available, as well as
host specific translations. We add a structure so that hosts
can define a translation table and use it for format check
and setup.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
drivers/media/video/soc_camera.c | 93 +++++++++++++++++++++++++++++++++-----
include/media/soc_camera.h | 25 ++++++++++-
2 files changed, 105 insertions(+), 13 deletions(-)
|
|
We anyway don't follow the s_fmt_vid_cap / g_fmt_vid_cap / try_fmt_vid_cap
naming, and soc-camera is so far only about video capture, let's simplify
operation names a bit further. set_fmt_cap / try_fmt_cap wasn't a very good
choice too.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
drivers/media/video/mt9m001.c | 14 +++++++-------
drivers/media/video/mt9m111.c | 12 ++++++------
drivers/media/video/mt9v022.c | 14 +++++++-------
drivers/media/video/ov772x.c | 14 +++++++-------
drivers/media/video/pxa_camera.c | 16 ++++++++--------
drivers/media/video/sh_mobile_ceu_camera.c | 16 ++++++++--------
drivers/media/video/soc_camera.c | 6 +++---
drivers/media/video/soc_camera_platform.c | 12 ++++++------
include/media/soc_camera.h | 10 ++++------
9 files changed, 56 insertions(+), 58 deletions(-)
|
|
Pixel format requested by the user is not necessarily the same, as what
a sensor driver provides. There are situations, when a camera host driver
provides the required format, but requires a different format from the
sensor. Further, the list of formats, supported by sensors is pretty static
and can be pretty good described with a constant list of structures. Whereas
decisions, made by camera host drivers to support requested formats can be
quite complex, therefore it is better to let the host driver do the work.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
drivers/media/video/pxa_camera.c | 32 +++++++++++++++-
drivers/media/video/sh_mobile_ceu_camera.c | 32 +++++++++++++++-
drivers/media/video/soc_camera.c | 58 ++++++++++-----------------
include/media/soc_camera.h | 3 +
4 files changed, 87 insertions(+), 38 deletions(-)
|
|
Minor formatting fixes
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
drivers/media/video/soc_camera.c | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
|
|
.try_bus_param() method from struct soc_camera_host_ops is only called at one
location immediately before .try_fmt_cap(), there is no value in keeping these
two methods separate, merge them.
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
---
drivers/media/video/pxa_camera.c | 6 +++++-
drivers/media/video/sh_mobile_ceu_camera.c | 6 +++++-
drivers/media/video/soc_camera.c | 5 -----
include/media/soc_camera.h | 1 -
4 files changed, 10 insertions(+), 8 deletions(-)
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Kay Sievers <kay.sievers@vrfy.org>
This patch is part of a larger patch series which will remove
the "char bus_id[20]" name string from struct device. The device
name is managed in the kobject anyway, and without any size
limitation, and just needlessly copied into "struct device".
To set and read the device name dev_name(dev) and dev_set_name(dev)
must be used. If your code uses static kobjects, which it shouldn't
do, "const char *init_name" can be used to statically provide the
name the registered device should have. At registration time, the
init_name field is cleared, to enforce the use of dev_name(dev) to
access the device name at a later time.
We need to get rid of all occurrences of bus_id in the entire tree
to be able to enable the new interface. Please apply this patch,
and possibly convert any remaining remaining occurrences of bus_id.
We want to submit a patch to -next, which will remove bus_id from
"struct device", to find the remaining pieces to convert, and finally
switch over to the new api, which will remove the 20 bytes array
and does no longer have a size limitation.
Thanks,
Kay
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
Add suspend/resume hooks to call soc operation specific
suspend and resume functions. This ensures the camera
chip has been previously resumed, as well as the camera
bus.
These hooks in camera chip drivers should save/restore
chip context between suspend and resume time.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
drivers/media/video/soc_camera.c | 26 ++++++++++++++++++++++++++
include/media/soc_camera.h | 5 +++++
2 files changed, 31 insertions(+), 0 deletions(-)
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
The type and type2 fields were unused and so could be removed.
Instead add a vfl_type field that contains the type of the video
device.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
All ioctl callbacks are now stored in a new v4l2_ioctl_ops struct. Drivers fill in
a const struct v4l2_ioctl_ops and video_device just contains a const pointer to it.
This ensures a clean separation between the const ops struct and the non-const
video_device struct.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
The functions in a header should not belong to another module. The prio functions
belong to v4l2-common.c, so move them to v4l2-common.h.
The ioctl functions belong to v4l2-ioctl.c, so create a new v4l2-ioctl.h header
and move those functions to it.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
The field 'dev' is not the video device, but the parent of the video device.
Rename accordingly.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
This patch moves the spinlock handling from soc_camera.c to the actual
camera host driver. The spinlock_alloc/free callbacks are replaced with
code in init_videobuf(). So far all camera host drivers implement their
own spinlock_alloc/free methods anyway, and videobuf_queue_core_init()
BUGs on a NULL spinlock argument, so, new camera host drivers will not
forget to provide a spinlock when initialising their videobuf queues.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
---
drivers/media/video/pxa_camera.c | 17 ++++------------
drivers/media/video/soc_camera.c | 39 --------------------------------------
include/media/soc_camera.h | 5 ----
3 files changed, 7 insertions(+), 54 deletions(-)
|
|
Makes SoC camera videobuf independent. Includes all necessary changes for
PXA camera driver (currently the only driver using soc_camera in the mainline).
These changes are important for the future soc_camera based drivers.
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Cc: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
|
|
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Devices can either be class devices or bus devices, not both at the
same time. Soc-camera host devices usually have a platform device as
their parent. Trying to also register them with a class crashes the
kernel, when linked statically. Interestingly, it works when built
as a module. Thanks to Paulius Zaleckas for reporting.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
This obviously redundant return has been in the driver from the very first
version. Remove it.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
|
|
From: Mauro Carvalho Chehab <mchehab@infradead.org>
The proper fix were applied at -git. Re-apply the missing parts with the new
base.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
|
|
> keep those changes on hold, until I get a confirmation that the PXA side is
> committed on mainstream.
Reverted several changes on soc_camera
From: Mauro Carvalho Chehab <mchehab@infradead.org>
As asked by Guennadi:
Mauro, please, drop commits 2f4a87873f13924871d7bb82e27d02d0e16fbe02 and
9b7d577c508e7765860e599c0e98d4ac3fbaa2aa from your tree and replace
5f1e5244ee6b9f139a262d5e7a930a41488afbbe with the version below.
Due to that change, that happened on v4l-dvb -git tree, several patches broke.
This patch reverts all broken stuff, keeping this tree in sync with v4l-dvb
-git tree.
I'm waiting for Guennadi to fix the broken patches and ask me to pull them
again.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
|
|
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
This obviously redundant return has been in the driver from the very first
version. Remove it.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
|
|
From: Harvey Harrison <harvey.harrison@gmail.com>
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
|
|
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
All drivers should provide a spinlock to be used in videobuf operations.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Reviewed-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
|
|
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Function pointers and the driver owner are not expected to change
throughout soc-camera host's life. Extract them into an operations struct.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
|
|
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
In case of muliple cameras, handled by the same driver, they can support
different picture formats, therefore formats and num_formats cannot belong
to soc_camera_ops, which is only one per driver, move them to
soc_camera_device, which is one per device instance. OTOH, probe and
remove methods are always the same, move them to soc_camera_ops.
Thanks to Eric Miao for making me look at this code again:-)
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
|
|
From: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
CC: Guennadi Liakhovetski <kernel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
|
|
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Improve hardware parameter negotiation between the camera host driver and
camera drivers. Parameters like horizontal and vertical synchronisation,
pixel clock polarity shall be set depending on capabilities of the
parties.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
|
|
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Only attach cameras to the host interface for probing, then detach until
open. This allows platforms with several cameras on an interface,
physically supporting only one camera, to handle multiple cameras and
activate them selectively after initial probing. The first attach during
probe is needed to activate the host interface to be able to physically
communicate with cameras.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
|
|
Subject: Convert videobuf-dma-sg to generic DMA API
Date: Tue, 19 Feb 2008 13:40:54 +0100 (CET)
videobuf-dma-sg does not need to depend on PCI. Switch it to using generic
DMA API, convert all affected drivers, relax Kconfig restriction, improve
compile-time type checking, fix some Coding Style violations while at it.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
|
|
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
This driver provides an interface between platform-specific camera
busses and camera devices. It should be used if the camera is connected
not over a "proper" bus like PCI or USB, but over a special bus, like,
for example, the Quick Capture interface on PXA270 SoCs. Later it should
also be used for i.MX31 SoCs from Freescale. It can handle multiple
cameras and / or multiple busses, which can be used, e.g., in
stereo-vision applications.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
|