History log of /drivers/media/video/pxa_camera.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
91acd962301af86d5af02ddefdb8147322a0b9b0 15-Mar-2012 Philipp Zabel <philipp.zabel@gmail.com> [media] V4L: pxa_camera: add clk_prepare/clk_unprepare calls

This patch adds clk_prepare/clk_unprepare calls to the pxa_camera
driver by using the helper functions clk_prepare_enable and
clk_disable_unprepare.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
1d6629b1561ad34a6e6d17ece00bd65e1bab3724 10-Jan-2012 Axel Lin <axel.lin@gmail.com> [media] convert drivers/media/* to use module_platform_driver()

This patch converts the drivers in drivers/media/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: "Richard Röjfors" <richard.rojfors@pelagicore.com>
Cc: "Matti J. Aaltonen" <matti.j.aaltonen@nokia.com>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: Manjunath Hadli <manjunath.hadli@ti.com>
Cc: Muralidharan Karicheri <m-karicheri2@ti.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Daniel Drake <dsd@laptop.org>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
8843d119eaf1a7a87a2cf8c3eadbd1937b16bc27 21-Sep-2011 Guennadi Liakhovetski <g.liakhovetski@gmx.de> [media] soc-camera: remove redundant parameter from .set_bus_param()

The "pixfmt" parameter of the struct soc_camera_host_ops::set_bus_param()
method is redundant, because at the time, when this method is called,
pixfmt is guaranteed to be equal to icd->current_fmt->host_fmt->fourcc.
Remove this parameter and update all drivers accordingly.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
679419aa6e2590d561a8c1df3858d6b284c5cc58 27-Jul-2011 Guennadi Liakhovetski <g.liakhovetski@gmx.de> [media] V4L: pxa_camera: convert to the new mbus-config subdev operations

Switch from soc-camera specific .{query,set}_bus_param() to V4L2
subdevice .[gs]_mbus_config() operations.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
7dfff95366f48bf66f77c17cdc9ebd8be696ac5d 16-Jul-2011 Guennadi Liakhovetski <g.liakhovetski@gmx.de> [media] V4L: soc-camera: remove soc-camera bus and devices on it

Now that v4l2 subdevices have got their own device objects, having
one more device in soc-camera clients became redundant and confusing.
This patch removes those devices and the soc-camera bus, they used to
reside on.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
7254026cedd42d75009f8a7f2999045007dd444e 29-Jun-2011 Guennadi Liakhovetski <g.liakhovetski@gmx.de> [media] V4L: pxa-camera: switch to using standard PM hooks

The pxa-camera driver doesn't need soc-camera specific PM callbacks,
switch it to using the standard PM hooks instead.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
497833c6813dde5ca27cc94e28c973d601d601e1 07-Jun-2011 Guennadi Liakhovetski <g.liakhovetski@gmx.de> [media] V4L: pxa-camera: switch to using subdev .s_power() core operation

soc-camera specific .suspend() and .resume() methods are deprecated
and should be replaced by the subdev standard .s_power() operation.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
91401219c073a565af79223215a84250bbc8c79e 07-Jun-2011 Guennadi Liakhovetski <g.liakhovetski@gmx.de> [media] V4L: pxa-camera: try to force progressive video format

The pxa-camera driver only supports progressive video so far. Passing
down to the client the same format, as what the user has requested can
result in interlaced video, even if the client supports both. This
patch avoids such cases.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
a5c1cee0e63da3ed7d8bdbf85f11e4895051d890 07-Jun-2011 Guennadi Liakhovetski <g.liakhovetski@gmx.de> [media] V4L: pxa_camera: remove redundant calculations

soc_camera core now performs the standard .bytesperline and .sizeimage
calculations internally, no need to duplicate in drivers.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
64dc3c1a906467d90c24913b0b38dd13d9378f4f 25-Jun-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] Stop using linux/version.h on the remaining video drivers

Standardize the remaining video drivers to return the API version
for the VIDIOC_QUERYCAP version, instead of a per-driver version.

Those drivers had the version updated more recently or are SoC
drivers. Even so, it doesn't sound a good idea to keep a per-driver
version control, so, let's use the per-subsystem version control
instead.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
d2dcad49bc346054b49bd40fd96f397fec695a0f 18-May-2011 Guennadi Liakhovetski <g.liakhovetski@gmx.de> [media] V4L: soc-camera: a missing mediabus code -> fourcc translation is not critical

soc_mbus_get_fmtdesc() returning NULL means only, that no standard
mediabus code -> fourcc conversion is known, this shouldn't be treated
as an error by drivers.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
25985edcedea6396277003854657b5f3cb31a628 31-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi> Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
/drivers/media/video/pxa_camera.c
b6a633c18ba83c0c8e96759a31d356bfb77e2b5f 25-Dec-2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de> [media] v4l: soc-camera: switch to .unlocked_ioctl

Use the V4L mutex infrastructure in soc-camera core and drivers and switch to
.unlocked_ioctl.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
e3cfd447d01cf723ccda0ad6bfa2e85b73d3d747 30-Sep-2010 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB: videobuf: add ext_lock argument to the queue init functions (part 2)

Missed a few init functions on non-Intel platforms the first time :-(

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
57bee29d6e8cf721864fa47a18366bee5ff24f21 17-Aug-2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB: soc-camera: allow only one video queue per device

Multiple user-space application instances can open the same video device, but
it only makes sense for one of them to manage the videobuffer queue and set
video format of the device. Restrict soc-camera respectively.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
0e0809a58869e3e422985f868ad5e0da1fc0ba85 26-Sep-2010 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB: videobuf: add queue argument to videobuf_waiton()

videobuf_waiton() must unlock and relock ext_lock if it has to wait.
For that to happen it needs the videobuf_queue pointer.

Don't attempt to unlock/relock q->ext_lock unless it was locked in the
first place.

vb->state has to be protected by a spinlock to be safe.

This patch is based on code from Mauro Carvalho Chehab <mchehab@redhat.com>.

[mchehab@redhat.com: add extra argument to a few missing places]
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
ace6e9799f585994c92ac3c0696bc336e50077e6 22-Jul-2010 Guennadi Liakhovetski <lyakh@axis700.grange> V4L/DVB: mediabus: fix ambiguous pixel code names

Endianness notation is meaningless for 8 bit YUYV codes. Switch pixel code
names to explicitly state the order of colour components in the data
stream.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
952684035a91334dbe33b15063514cab5e7c6907 11-May-2010 Laurent Pinchart <laurent.pinchart@ideasonboard.com> V4L/DVB: videobuf: Remove the videobuf_sg_dma_map/unmap functions

Instead of creating dirty wrappers around videobuf_dma_map/unmap that
create a dummy videobuf_queue structure, modify videobuf_dma_map/unmap
to take a device pointer argument and use it directly. The
videobuf_sg_dma_map/unmap then become unused and can be removed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
3805f201934e5384f6e941222dc1968cb638a88c 08-May-2010 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB: v4l2-subdev.h: fix enum_mbus_fmt prototype

enum_mbus_fmt received an index argument that was defined as an int instead
of an unsigned int. This is now fixed. This had the knock-on effect that the
index argument in the callback get_formats in soc_camera.h also had to be
changed to unsigned int.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
dab7e3106ddd6cbc3b55301228407b9d17ce7773 21-Mar-2010 Andreas Bombe <aeb@debian.org> V4L/DVB: V4L2: Replace loops for finding max buffers in VIDIOC_REQBUFS callbacks

Due to obvious copy and paste coding a number of video capture drivers
which implement a limit on the buffer memory decremented the user
supplied buffer count in a while loop until it reaches an acceptable
value.

This is a silly thing to do when the maximum value can be directly
computed.

Signed-off-by: Andreas Bombe <aeb@debian.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
a47f6be45670465d45a3d27f7ff71986bd35d6c4 20-Apr-2010 Stefan Herbrechtsmeier <hbmeier@hni.uni-paderborn.de> V4L/DVB: pxa_camera: move fifo reset direct before dma start

Move the fifo reset from pxa_camera_start_capture to pxa_camera_irq direct
before the dma start after an end of frame interrupt to prevent images from
shifting because of old data at the begin of the frame.

Signed-off-by: Stefan Herbrechtsmeier <hbmeier@hni.uni-paderborn.de>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Tested-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
/drivers/media/video/pxa_camera.c
6b727c68ea7083acd008da7c9734a19a4cdd52dc 17-Nov-2009 Antonio Ospite <ospite@studenti.unina.it> pxa_camera: remove init() callback

pxa_camera init() callback is sometimes abused to setup MFP for PXA CIF, or
even to request GPIOs to be used by the camera *sensor*. These initializations
can be performed statically in machine init functions.

The current semantics for this init() callback is ambiguous anyways, it is
invoked in pxa_camera_activate(), hence at device node open, but its users use
it like a generic initialization to be done at module init time (configure
MFP, request GPIOs for *sensor* control).

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
760697beca338599a65484389c7abbe54aedb664 11-Dec-2009 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (13659): soc-camera: convert to the new mediabus API

Convert soc-camera core and all soc-camera drivers to the new mediabus
API. This also takes soc-camera client drivers one step closer to also be
usable with generic v4l2-subdev host drivers.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
5d28d525452f170e30bc038955439731462a5228 11-Dec-2009 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (13645): soc-camera: fix multi-line comment coding style

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
325361088b73269f4cc96256276a142addbf3454 11-Dec-2009 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (13644): v4l: add new v4l2-subdev sensor operations, use g_skip_top_lines in soc-camera

Introduce new v4l2-subdev sensor operations, move .enum_framesizes() and
.enum_frameintervals() methods to it, add a new .g_skip_top_lines() method
and switch soc-camera to use it instead of .y_skip_top soc_camera_device
member, which can now be removed.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
d514edac5df2149207f1ae2f52de63882c692eec 04-Nov-2009 Jonathan Cameron <jic23@cam.ac.uk> V4L/DVB (13286): pxa-camera: Fix missing sched.h

Required for wakeup call.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
07bc46e6671b4533a5e56607ddec9de9079c1844 05-Oct-2009 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (13131): pxa_camera: fix camera pixel format configuration

A missed conversion prevents correct pixel format negotiation with client
drivers.

Reported-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
96c75399544838e1752001c8abdde36dd459cf8f 25-Aug-2009 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (12536): soc-camera: remove .gain and .exposure struct soc_camera_device members

This makes the soc-camera interface for V4L2 subdevices thinner yet. Handle
gain and exposure internally in each driver just like all other controls.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
6a6c8786725c0b3d143674effa8b772f47b1c189 25-Aug-2009 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (12534): soc-camera: V4L2 API compliant scaling (S_FMT) and cropping (S_CROP)

The initial soc-camera scaling and cropping implementation turned out to be
incompliant with the V4L2 API, e.g., it expected the user to specify cropping
in output window pixels, instead of input window pixels. This patch converts
the soc-camera core and all drivers to comply with the standard.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
0166b74374cae3fa8bff0caef726a3d960a9a50a 25-Aug-2009 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (12533): soc-camera: Use video device object for output in host drivers

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
c9c1f1c0dbe90b82939917fdc3e4c9ccad42342d 25-Aug-2009 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (12530): soc-camera: switch to using v4l2_subdev_call()

Use v4l2_subdev_call() instead of v4l2_device_call_until_err() in all host
drivers and in soc-camera core.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
08590b9613f7f624fe3a052586eea2dbb3584b38 25-Aug-2009 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (12529): soc-camera: switch to s_crop v4l2-subdev video operation

Remove set_crop soc-camera device method and switch to s_crop from v4l2-subdev
video operations. Also extend non-i2c drivers to also hold a pointer to their
v4l2-subdev instance in control device driver-data, i.e., in
dev_get_drvdata((struct device *)to_soc_camera_control(icd))

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
a0705b07f1816ae2b85388fcda71de69c221b4b8 25-Aug-2009 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (12515): soc-camera: use struct v4l2_rect in struct soc_camera_device

Switch to using struct v4l2_rect in struct soc_camera_device for uniformity and
simplicity.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
979ea1ddf80ac7383acdea03471355ca62702539 25-Aug-2009 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (12510): soc-camera: (partially) convert to v4l2-(sub)dev API

Convert the soc-camera framework to use the v4l2-(sub)dev API. Start using
v4l2-subdev operations. Only a part of the interface between the
soc_camera core, soc_camera host drivers on one side and soc_camera device
drivers on the other side is replaced so far. The rest of the interface
will be replaced in incremental steps, and will require extensions and,
possibly, modifications to the v4l2-subdev code.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
40e2e0927003424c25807b575dd40da2b8685857 25-Aug-2009 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (12506): soc-camera: convert to platform device

Convert soc-camera core and all drivers to platform device API. We already
converted platforms to register a platform device for each soc-camera client,
now we remove the compatibility code and switch completely to the new scheme.
This is a preparatory step for the v4l2-subdev conversion.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
2dd54a54c19d0e5b50f4e1c591653772ead9d4a1 06-Aug-2009 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (12424): soc-camera: fix recursive locking in .buf_queue()

The .buf_queue() V4L2 driver method is called under
spinlock_irqsave(q->irqlock,...), don't take the lock again inside the
function.

Reported-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
5b766182a110311fbf618f736bc8a8f2f7ce3f4c 22-Jul-2009 Antonio Ospite <ospite@studenti.unina.it> V4L/DVB (12330): pxa_camera: Fix Oops in pxa_camera_probe

mclk_get_divisor uses pcdev->soc_host.dev, make sure it is initialized.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
4a6b8df2133c1f218a503e0432a9e6cc3d461a30 31-May-2009 Trent Piepho <xyzzy@speakeasy.org> V4L/DVB (11902): pxa-camera: Use v4l bounding/alignment function

The v4l function has a better algorithm for aligning image size.

For instance the old code would change 159x243 into 156x240 to meet the
alignment requirements. The new function will use 160x243, which is a lot
closer to what was asked for originally.

Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
e36bc31f823d6089bedc935fea82b6d36793412a 04-Jun-2009 Jean Delvare <khali@linux-fr.org> V4L/DVB (11992): Add missing __devexit_p()

Add missing __devexit_p() to several drivers. Also add a few missing
__init, __devinit and __exit markers. These errors could result in
build failures depending on the kernel configuration.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
eff505fa1511b753b7cfb397a754b8ff4367cd55 24-Apr-2009 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (11609): soc-camera: remove an extra device generation from struct soc_camera_host

Make camera devices direct children of host platform devices, move the
inheritance management into the soc_camera.c core driver.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
eb6c8558f7658b7f31ee022c7bea1d840eda33dc 24-Apr-2009 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (11608): soc-camera: host-driver cleanup

Embed struct soc_camera_host in platform-specific per host instance objects
instead of allocating them statically in drivers, use platform_[gs]et_drvdata
consistently, use resource_size().

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
ae7410e712b33d32337df80f71f702d12a8ebb81 31-Mar-2009 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (11323): pxa-camera: simplify the .buf_queue path by merging two loops

pxa_dma_update_sg_tail() is called only once, runs exactly the same loop as the
caller and has to recalculate the last element in an sg-list, that the caller
has already calculated. Eliminate redundancy by merging the two loops and
re-using the calculated pointer. This also saves a bit of performance which is
always good during video-capture.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
8c62e221c71a0240f16ea8aa29609f93a68c2ff9 31-Mar-2009 Robert Jarzmik <robert.jarzmik@free.fr> V4L/DVB (11322): pxa_camera: Fix overrun condition on last buffer

The last buffer queued will often overrun, as the DMA chain
is finished, and the time the dma irq handler is activated,
the QCI fifos are filled by the sensor.

The fix is to ignore the overrun condition on the last
queued buffer, and restart the capture only on intermediate
buffers of the chain.

Moreover, a fix was added to the very unlikely condition
where in YUV422P mode, one channel overruns while another
completes at the very same time. The capture is restarted
after the overrun as before, but the other channel
completion is now ignored.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
256b02332a0ba1d7382d736d776e605be63ded17 31-Mar-2009 Robert Jarzmik <robert.jarzmik@free.fr> V4L/DVB (11321): pxa_camera: Redesign DMA handling

The DMA transfers in pxa_camera showed some weaknesses in
multiple queued buffers context :
- poll/select problem
The bug shows up with capture_example tool from v4l2 hg
tree. The process just "stalls" on a "select timeout".

- multiple buffers DMA starting
When multiple buffers were queued, the DMA channels were
always started right away. This is not optimal, as a
special case appears when the first EOF was not yet
reached, and the DMA channels were prematurely started.

- Maintainability
DMA code was a bit obfuscated. Rationalize the code to be
easily maintainable by anyone.

- DMA hot chaining
DMA is not stopped anymore to queue a buffer, the buffer
is queued with DMA running. As a tribute, a corner case
exists where chaining happens while DMA finishes the
chain, and the capture is restarted to deal with the
missed link buffer.

This patch attemps to address these issues / improvements.

create mode 100644 Documentation/video4linux/pxa_camera.txt

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
37f5aefd537d5f98b3fa9726362effeccf1d2161 31-Mar-2009 Robert Jarzmik <robert.jarzmik@free.fr> V4L/DVB (11320): pxa_camera: Remove YUV planar formats hole

All planes were PAGE aligned (ie. 4096 bytes aligned). This
is not consistent with YUV422 format, which requires Y, U
and V planes glued together. The new implementation forces
the alignement on 8 bytes (DMA requirement), which is almost
always the case (granted by width x height being a multiple
of 8).

The test cases include tests in both YUV422 and RGB565 :
- a picture of size 111 x 111 (cross RAM pages example)
- a picture of size 1023 x 4 in (under 1 RAM page)
- a picture of size 1024 x 4 in (exactly 1 RAM page)
- a picture of size 1025 x 4 in (over 1 RAM page)
- a picture of size 1280 x 1024 (many RAM pages)

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
92a8337b380f0978ac81f096d6324d3ad689f83e 31-Mar-2009 Robert Jarzmik <robert.jarzmik@free.fr> V4L/DVB (11319): pxa_camera: Enforce YUV422P frame sizes to be 16 multiples

Due to DMA constraints, the DMA chain always transfers bytes
from the QCI fifos to memory in 8 bytes units. In planar
formats, that could mean 0 padding between Y and U plane
(and between U and V plane), which is against YUV422P
standard.

Therefore, a frame size is required to be a multiple of 16
(so U plane size is a multiple of 8). It is enforced in
try_fmt() and set_fmt() primitives, be aligning height then
width on 4 multiples as need be, to reach a 16 multiple.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
09e231b35173313cd92e27532e5028f2042dcee4 13-Mar-2009 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (11024): soc-camera: separate S_FMT and S_CROP operations

As host and camera drivers become more complex, differences between S_FMT and
S_CROP functionality grow, this patch separates them.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
2d9329f3a551b50350a15d19edd9ab3df6c6bad0 23-Feb-2009 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (10665): soc-camera: add data signal polarity flags to drivers

All soc-camera camera and host drivers must specify supported data signal
polarity, after all drivers are fixed, we'll add a suitable test to
soc_camera_bus_param_compatible().

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
97fb44eb6bc01f4ffed4300e475aa15e44877375 13-Mar-2009 Russell King <rmk@dyn-67.arm.linux.org.uk> Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel

Conflicts:

arch/arm/mach-at91/gpio.c
7ebc8d56f407184a457dd5fc739cf39e423a25aa 02-Jan-2009 Eric Miao <eric.miao@marvell.com> [ARM] pxa: move DMA registers definitions into <mach/dma.h>

1. Driver code where pxa_request_dma() is called will most likely
reference DMA registers as well, and it is really unnecessary
to include pxa-regs.h just for this. Move the definitions into
<mach/dma.h> and make relevant drivers include it instead of
<mach/pxa-regs.h>.

2. Introduce DMAC_REGS_VIRT as the virtual address base for these
DMA registers. This allows later processors to re-use the same
IP while registers may start at different I/O address.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
/drivers/media/video/pxa_camera.c
0ad675eb4533402fd7b03b25d1d4a0ab7a43ae6d 23-Feb-2009 Guennadi Liakhovetski <lyakh@axis700.grange> V4L/DVB (10663): soc-camera: fix S_CROP breakage on PXA and SuperH

Recent format-negotiation patches caused S_CROP breakage in pxa_camera.c
and sh_mobile_ceu_camera.c drivers, fix it.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
cfbaf4dfe765ae33e1a26b3eb0eda64ff00fc481 02-Jan-2009 Eric Miao <eric.y.miao@gmail.com> V4L/DVB (10176b): pxa-camera: fix redefinition warnings and missing DMA definitions

1. now pxa_camera.c uses ioremap() for register access, pxa_camera.h is
totally useless. Remove it.

2. <asm/dma.h> does no longer include <mach/dma.h>, include the latter
file explicitly

delete mode 100644 drivers/media/video/pxa_camera.h

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
f54a6ec0fd85002d94d05b4bb679508eeb066683 31-Dec-2008 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (583 commits)
V4L/DVB (10130): use USB API functions rather than constants
V4L/DVB (10129): dvb: remove deprecated use of RW_LOCK_UNLOCKED in frontends
V4L/DVB (10128): modify V4L documentation to be a valid XHTML
V4L/DVB (10127): stv06xx: Avoid having y unitialized
V4L/DVB (10125): em28xx: Don't do AC97 vendor detection for i2s audio devices
V4L/DVB (10124): em28xx: expand output formats available
V4L/DVB (10123): em28xx: fix reversed definitions of I2S audio modes
V4L/DVB (10122): em28xx: don't load em28xx-alsa for em2870 based devices
V4L/DVB (10121): em28xx: remove worthless Pinnacle PCTV HD Mini 80e device profile
V4L/DVB (10120): em28xx: remove redundant Pinnacle Dazzle DVC 100 profile
V4L/DVB (10119): em28xx: fix corrupted XCLK value
V4L/DVB (10118): zoran: fix warning for a variable not used
V4L/DVB (10116): af9013: Fix gcc false warnings
V4L/DVB (10111a): usbvideo.h: remove an useless blank line
V4L/DVB (10111): quickcam_messenger.c: fix a warning
V4L/DVB (10110): v4l2-ioctl: Fix warnings when using .unlocked_ioctl = __video_ioctl2
V4L/DVB (10109): anysee: Fix usage of an unitialized function
V4L/DVB (10104): uvcvideo: Add support for video output devices
V4L/DVB (10102): uvcvideo: Ignore interrupt endpoint for built-in iSight webcams.
V4L/DVB (10101): uvcvideo: Fix bulk URB processing when the header is erroneous
...
06daa1af4d207e93c9a8a3e54adef8635ba81c94 18-Dec-2008 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (10090): soc-camera: let drivers decide upon supported field values

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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
1c3bb7431d16f7486a8523d54380bad89c485dc8 18-Dec-2008 Guennadi Liakhovetski <lg@denx.de> V4L/DVB (10083): soc-camera: unify locking, play nicer with videobuf locking

Move mutex from host drivers to camera device object, take into account
videobuf locking.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
bf507158eb27ea94aca300b28ecee60fdbb40007 18-Dec-2008 Guennadi Liakhovetski <lg@denx.de> V4L/DVB (10081): pxa-camera: call try_fmt() camera device method with correct pixel format

With the introduction of the format conversion support in soc-camera, we now
also have to take care to pass the correct pixel format to the camera driver
when calling its try_fmt() method.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
64f5905ee74906643e22657bd20e2f11443053f0 18-Dec-2008 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (10080): soc-camera: readability improvements, more strict operations checks

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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
cf34cba78d0e0a7244bd7f11addb4d971293fb30 18-Dec-2008 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (10075): pxa-camera: setup the FIFO inactivity time-out register

Using PXA270's FIFO inactivity time-out register (CITOR) reduces FIFO overruns.
The time-out is calculated in CICLK / LCDCLK ticks and has to be longer than
one pixel time. For this we have to know the pixel clock frequency, which
usually is provided by the camera. We use the struct soc_camera_sense to
request PCLK frequency from the camera driver upon each data format change.

Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
5ca11fa3e0025864df930d6d97470b87c35919ed 18-Dec-2008 Eric Miao <eric.miao@marvell.com> V4L/DVB: pxa-camera: use memory mapped IO access for camera (QCI) registers

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
2a48fc739df213b8f98b4effd95ce5ec93bca3da 01-Dec-2008 Robert Jarzmik <robert.jarzmik@free.fr> V4L/DVB (9791): pxa-camera: pixel format negotiation

Use the new format-negotiation infrastructure, support all four YUV422
packed and the planar formats.

The new translation structure enables to build the format
list with buswidth, depth, host format and camera format
checked, so that it's not done anymore on try_fmt nor
set_fmt.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
d8fac217c58f0101a351b9c8c80f1665bd9efef9 01-Dec-2008 Guennadi Liakhovetski <lyakh@axis700.grange> V4L/DVB (9788): soc-camera: simplify naming

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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
25c4d74ea6f07f2aaa3df537619680ba967043f5 01-Dec-2008 Guennadi Liakhovetski <lyakh@axis700.grange> V4L/DVB (9787): soc-camera: let camera host drivers decide upon pixel format

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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
a2c8c68cca3dbb0c87f5034ab8ea29350174ec4a 01-Dec-2008 Guennadi Liakhovetski <lyakh@axis700.grange> V4L/DVB (9785): soc-camera: merge .try_bus_param() into .try_fmt_cap()

.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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
c5b84b3bb0c055d70dc9f1b5e900378bc9d059ea 02-Dec-2008 Russell King <rmk@dyn-67.arm.linux.org.uk> Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel

Conflicts:

arch/arm/mach-pxa/pxa25x.c
013132cae84a36df8a88773a3e0391700d0a66d4 28-Nov-2008 Eric Miao <eric.miao@marvell.com> [ARM] pxa: move camera (QCI) registers definition out of pxa-regs.h

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
/drivers/media/video/pxa_camera.c
e0d8b13ae1e3ea747620580b6f777992148de182 11-Nov-2008 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] pxa: don't pass a consumer clock name for devices with unique clocks

Where devices only have one consumer, passing a consumer clock ID
has no real benefit. Remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/media/video/pxa_camera.c
de3e3b82a6d15264798d4e36f42abaa69f53ca06 18-Sep-2008 roel kluin <roel.kluin@gmail.com> V4L/DVB: pxa-camera: Unsigned dma_chans[] cannot be negative

Unsigned dma_chans[] cannot be negative

Also the third time dma_chans[0] < 0 was tested instead of dma_chans[2]

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
81034663159f39d005316b5c139038459cd16721 14-Aug-2008 Stefan Herbrechtsmeier <hbmeier@hni.uni-paderborn.de> V4L/DVB (8687): soc-camera: Move .power and .reset from soc_camera host to sensor driver

Make .power and .reset callbacks per camera instead of per host, also move
their invocation to camera drivers.

.arch/arm/mach-pxa/include/mach/camera.h | 2 -

Signed-off-by: Stefan Herbrechtsmeier <hbmeier@hni.uni-paderborn.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/pxa_camera.c
87f3dd77974cba1ba0798abd741ede50f56b3eb3 08-Sep-2008 Eric Miao <eric.miao@marvell.com> [ARM] pxa: simplify DMA register definitions

1. DRCMRxx is no longer recommended, use DRCMR(xx) instead, and
pass DRCMR index by "struct resource" if possible

2. DCSRxx, DDADRxx, DSADRxx, DTADRxx, DCMDxx is never used, use
DCSR(), DDADR(), DSADR(), DTADR(), DCMD() instead

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/media/video/pxa_camera.c
097d9eb537ff4d88b74c3fe67392e27c478ca3c5 08-Aug-2008 Russell King <rmk@dyn-67.arm.linux.org.uk> Merge Linus' latest into master

Conflicts:

drivers/watchdog/at91rm9200_wdt.c
drivers/watchdog/davinci_wdt.c
drivers/watchdog/ep93xx_wdt.c
drivers/watchdog/ixp2000_wdt.c
drivers/watchdog/ixp4xx_wdt.c
drivers/watchdog/ks8695_wdt.c
drivers/watchdog/omap_wdt.c
drivers/watchdog/pnx4008_wdt.c
drivers/watchdog/sa1100_wdt.c
drivers/watchdog/wdt285.c
a09e64fbc0094e3073dbb09c3b4bfe4ab669244b 05-Aug-2008 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach

This just leaves include/asm-arm/plat-* to deal with.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/drivers/media/video/pxa_camera.c
3f6ac497b036533d1a63ba04fdbe710c55e14cda 02-Aug-2008 Robert Jarzmik <robert.jarzmik@free.fr> V4L/DVB (8611): Add suspend/resume to pxa_camera driver

PXA suspend switches off DMA core, which loses all context
of previously assigned descriptors. As pxa_camera driver
relies on DMA transfers, setup the lost descriptors on
resume and retrigger frame acquisition if needed.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/pxa_camera.c
01c1e4ca8ec39d21be0cd9d1b300d479de97298a 02-Aug-2008 Paul Mundt <lethal@linux-sh.org> V4L/DVB (8609): media: Clean up platform_driver_unregister() bogosity.

So, platform_driver_unregister() doesn't actually have a return value,
nor do any of the void __exit routines. It's reassuring to know that
people copy and paste blindly. This completely blew up my compiler.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/pxa_camera.c
a034d1b76b173b37f9a3646aa8f50a2c14a0f3ea 12-Jul-2008 Magnus Damm <magnus.damm@gmail.com> V4L/DVB (8338): soc_camera: Move spinlocks

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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/pxa_camera.c
092d3921195c4553a1818e698cee7a281ab361f4 12-Jul-2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> V4L/DVB (8337): soc_camera: make videobuf independent

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>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/pxa_camera.c
02da465945ae0a277aadf2bf37965a9e6c28f8c3 13-Jun-2008 Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> V4L/DVB (8039): pxa-camera: fix platform_get_irq() error handling.

platform_get_irq() returns a negative value on error, not 0.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/pxa_camera.c
5aa2110f3f33feb4a0c67a4996dc400dc594bc1d 22-Apr-2008 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (7671): pxa-camera: fix DMA sg-list coalescing for more than 2 buffers

Currently the pxa-camera driver has a bug, visible when the user requests
more than 2 video buffers. When the third buffer is queued, it is not
appended to the DMA-descriptor list of the second buffer, but is again
appended to the first buffer. Fix it.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/pxa_camera.c
e7c506881973d0c762d660005be54c4095219c59 22-Apr-2008 Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L/DVB (7670): pxa-camera: handle FIFO overruns

FIFO overruns are not seldom on PXA camera interface FIFOs. Handle them by
dropping the corrupted frame, waiting for the next start-of-frame, and
restarting capture.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/pxa_camera.c
a5462e5be3c1cec7e00e6af9985ff31bf4ef8aa0 22-Apr-2008 Mike Rapoport <mike@compulab.co.il> V4L/DVB (7669): pxa_camera: Add support for YUV modes

This patch adds support for YUV packed and planar capture for pxa_camera.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/pxa_camera.c
7e28adb2497f6b873516163e2d29210c11777613 09-Apr-2008 Harvey Harrison <harvey.harrison@gmail.com> V4L/DVB (7518): media/video/ replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/pxa_camera.c
1a0063a9852380190a7172c1a1cb79e934b06cd4 04-Apr-2008 Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> V4L/DVB (7501): soc-camera: use a spinlock for videobuffer queue

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>
/drivers/media/video/pxa_camera.c
b8d9904c3525c0a149976ffaad48fcb03e8703f7 04-Apr-2008 Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> V4L/DVB (7500): soc-camera: extract function pointers from host object into operations

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>
/drivers/media/video/pxa_camera.c
ad5f2e859d76dccb7eb1aa942171b1a32211efc2 08-Mar-2008 Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> V4L/DVB (7336): soc-camera: streamline hardware parameter negotiation

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>
/drivers/media/video/pxa_camera.c
7102b773d538c1f064da22ae9a1fb86704747388 15-Apr-2008 Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> V4L/DVB (7250): Clean up pxa-camera driver, remove non-functional and never tested pm-support

This patch addresses most issues pointed out by Russell and Erik, moves
recently introduced into pxa-regs.h camera-specific defines into
pxa_camera.c, removes dummy power-management functions, improves
function-naming, etc.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/pxa_camera.c
3bc43840c3fbffaf8216883a37b336a41050d7f7 07-Apr-2008 Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> V4L/DVB (7578a): V4L: V4L2 soc_camera driver for PXA270

This patch adds a driver for the Quick Capture Interface on the PXA270.
It is based on the original driver from Intel, but has been re-worked
multiple times since then, now it also supports the V4L2 API. This patch
depends on a complementary patch, submitted to the ARM tree, providing
PXA270 camera platform bindings.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/pxa_camera.c