Age | Commit message (Collapse) | Author |
|
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
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>
---
drivers/media/video/pxa_camera.c | 20 ++++++--------------
1 files changed, 6 insertions(+), 14 deletions(-)
|
|
From: Robert Jarzmik <robert.jarzmik@free.fr>
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>
---
drivers/media/video/pxa_camera.c | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
|
|
From: Robert Jarzmik <robert.jarzmik@free.fr>
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.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
Documentation/video4linux/pxa_camera.txt | 125 ++++++++++++
drivers/media/video/pxa_camera.c | 319 ++++++++++++++++++------------
2 files changed, 316 insertions(+), 128 deletions(-)
create mode 100644 Documentation/video4linux/pxa_camera.txt
|
|
From: Robert Jarzmik <robert.jarzmik@free.fr>
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>
---
drivers/media/video/pxa_camera.c | 145 +++++++++++++++++++++++++++----------
1 files changed, 106 insertions(+), 39 deletions(-)
|
|
From: Robert Jarzmik <robert.jarzmik@free.fr>
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>
---
drivers/media/video/pxa_camera.c | 32 +++++++++++++++++++++-----------
1 files changed, 21 insertions(+), 11 deletions(-)
|
|
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
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>
---
drivers/media/video/mt9m001.c | 19 +++-
drivers/media/video/mt9m111.c | 56 +++++++---
drivers/media/video/mt9t031.c | 84 ++++++++++------
drivers/media/video/mt9v022.c | 62 +++++++----
drivers/media/video/mx3_camera.c | 157 +++++++++++++++++-----------
drivers/media/video/ov772x.c | 31 +++++-
drivers/media/video/pxa_camera.c | 67 +++++++++---
drivers/media/video/sh_mobile_ceu_camera.c | 17 ++-
drivers/media/video/soc_camera.c | 20 ++--
drivers/media/video/soc_camera_platform.c | 9 ++-
drivers/media/video/tw9910.c | 45 +++++---
include/media/soc_camera.h | 6 +-
12 files changed, 381 insertions(+), 192 deletions(-)
|
|
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
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>
---
arch/sh/boards/board-ap325rxa.c | 3 ++-
arch/sh/boards/mach-migor/setup.c | 5 +++--
drivers/media/video/mt9m001.c | 2 +-
drivers/media/video/mt9m111.c | 2 +-
drivers/media/video/mt9v022.c | 2 +-
drivers/media/video/ov772x.c | 2 +-
drivers/media/video/pxa_camera.c | 1 +
7 files changed, 10 insertions(+), 7 deletions(-)
|
|
From: Guennadi Liakhovetski <lyakh@axis700.grange>
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>
---
drivers/media/video/pxa_camera.c | 26 +++++++++++++-------------
drivers/media/video/sh_mobile_ceu_camera.c | 13 +++++--------
2 files changed, 18 insertions(+), 21 deletions(-)
|
|
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Original patch applied directly into -git, since it changed also a file
at staging tree.
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
kernel-sync:
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Author: Eric Miao <eric.miao@marvell.com>
Date: Fri Nov 28 09:16:52 2008 +0800
[ARM] pxa: move camera (QCI) registers definition out of pxa-regs.h
kernel-sync:
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
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: 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 <lg@denx.de>
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>
---
drivers/media/video/pxa_camera.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 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>
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.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
drivers/media/video/pxa_camera.c | 90 +++++++++++++++++++++++++++++---------
1 files changed, 69 insertions(+), 21 deletions(-)
|
|
From: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
|
|
From: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
kernel-sync:
|
|
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>
---
drivers/media/video/pxa_camera.c | 207 ++++++++++++++++++++++++++++++--------
1 files changed, 165 insertions(+), 42 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(-)
|
|
.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: Mauro Carvalho Chehab <mchehab@redhat.com>
Author: 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
kernel-sync:
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
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>
---
|
|
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
Make .power and .reset callbacks per camera instead of per host, also move
their invocation to camera drivers.
Signed-off-by: Stefan Herbrechtsmeier <hbmeier@hni.uni-paderborn.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
drivers/media/video/mt9m001.c | 33 +++++++++++++++++++++++++--
drivers/media/video/mt9m111.c | 15 ++++++++++++
drivers/media/video/mt9v022.c | 24 +++++++++++++++++++-
drivers/media/video/pxa_camera.c | 24 --------------------
drivers/media/video/sh_mobile_ceu_camera.c | 5 ----
include/asm-arm/arch-pxa/camera.h | 2 -
include/media/sh_mobile_ceu.h | 2 -
include/media/soc_camera.h | 3 ++
8 files changed, 71 insertions(+), 37 deletions(-)
|
|
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>
---
drivers/media/video/pxa_camera.c | 56 ++++++++++++++++++++++++++++++++++++++
1 files changed, 56 insertions(+), 0 deletions(-)
|
|
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>
---
drivers/media/video/pxa_camera.c | 2 +-
drivers/media/video/sh_mobile_ceu_camera.c | 2 +-
drivers/media/video/soc_camera_platform.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
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>
platform_get_irq() returns a negative value on error, not 0.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
|
|
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
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>
|
|
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
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>
|
|
From: Mike Rapoport <mike@compulab.co.il>
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>
|
|
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: 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>
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>
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>
|
|
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
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 for the first time it supports the
V4L2 API.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
|