From: Laurent Pinchart Date: Mon, 9 Dec 2013 14:13:13 +0000 (-0300) Subject: upstream: [media] omap3isp: ccdc: Don't hang when the SBL fails to become idle X-Git-Tag: submit/tizen/20141121.110247~1550 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a7f2461cdb4fc8f111a6372bedfd9b5e0b35e21;p=platform%2Fkernel%2Flinux-3.10.git upstream: [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 Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/omap3isp/ispccdc.c b/drivers/media/platform/omap3isp/ispccdc.c index 561c991..5db2c88 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; }