summaryrefslogtreecommitdiff
path: root/isp
diff options
context:
space:
mode:
Diffstat (limited to 'isp')
-rw-r--r--isp/omap3isp.c15
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;
}