summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-12-09 11:13:13 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-07 08:09:30 -0200
commit9554b7dbc62885f8524a63dafc8533422d9c637d (patch)
tree2135916beab375fc669d1540555d9cfbfd0d9f0f
parent112eee0c03eb86cb00f1c6769c7a0b05530d636b (diff)
[media] omap3isp: ccdc: Don't hang when the SBL fails to become idle
Under abnormal conditions (such as glitches on the HSYNC/VSYNC signals) the CCDC output SBL can fail to become idle. The driver currently logs this condition to the kernel log and doesn't restart the CCDC. This results in CCDC video capture hanging without any notification to userspace. Cancel the pipeline and mark the CCDC as crashed instead of hanging. Userspace will be notified of the problem and will then be able to close and reopen the device to trigger a reset of the ISP. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--drivers/media/platform/omap3isp/ispccdc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/omap3isp/ispccdc.c b/drivers/media/platform/omap3isp/ispccdc.c
index 561c991529e..5db2c88b9ad 100644
--- a/drivers/media/platform/omap3isp/ispccdc.c
+++ b/drivers/media/platform/omap3isp/ispccdc.c
@@ -1516,6 +1516,8 @@ static int ccdc_isr_buffer(struct isp_ccdc_device *ccdc)
if (ccdc_sbl_wait_idle(ccdc, 1000)) {
dev_info(isp->dev, "CCDC won't become idle!\n");
+ isp->crashed |= 1U << ccdc->subdev.entity.id;
+ omap3isp_pipeline_cancel_stream(pipe);
goto done;
}