@@ -738,8 +738,10 @@ static int vfe_set_stream(struct v4l2_subdev *sd, int enable)
struct vfe_line *line = v4l2_get_subdevdata(sd);
struct vfe_device *vfe = to_vfe(line);
int ret;
+ int i;
if (enable) {
+ line->output.state = VFE_OUTPUT_RESERVED;
ret = vfe->ops->vfe_enable(line);
if (ret < 0)
dev_err(vfe->camss->dev,
@@ -749,6 +751,11 @@ static int vfe_set_stream(struct v4l2_subdev *sd, int enable)
if (ret < 0)
dev_err(vfe->camss->dev,
"Failed to disable vfe outputs\n");
+
+ /* At least one VFE line remains, return -EBUSY to avoid premature pipeline stop */
+ for (i = 0; i < vfe->line_num; i++)
+ if (vfe->line[i].output.state != VFE_OUTPUT_OFF)
+ return -EBUSY;
}
return ret;
@@ -1320,7 +1320,7 @@ static int camss_register_entities(struct camss *camss)
struct v4l2_subdev *vfe = &camss->vfe[k].line[j].subdev;
ret = media_create_pad_link(&csid->entity,
- MSM_CSID_PAD_SRC,
+ MSM_CSID_PAD_FIRST_SRC + j,
&vfe->entity,
MSM_VFE_PAD_SINK,
0);