Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Laurent Pinchart and committed by
Mauro Carvalho Chehab
9554b7db 112eee0c

+2
+2
drivers/media/platform/omap3isp/ispccdc.c
··· 1516 1516 1517 1517 if (ccdc_sbl_wait_idle(ccdc, 1000)) { 1518 1518 dev_info(isp->dev, "CCDC won't become idle!\n"); 1519 + isp->crashed |= 1U << ccdc->subdev.entity.id; 1520 + omap3isp_pipeline_cancel_stream(pipe); 1519 1521 goto done; 1520 1522 } 1521 1523