summaryrefslogtreecommitdiff
path: root/isp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-07-25 00:35:15 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-09-04 15:37:16 +0200
commita6204cac1cbccd03307626782c93c34242c5ee2a (patch)
tree381b6b9bc8a93b8d56e2e60606f45ec46fc23347 /isp
parentcd06fe652b33c7c556a5735a30ca5f48dbcb77b8 (diff)
Activate viewfinder pipeline in omap3_isp_viewfinder_setup_pipeline()
Move omap3_isp_pipeline_activate() call from omap3_isp_snapshot_restore_pipeline() to omap3_isp_viewfinder_setup_pipeline() and remove omap3_isp_snapshot_restore_pipeline(). Remove the setup_link() calls from omap3_isp_open(), pre-setup of the pipeline isn't required anymore now that trying formats doesn't rely on active links. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'isp')
-rw-r--r--isp/omap3isp.c31
1 files changed, 4 insertions, 27 deletions
diff --git a/isp/omap3isp.c b/isp/omap3isp.c
index 75467e1..c41e514 100644
--- a/isp/omap3isp.c
+++ b/isp/omap3isp.c
@@ -482,24 +482,6 @@ struct omap3_isp_device *omap3_isp_open(const char *devname,
goto error;
}
- /* Setup the viewfinder pipeline. */
- ret = setup_link(isp, isp->sensor, isp->ccdc, MEDIA_LNK_FL_ENABLED);
- if (ret < 0)
- goto error;
-
- ret = setup_link(isp, isp->ccdc, isp->preview, MEDIA_LNK_FL_ENABLED);
- if (ret < 0)
- goto error;
-
- ret = setup_link(isp, isp->preview, isp->resizer, MEDIA_LNK_FL_ENABLED);
- if (ret < 0)
- goto error;
-
- ret = setup_link(isp, isp->resizer, isp->viewfinder.output.node,
- MEDIA_LNK_FL_ENABLED);
- if (ret < 0)
- goto error;
-
ret = omap3_isp_preview_setup(isp);
if (ret < 0) {
printf("error: unable to setup preview engine.\n");
@@ -533,6 +515,10 @@ static int omap3_isp_viewfinder_setup_pipeline(struct omap3_isp_device *isp,
{
int ret;
+ ret = omap3_isp_pipeline_activate(isp, &isp->viewfinder);
+ if (ret < 0)
+ return ret;
+
/* Configure the formats on the pipeline. */
ret = omap3_isp_pipeline_set_format(isp, ofmt, isp->viewfinder.output.scaler,
V4L2_SUBDEV_FORMAT_ACTIVE);
@@ -739,11 +725,6 @@ int omap3_isp_viewfinder_put_buffer(struct omap3_isp_device *isp,
* omap3_isp_snapshot_setup() before starting the viewfinder.
*/
-static int omap3_isp_snapshot_restore_pipeline(struct omap3_isp_device *isp)
-{
- return omap3_isp_pipeline_activate(isp, &isp->viewfinder);
-}
-
static int omap3_isp_snapshot_setup_pipeline(struct omap3_isp_device *isp,
struct v4l2_mbus_framefmt *ofmt)
{
@@ -885,10 +866,6 @@ static void omap3_isp_snapshot_event(void *priv)
isp->ops->snapshot_ready(isp, &buffer);
/* Resume the viewfinder. */
- ret = omap3_isp_snapshot_restore_pipeline(isp);
- if (ret < 0)
- return;
-
format = isp->viewfinder.output.format;
ret = omap3_isp_viewfinder_setup_pipeline(isp, &format);
if (ret < 0)