Date:2010-04-20 08:51:29 (13 years 5 months ago)
Author:Stefan Herbrechtsmeier
Commit:a47f6be45670465d45a3d27f7ff71986bd35d6c4
Message: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>
Files: drivers/media/video/pxa_camera.c (3 diffs)

Change Details

drivers/media/video/pxa_camera.c
609609 */
610610static void pxa_camera_start_capture(struct pxa_camera_dev *pcdev)
611611{
612    unsigned long cicr0, cifr;
612    unsigned long cicr0;
613613
614614    dev_dbg(pcdev->soc_host.v4l2_dev.dev, "%s\n", __func__);
615    /* Reset the FIFOs */
616    cifr = __raw_readl(pcdev->base + CIFR) | CIFR_RESET_F;
617    __raw_writel(cifr, pcdev->base + CIFR);
618615    /* Enable End-Of-Frame Interrupt */
619616    cicr0 = __raw_readl(pcdev->base + CICR0) | CICR0_ENB;
620617    cicr0 &= ~CICR0_EOFM;
...... 
935932static irqreturn_t pxa_camera_irq(int irq, void *data)
936933{
937934    struct pxa_camera_dev *pcdev = data;
938    unsigned long status, cicr0;
935    unsigned long status, cifr, cicr0;
939936    struct pxa_buffer *buf;
940937    struct videobuf_buffer *vb;
941938
...... 
949946    __raw_writel(status, pcdev->base + CISR);
950947
951948    if (status & CISR_EOF) {
949        /* Reset the FIFOs */
950        cifr = __raw_readl(pcdev->base + CIFR) | CIFR_RESET_F;
951        __raw_writel(cifr, pcdev->base + CIFR);
952
952953        pcdev->active = list_first_entry(&pcdev->capture,
953954                       struct pxa_buffer, vb.queue);
954955        vb = &pcdev->active->vb;

Archive Download the corresponding diff file



interactive