diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-02-09 13:00:45 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-08 13:51:25 -0300 |
commit | b43883d659aa3f3aced5e400538b200341e910e0 (patch) | |
tree | 3df28ffc8c5c1cfc276da278d8b49406d6c05b62 /drivers/media/video/omap3isp/ispcsi2.c | |
parent | a32f2f90543853449f0e49eaf885e8d24d5809a7 (diff) |
[media] omap3isp: Fix frame number propagation
When propagating the frame number through the pipeline, the frame number
must be incremented at frame start by the appropriate IRQ handler. This
was properly handled for the CSI2 and CCP2 receivers, but not when the
CCDC parallel interface is used.
ADD frame number incrementation to the HS/VS interrupt handler. As the
HS/VS interrupt is also generated for frames received by the CSI2 and
CCP2 receivers, remove explicit propagation handling from the serial
receivers.
Reported-by: Kruno Mrak <kruno.mrak@matrix-vision.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Tested-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/omap3isp/ispcsi2.c')
-rw-r--r-- | drivers/media/video/omap3isp/ispcsi2.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/drivers/media/video/omap3isp/ispcsi2.c b/drivers/media/video/omap3isp/ispcsi2.c index fcb5168996a..75ac6d46696 100644 --- a/drivers/media/video/omap3isp/ispcsi2.c +++ b/drivers/media/video/omap3isp/ispcsi2.c @@ -378,21 +378,17 @@ static void csi2_timing_config(struct isp_device *isp, static void csi2_irq_ctx_set(struct isp_device *isp, struct isp_csi2_device *csi2, int enable) { - u32 reg = ISPCSI2_CTX_IRQSTATUS_FE_IRQ; int i; - if (csi2->use_fs_irq) - reg |= ISPCSI2_CTX_IRQSTATUS_FS_IRQ; - for (i = 0; i < 8; i++) { - isp_reg_writel(isp, reg, csi2->regs1, + isp_reg_writel(isp, ISPCSI2_CTX_IRQSTATUS_FE_IRQ, csi2->regs1, ISPCSI2_CTX_IRQSTATUS(i)); if (enable) isp_reg_set(isp, csi2->regs1, ISPCSI2_CTX_IRQENABLE(i), - reg); + ISPCSI2_CTX_IRQSTATUS_FE_IRQ); else isp_reg_clr(isp, csi2->regs1, ISPCSI2_CTX_IRQENABLE(i), - reg); + ISPCSI2_CTX_IRQSTATUS_FE_IRQ); } } @@ -690,14 +686,6 @@ static void csi2_isr_ctx(struct isp_csi2_device *csi2, status = isp_reg_readl(isp, csi2->regs1, ISPCSI2_CTX_IRQSTATUS(n)); isp_reg_writel(isp, status, csi2->regs1, ISPCSI2_CTX_IRQSTATUS(n)); - /* Propagate frame number */ - if (status & ISPCSI2_CTX_IRQSTATUS_FS_IRQ) { - struct isp_pipeline *pipe = - to_isp_pipeline(&csi2->subdev.entity); - if (pipe->do_propagation) - atomic_inc(&pipe->frame_number); - } - if (!(status & ISPCSI2_CTX_IRQSTATUS_FE_IRQ)) return; @@ -1047,14 +1035,12 @@ static int csi2_set_stream(struct v4l2_subdev *sd, int enable) { struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd); struct isp_device *isp = csi2->isp; - struct isp_pipeline *pipe = to_isp_pipeline(&csi2->subdev.entity); struct isp_video *video_out = &csi2->video_out; switch (enable) { case ISP_PIPELINE_STREAM_CONTINUOUS: if (omap3isp_csiphy_acquire(csi2->phy) < 0) return -ENODEV; - csi2->use_fs_irq = pipe->do_propagation; if (csi2->output & CSI2_OUTPUT_MEMORY) omap3isp_sbl_enable(isp, OMAP3_ISP_SBL_CSI2A_WRITE); csi2_configure(csi2); |