From b87bf06f10636ed31e4c40d536b4182cc77e9d46 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 15 Oct 2011 13:46:27 +0200 Subject: omap3isp: Activate the pipeline when setting the scaler Commit e0c7399fc26ebb0df66e114a71702d5e6c387e44 ("Add omap3_isp_pipeline_try_format()") wrongfully removed pipeline configuration from omap3_isp_viewfinder_set_scaler(). Add it back. Signed-off-by: Laurent Pinchart --- isp/omap3isp.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'isp') diff --git a/isp/omap3isp.c b/isp/omap3isp.c index 13e1fe3..2c48748 100644 --- a/isp/omap3isp.c +++ b/isp/omap3isp.c @@ -1004,6 +1004,7 @@ int omap3_isp_viewfinder_set_scaler(struct omap3_isp_device *isp, enum omap3_isp_scaler scaler) { struct v4l2_mbus_framefmt format; + struct omap3_isp_pool *pool; int ret; if (isp->viewfinder.scaler == scaler) @@ -1016,12 +1017,26 @@ int omap3_isp_viewfinder_set_scaler(struct omap3_isp_device *isp, isp->viewfinder.output->format.height == 0) return 0; + /* Free the intermediate pools buffers. */ + list_for_each_entry(pool, &isp->viewfinder.pools, list) + omap3_isp_pool_free_buffers(pool); + + /* Try the format. */ format = isp->viewfinder.output->format; ret = omap3_isp_pipeline_try_format(isp, &isp->viewfinder, &format, isp->viewfinder.scaler); if (ret < 0) return ret; + /* Setup the pipeline. */ + ret = omap3_isp_pipeline_activate(isp, &isp->viewfinder); + if (ret < 0) + return ret; + + /* Allocate buffers for intermediate pools. */ + list_for_each_entry(pool, &isp->viewfinder.pools, list) + omap3_isp_pool_alloc_buffers(pool); + return 0; } -- cgit v1.2.3