summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pxa_camera.c
AgeCommit message (Collapse)Author
2009-08-25soc-camera: fix recently introduced overlong linesGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: Paul Mundt <lethal@linux-sh.org> Acked-by: Paul Mundt <lethal@linux-sh.org> Priority: low --- arch/sh/boards/board-ap325rxa.c | 3 ++- drivers/media/video/mt9m111.c | 9 +++++---- drivers/media/video/mt9v022.c | 5 ++++- drivers/media/video/mx1_camera.c | 3 ++- drivers/media/video/ov772x.c | 6 ++++-- drivers/media/video/pxa_camera.c | 3 ++- drivers/media/video/soc_camera.c | 14 +++++++++++--- drivers/media/video/soc_camera_platform.c | 3 ++- drivers/media/video/tw9910.c | 3 ++- include/media/soc_camera.h | 15 ++++++++++----- 10 files changed, 44 insertions(+), 20 deletions(-)
2009-08-25soc-camera: V4L2 API compliant scaling (S_FMT) and cropping (S_CROP)Guennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> 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> Priority: low
2009-08-25soc-camera: Use video device object for output in host driversGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Priority: low --- drivers/media/video/mx1_camera.c | 38 ++++++++++-------- drivers/media/video/mx3_camera.c | 46 ++++++++++++--------- drivers/media/video/pxa_camera.c | 54 ++++++++++++++----------- drivers/media/video/sh_mobile_ceu_camera.c | 61 ++++++++++++++------------- 4 files changed, 110 insertions(+), 89 deletions(-)
2009-08-25soc-camera: switch to using v4l2_subdev_call()Guennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> 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> Priority: low --- drivers/media/video/mx1_camera.c | 12 ++++------ drivers/media/video/mx3_camera.c | 10 ++++---- drivers/media/video/pxa_camera.c | 9 ++++--- drivers/media/video/sh_mobile_ceu_camera.c | 17 ++++++--------- drivers/media/video/soc_camera.c | 30 ++++++++++++++------------- include/media/soc_camera.h | 14 +++++++++--- 6 files changed, 48 insertions(+), 44 deletions(-)
2009-08-25soc-camera: switch to s_crop v4l2-subdev video operationGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> 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> Priority: low --- drivers/media/video/mt9m001.c | 23 +++--- drivers/media/video/mt9m111.c | 9 +- drivers/media/video/mt9t031.c | 9 +- drivers/media/video/mt9v022.c | 23 +++--- drivers/media/video/mx1_camera.c | 8 ++- drivers/media/video/mx3_camera.c | 7 +- drivers/media/video/ov772x.c | 19 ----- drivers/media/video/pxa_camera.c | 7 +- drivers/media/video/sh_mobile_ceu_camera.c | 110 ++++++++++++++------------- drivers/media/video/soc_camera.c | 4 +- drivers/media/video/soc_camera_platform.c | 28 ++++---- drivers/media/video/tw9910.c | 31 ++++---- include/media/soc_camera.h | 3 +- 13 files changed, 142 insertions(+), 139 deletions(-)
2009-08-25soc-camera: use struct v4l2_rect in struct soc_camera_deviceGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Switch to using struct v4l2_rect in struct soc_camera_device for uniformity and simplicity. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Priority: low
2009-08-25soc-camera: (partially) convert to v4l2-(sub)dev APIGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> 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> Priority: low
2009-08-25soc-camera: convert to platform deviceGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> 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> Priority: low
2009-08-06soc-camera: fix recursive locking in .buf_queue()Guennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> 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> --- drivers/media/video/mx1_camera.c | 6 +----- drivers/media/video/mx3_camera.c | 19 ++++++++++--------- drivers/media/video/pxa_camera.c | 6 +----- drivers/media/video/sh_mobile_ceu_camera.c | 5 +---- 4 files changed, 13 insertions(+), 23 deletions(-)
2009-07-22pxa_camera: Fix Oops in pxa_camera_probe.Guennadi Liakhovetski
From: Antonio Ospite <ospite@studenti.unina.it> mclk_get_divisor uses pcdev->soc_host.dev, make sure it is initialized. Priority: high Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/pxa_camera.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
2009-06-17pxa-camera: fix typoTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> v4l2_bound_align_image should be v4l_bound_align_image. Change comment to match coding style. Should be merged with cb48209c1841 pxa-camera: Use v4l bounding/alignment function Priority: high Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-06-04Add missing __devexit_p()Mauro Carvalho Chehab
From: Jean Delvare <khali@linux-fr.org> 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>
2009-05-30pxa-camera: Use v4l bounding/alignment functionTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> 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. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> CC: Robert Jarzmik <robert.jarzmik@free.fr> CC: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
2009-04-24soc-camera: remove an extra device generation from struct soc_camera_hostGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> 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> --- drivers/media/video/mx1_camera.c | 35 +++++----- drivers/media/video/mx3_camera.c | 40 ++++++------ drivers/media/video/pxa_camera.c | 97 ++++++++++++++-------------- drivers/media/video/sh_mobile_ceu_camera.c | 21 +++--- drivers/media/video/soc_camera.c | 35 +++------- include/media/soc_camera.h | 4 +- 6 files changed, 107 insertions(+), 125 deletions(-)
2009-04-24soc-camera: host-driver cleanupGuennadi Liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> 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> --- drivers/media/video/mx1_camera.c | 21 ++++++++----------- drivers/media/video/mx3_camera.c | 2 +- drivers/media/video/pxa_camera.c | 29 ++++++++++++--------------- drivers/media/video/sh_mobile_ceu_camera.c | 6 ++-- 4 files changed, 26 insertions(+), 32 deletions(-)
2009-04-14backport arch arm/sh changes that affected v4lMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-31pxa-camera: simplify the .buf_queue path by merging two loopsGuennadi Liakhovetski
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(-)
2009-03-31pxa_camera: Fix overrun condition on last bufferGuennadi Liakhovetski
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(-)
2009-03-31pxa_camera: Redesign DMA handlingGuennadi Liakhovetski
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
2009-03-31pxa_camera: Remove YUV planar formats holeGuennadi Liakhovetski
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(-)
2009-03-31pxa_camera: Enforce YUV422P frame sizes to be 16 multiplesGuennadi Liakhovetski
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(-)
2009-03-13soc-camera: separate S_FMT and S_CROP operationsGuennadi Liakhovetski
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(-)
2009-02-23soc-camera: add data signal polarity flags to driversGuennadi Liakhovetski
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(-)
2009-02-23soc-camera: fix S_CROP breakage on PXA and SuperHGuennadi Liakhovetski
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(-)
2009-01-05[PATCH] pxa-camera: fix redefinition warnings and missing DMA definitionsMauro Carvalho Chehab
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>
2009-01-03backport commit 013132cae84a36df8a88773a3e0391700d0a66d4Mauro Carvalho Chehab
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>
2008-12-18soc-camera: let drivers decide upon supported field valuesGuennadi Liakhovetski
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(-)
2008-12-18soc-camera: unify locking, play nicer with videobuf lockingGuennadi Liakhovetski
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(-)
2008-12-18pxa-camera: call try_fmt() camera device method with correct pixel formatGuennadi Liakhovetski
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(-)
2008-12-18soc-camera: readability improvements, more strict operations checksGuennadi Liakhovetski
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(-)
2008-12-18pxa-camera: setup the FIFO inactivity time-out registerGuennadi Liakhovetski
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(-)
2008-12-18V4L/DVB: pxa-camera: use memory mapped IO access for camera (QCI) registersGuennadi Liakhovetski
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>
2008-12-18[ARM] pxa: move camera (QCI) registers definition out of pxa-regs.hGuennadi Liakhovetski
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:
2008-12-01pxa-camera: pixel format negotiationRobert Jarzmik
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(-)
2008-12-01soc-camera: simplify namingGuennadi Liakhovetski
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(-)
2008-12-01soc-camera: let camera host drivers decide upon pixel formatGuennadi Liakhovetski
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(-)
2008-12-01soc-camera: merge .try_bus_param() into .try_fmt_cap()Guennadi Liakhovetski
.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(-)
2008-09-08backport commit 87f3dd77974cba1ba0798abd741ede50f56b3eb3Mauro Carvalho Chehab
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>
2008-09-18V4L/DVB: pxa-camera: Unsigned dma_chans[] cannot be negativeroel kluin
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> ---
2008-08-22merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-08-18pxa: fix build error for 2.6.27.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-08-14soc-camera: Move .power and .reset from soc_camera host to sensor driverStefan Herbrechtsmeier
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(-)
2008-08-02Add suspend/resume to pxa_camera driverRobert Jarzmik
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(-)
2008-08-02media: Clean up platform_driver_unregister() bogosity.Paul Mundt
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(-)
2008-07-11soc_camera: Move spinlocksMagnus Damm
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(-)
2008-07-11soc_camera: make videobuf independentPaulius Zaleckas
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>
2008-06-13pxa-camera: fix platform_get_irq() error handling.Guennadi Liakhovetski
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>
2008-04-22pxa-camera: fix DMA sg-list coalescing for more than 2 buffersGuennadi Liakhovetski
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>
2008-04-22pxa-camera: handle FIFO overrunsGuennadi Liakhovetski
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>
2008-04-22pxa_camera: Add support for YUV modesGuennadi Liakhovetski
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>