diff options
author | Laurent Pinchart | 2013-10-09 16:52:45 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab | 2013-12-11 12:03:51 +0100 |
commit | f3632ba850c70bf24a80295621857166e0c0b14c (patch) | |
tree | 7bbd6654d9fa6ade3ac246b148b9c9e146a79915 /drivers/staging/media/omap4iss/iss_video.c | |
parent | [media] v4l: omap4iss: Enable/disabling the ISP interrupts globally (diff) | |
download | kernel-qcow2-linux-f3632ba850c70bf24a80295621857166e0c0b14c.tar.gz kernel-qcow2-linux-f3632ba850c70bf24a80295621857166e0c0b14c.tar.xz kernel-qcow2-linux-f3632ba850c70bf24a80295621857166e0c0b14c.zip |
[media] v4l: omap4iss: Reset the ISS when the pipeline can't be stopped
When a failure to stop a module in the pipeline is detected, the only
way to recover is to reset the ISS. However, as other users can be using
a different pipeline with other modules, the ISS can't be reset
synchronously with the error detection.
Keep track of modules that have failed to stop, and reset the ISS
accordingly when the last user releases the last reference to the ISS.
Refuse to start streaming on a pipeline that contains a crashed module,
as the hardware wouldn't work anyway.
Modify the omap4iss_pipeline_set_stream() function to record the new ISS
pipeline state only when no error occurs, except when stopping the
pipeline in which case the pipeline is still marked as stopped.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/staging/media/omap4iss/iss_video.c')
-rw-r--r-- | drivers/staging/media/omap4iss/iss_video.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/staging/media/omap4iss/iss_video.c b/drivers/staging/media/omap4iss/iss_video.c index 68eab6e6dc36..910648766e6c 100644 --- a/drivers/staging/media/omap4iss/iss_video.c +++ b/drivers/staging/media/omap4iss/iss_video.c @@ -772,6 +772,8 @@ iss_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) { struct iss_video_fh *vfh = to_iss_video_fh(fh); struct iss_video *video = video_drvdata(file); + struct media_entity_graph graph; + struct media_entity *entity; enum iss_pipeline_state state; struct iss_pipeline *pipe; struct iss_video *far_end; @@ -791,6 +793,7 @@ iss_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) pipe->external = NULL; pipe->external_rate = 0; pipe->external_bpp = 0; + pipe->entities = 0; if (video->iss->pdata->set_constraints) video->iss->pdata->set_constraints(video->iss, true); @@ -799,6 +802,11 @@ iss_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) if (ret < 0) goto err_media_entity_pipeline_start; + entity = &video->video.entity; + media_entity_graph_walk_start(&graph, entity); + while ((entity = media_entity_graph_walk_next(&graph))) + pipe->entities |= 1 << entity->id; + /* Verify that the currently configured format matches the output of * the connected subdev. */ |