diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-12-07 06:34:50 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-12-20 06:53:43 -0500 |
commit | 875e2e3edf48a206c64195666cf408dd3d119137 (patch) | |
tree | d86bf2075ed22fe669af4896afbe41f357f52fcd /drivers/media/video/omap3isp/ispccp2.c | |
parent | c3cd257402fdcd650816ec25b83480a24912430a (diff) |
[media] omap3isp: Mark next captured frame as faulty when an SBL overflow occurs
Instead of trying to propagate errors down the pipeline manually (and
failing to do so properly in all cases), flag SBL errors in the pipeline
to which the entity that triggered the error belongs, and use pipeline
error flags to mark buffers as faulty when completing them.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/omap3isp/ispccp2.c')
-rw-r--r-- | drivers/media/video/omap3isp/ispccp2.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/media/video/omap3isp/ispccp2.c b/drivers/media/video/omap3isp/ispccp2.c index 904ca8c8b17f..70ddbf35b223 100644 --- a/drivers/media/video/omap3isp/ispccp2.c +++ b/drivers/media/video/omap3isp/ispccp2.c | |||
@@ -556,7 +556,7 @@ static void ccp2_isr_buffer(struct isp_ccp2_device *ccp2) | |||
556 | struct isp_pipeline *pipe = to_isp_pipeline(&ccp2->subdev.entity); | 556 | struct isp_pipeline *pipe = to_isp_pipeline(&ccp2->subdev.entity); |
557 | struct isp_buffer *buffer; | 557 | struct isp_buffer *buffer; |
558 | 558 | ||
559 | buffer = omap3isp_video_buffer_next(&ccp2->video_in, ccp2->error); | 559 | buffer = omap3isp_video_buffer_next(&ccp2->video_in); |
560 | if (buffer != NULL) | 560 | if (buffer != NULL) |
561 | ccp2_set_inaddr(ccp2, buffer->isp_addr); | 561 | ccp2_set_inaddr(ccp2, buffer->isp_addr); |
562 | 562 | ||
@@ -567,8 +567,6 @@ static void ccp2_isr_buffer(struct isp_ccp2_device *ccp2) | |||
567 | omap3isp_pipeline_set_stream(pipe, | 567 | omap3isp_pipeline_set_stream(pipe, |
568 | ISP_PIPELINE_STREAM_SINGLESHOT); | 568 | ISP_PIPELINE_STREAM_SINGLESHOT); |
569 | } | 569 | } |
570 | |||
571 | ccp2->error = 0; | ||
572 | } | 570 | } |
573 | 571 | ||
574 | /* | 572 | /* |
@@ -576,13 +574,11 @@ static void ccp2_isr_buffer(struct isp_ccp2_device *ccp2) | |||
576 | * @ccp2: Pointer to ISP CCP2 device | 574 | * @ccp2: Pointer to ISP CCP2 device |
577 | * | 575 | * |
578 | * This will handle the CCP2 interrupts | 576 | * This will handle the CCP2 interrupts |
579 | * | ||
580 | * Returns -EIO in case of error, or 0 on success. | ||
581 | */ | 577 | */ |
582 | int omap3isp_ccp2_isr(struct isp_ccp2_device *ccp2) | 578 | void omap3isp_ccp2_isr(struct isp_ccp2_device *ccp2) |
583 | { | 579 | { |
580 | struct isp_pipeline *pipe = to_isp_pipeline(&ccp2->subdev.entity); | ||
584 | struct isp_device *isp = to_isp_device(ccp2); | 581 | struct isp_device *isp = to_isp_device(ccp2); |
585 | int ret = 0; | ||
586 | static const u32 ISPCCP2_LC01_ERROR = | 582 | static const u32 ISPCCP2_LC01_ERROR = |
587 | ISPCCP2_LC01_IRQSTATUS_LC0_FIFO_OVF_IRQ | | 583 | ISPCCP2_LC01_IRQSTATUS_LC0_FIFO_OVF_IRQ | |
588 | ISPCCP2_LC01_IRQSTATUS_LC0_CRC_IRQ | | 584 | ISPCCP2_LC01_IRQSTATUS_LC0_CRC_IRQ | |
@@ -604,19 +600,18 @@ int omap3isp_ccp2_isr(struct isp_ccp2_device *ccp2) | |||
604 | ISPCCP2_LCM_IRQSTATUS); | 600 | ISPCCP2_LCM_IRQSTATUS); |
605 | /* Errors */ | 601 | /* Errors */ |
606 | if (lcx_irqstatus & ISPCCP2_LC01_ERROR) { | 602 | if (lcx_irqstatus & ISPCCP2_LC01_ERROR) { |
607 | ccp2->error = 1; | 603 | pipe->error = true; |
608 | dev_dbg(isp->dev, "CCP2 err:%x\n", lcx_irqstatus); | 604 | dev_dbg(isp->dev, "CCP2 err:%x\n", lcx_irqstatus); |
609 | return -EIO; | 605 | return; |
610 | } | 606 | } |
611 | 607 | ||
612 | if (lcm_irqstatus & ISPCCP2_LCM_IRQSTATUS_OCPERROR_IRQ) { | 608 | if (lcm_irqstatus & ISPCCP2_LCM_IRQSTATUS_OCPERROR_IRQ) { |
613 | ccp2->error = 1; | 609 | pipe->error = true; |
614 | dev_dbg(isp->dev, "CCP2 OCP err:%x\n", lcm_irqstatus); | 610 | dev_dbg(isp->dev, "CCP2 OCP err:%x\n", lcm_irqstatus); |
615 | ret = -EIO; | ||
616 | } | 611 | } |
617 | 612 | ||
618 | if (omap3isp_module_sync_is_stopping(&ccp2->wait, &ccp2->stopping)) | 613 | if (omap3isp_module_sync_is_stopping(&ccp2->wait, &ccp2->stopping)) |
619 | return 0; | 614 | return; |
620 | 615 | ||
621 | /* Frame number propagation */ | 616 | /* Frame number propagation */ |
622 | if (lcx_irqstatus & ISPCCP2_LC01_IRQSTATUS_LC0_FS_IRQ) { | 617 | if (lcx_irqstatus & ISPCCP2_LC01_IRQSTATUS_LC0_FS_IRQ) { |
@@ -629,8 +624,6 @@ int omap3isp_ccp2_isr(struct isp_ccp2_device *ccp2) | |||
629 | /* Handle queued buffers on frame end interrupts */ | 624 | /* Handle queued buffers on frame end interrupts */ |
630 | if (lcm_irqstatus & ISPCCP2_LCM_IRQSTATUS_EOF_IRQ) | 625 | if (lcm_irqstatus & ISPCCP2_LCM_IRQSTATUS_EOF_IRQ) |
631 | ccp2_isr_buffer(ccp2); | 626 | ccp2_isr_buffer(ccp2); |
632 | |||
633 | return ret; | ||
634 | } | 627 | } |
635 | 628 | ||
636 | /* ----------------------------------------------------------------------------- | 629 | /* ----------------------------------------------------------------------------- |
@@ -867,7 +860,6 @@ static int ccp2_s_stream(struct v4l2_subdev *sd, int enable) | |||
867 | if (enable == ISP_PIPELINE_STREAM_STOPPED) | 860 | if (enable == ISP_PIPELINE_STREAM_STOPPED) |
868 | return 0; | 861 | return 0; |
869 | atomic_set(&ccp2->stopping, 0); | 862 | atomic_set(&ccp2->stopping, 0); |
870 | ccp2->error = 0; | ||
871 | } | 863 | } |
872 | 864 | ||
873 | switch (enable) { | 865 | switch (enable) { |