diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-10-15 13:46:27 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-10-15 15:59:52 +0200 |
commit | b87bf06f10636ed31e4c40d536b4182cc77e9d46 (patch) | |
tree | 6da75feee43947c82f58fa6f02634d5f65092767 | |
parent | 4871ffd7f025854615ce14b090c3e1db5ceae809 (diff) |
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 <laurent.pinchart@ideasonboard.com>
-rw-r--r-- | isp/omap3isp.c | 15 |
1 files changed, 15 insertions, 0 deletions
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; } |