aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/omap3isp
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@iki.fi>2012-01-16 16:59:02 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-14 07:49:29 -0400
commitb0cd79ed987c7b362a2e1a339ce9959192dc2f52 (patch)
tree75fad6d239f585aad1029a805d8867efe6e2af90 /drivers/media/video/omap3isp
parent618b055bc9c7253677520c1536a47540c3647a1a (diff)
[media] omap3isp: Move setting constaints above media_entity_pipeline_start
The clock rate for l3_ick will soon be read during pipeline validation which is now part of media_entity_pipeline_start(). For that reason we set constraints earlier on. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/omap3isp')
-rw-r--r--drivers/media/video/omap3isp/ispvideo.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/media/video/omap3isp/ispvideo.c b/drivers/media/video/omap3isp/ispvideo.c
index 1fa29cc9bb6d..5e55477f120d 100644
--- a/drivers/media/video/omap3isp/ispvideo.c
+++ b/drivers/media/video/omap3isp/ispvideo.c
@@ -304,7 +304,6 @@ static int isp_video_validate_pipeline(struct isp_pipeline *pipe)
304 struct v4l2_subdev *subdev; 304 struct v4l2_subdev *subdev;
305 int ret; 305 int ret;
306 306
307 pipe->max_rate = pipe->l3_ick;
308 pipe->entities = 0; 307 pipe->entities = 0;
309 308
310 subdev = isp_video_remote_subdev(pipe->output, NULL); 309 subdev = isp_video_remote_subdev(pipe->output, NULL);
@@ -997,6 +996,12 @@ isp_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type)
997 */ 996 */
998 pipe = video->video.entity.pipe 997 pipe = video->video.entity.pipe
999 ? to_isp_pipeline(&video->video.entity) : &video->pipe; 998 ? to_isp_pipeline(&video->video.entity) : &video->pipe;
999
1000 if (video->isp->pdata->set_constraints)
1001 video->isp->pdata->set_constraints(video->isp, true);
1002 pipe->l3_ick = clk_get_rate(video->isp->clock[ISP_CLK_L3_ICK]);
1003 pipe->max_rate = pipe->l3_ick;
1004
1000 media_entity_pipeline_start(&video->video.entity, &pipe->pipe); 1005 media_entity_pipeline_start(&video->video.entity, &pipe->pipe);
1001 1006
1002 /* Verify that the currently configured format matches the output of 1007 /* Verify that the currently configured format matches the output of
@@ -1029,10 +1034,6 @@ isp_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type)
1029 pipe->output = far_end; 1034 pipe->output = far_end;
1030 } 1035 }
1031 1036
1032 if (video->isp->pdata->set_constraints)
1033 video->isp->pdata->set_constraints(video->isp, true);
1034 pipe->l3_ick = clk_get_rate(video->isp->clock[ISP_CLK_L3_ICK]);
1035
1036 /* Validate the pipeline and update its state. */ 1037 /* Validate the pipeline and update its state. */
1037 ret = isp_video_validate_pipeline(pipe); 1038 ret = isp_video_validate_pipeline(pipe);
1038 if (ret < 0) 1039 if (ret < 0)
@@ -1078,9 +1079,9 @@ isp_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type)
1078error: 1079error:
1079 if (ret < 0) { 1080 if (ret < 0) {
1080 omap3isp_video_queue_streamoff(&vfh->queue); 1081 omap3isp_video_queue_streamoff(&vfh->queue);
1082 media_entity_pipeline_stop(&video->video.entity);
1081 if (video->isp->pdata->set_constraints) 1083 if (video->isp->pdata->set_constraints)
1082 video->isp->pdata->set_constraints(video->isp, false); 1084 video->isp->pdata->set_constraints(video->isp, false);
1083 media_entity_pipeline_stop(&video->video.entity);
1084 /* The DMA queue must be emptied here, otherwise CCDC interrupts 1085 /* The DMA queue must be emptied here, otherwise CCDC interrupts
1085 * that will get triggered the next time the CCDC is powered up 1086 * that will get triggered the next time the CCDC is powered up
1086 * will try to access buffers that might have been freed but 1087 * will try to access buffers that might have been freed but