summaryrefslogtreecommitdiff
path: root/isp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-10-15 13:44:13 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-10-15 15:59:48 +0200
commit4871ffd7f025854615ce14b090c3e1db5ceae809 (patch)
treec4498659648d082e26d1b30ed21d517eff20a0dc /isp
parent31cd1a6b06d5e29098d70840207846b361cee581 (diff)
omap3isp: Handle scaler properly in omap3_isp_pipeline_activate()
Instead of retrieving the sensor default format and propagating through the pipeline, configure the sensor with the previously selected format (resulting from the scaler choice) and propagate it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'isp')
-rw-r--r--isp/omap3isp.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/isp/omap3isp.c b/isp/omap3isp.c
index 3ecf6b0..13e1fe3 100644
--- a/isp/omap3isp.c
+++ b/isp/omap3isp.c
@@ -681,6 +681,7 @@ static int omap3_isp_pipeline_activate(struct omap3_isp_device *isp,
struct omap3_isp_entity *source = NULL;
struct omap3_isp_entity *sink;
struct media_entity_pad *pad;
+ bool first = true;
int ret;
ret = media_reset_links(isp->mdev);
@@ -716,18 +717,19 @@ static int omap3_isp_pipeline_activate(struct omap3_isp_device *isp,
if (source->type == OMAP3_ISP_ENTITY_ENTITY) {
pad = source->source.link->source;
- ret = v4l2_subdev_get_format(pad->entity, &format, pad->index,
- V4L2_SUBDEV_FORMAT_ACTIVE);
- if (ret < 0) {
- printf("error: get format failed on %s:%u.\n",
- pad->entity->info.name, pad->index);
- return ret;
- }
-
- if (sink->last)
+ if (sink->last || first) {
format = source->source.format;
- else
+ } else {
+ ret = v4l2_subdev_get_format(pad->entity, &format, pad->index,
+ V4L2_SUBDEV_FORMAT_ACTIVE);
+ if (ret < 0) {
+ printf("error: get format failed on %s:%u.\n",
+ pad->entity->info.name, pad->index);
+ return ret;
+ }
+
format.code = source->source.format.code;
+ }
ret = v4l2_subdev_set_format(pad->entity, &format, pad->index,
V4L2_SUBDEV_FORMAT_ACTIVE);
@@ -752,6 +754,7 @@ static int omap3_isp_pipeline_activate(struct omap3_isp_device *isp,
}
source = sink;
+ first = false;
}
return 0;