[media] omap3isp: Prevent pipelines that contain a crashed entity from starting
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 18 Nov 2011 14:28:24 +0000 (11:28 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 8 May 2012 16:50:29 +0000 (13:50 -0300)
commit1567bb7dcc6a232693143fdbe3b89791f20890ac
tree5366c345c2bd20bccf09a4b77296763eef28b693
parent4742c82ed90d0f8c82639750dcfe481e61d883a4
[media] omap3isp: Prevent pipelines that contain a crashed entity from starting

The OMAP3 ISP preview engine will violate the L4 bus protocol if we try
to write some of its internal registers after it failed to stop
properly. This generates an external abort on non-linefetch fault,
triggering a fatal kernel oops.

We can't always prevent preview engine stop failures (they can for
instance be caused by a sensor crash), but we can improve the system
reliability by refusing to start streaming on a pipeline that contains
the preview engine if it failed to stop. The driver will then eventually
reset the ISP (when all applications will have closed their file handles
related to OMAP3 ISP device nodes), making the ISP usable again.

Fixes: NB#291334 - camera: Recover gracefully from ISP crash instead of oopsing
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Reviewed-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/omap3isp/isp.c
drivers/media/video/omap3isp/isp.h
drivers/media/video/omap3isp/ispvideo.c
drivers/media/video/omap3isp/ispvideo.h