summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/omap3isp/ispvideo.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-11-18 15:28:24 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-08 18:50:29 +0200
commit1567bb7dcc6a232693143fdbe3b89791f20890ac (patch)
tree5366c345c2bd20bccf09a4b77296763eef28b693 /drivers/media/video/omap3isp/ispvideo.h
parent[media] uvcvideo: Use videobuf2 .get_unmapped_area() implementation (diff)
downloadlinux-1567bb7dcc6a232693143fdbe3b89791f20890ac.tar.xz
linux-1567bb7dcc6a232693143fdbe3b89791f20890ac.zip
[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>
Diffstat (limited to 'drivers/media/video/omap3isp/ispvideo.h')
-rw-r--r--drivers/media/video/omap3isp/ispvideo.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/omap3isp/ispvideo.h b/drivers/media/video/omap3isp/ispvideo.h
index d91bdb919be0..c9187cbc3557 100644
--- a/drivers/media/video/omap3isp/ispvideo.h
+++ b/drivers/media/video/omap3isp/ispvideo.h
@@ -88,6 +88,7 @@ enum isp_pipeline_state {
/*
* struct isp_pipeline - An ISP hardware pipeline
* @error: A hardware error occurred during capture
+ * @entities: Bitmask of entities in the pipeline (indexed by entity ID)
*/
struct isp_pipeline {
struct media_pipeline pipe;
@@ -96,6 +97,7 @@ struct isp_pipeline {
enum isp_pipeline_stream_state stream_state;
struct isp_video *input;
struct isp_video *output;
+ u32 entities;
unsigned long l3_ick;
unsigned int max_rate;
atomic_t frame_number;