Commit 306c3190 authored by Daniel Scally's avatar Daniel Scally Committed by Hans Verkuil

media: i2c: Correct format propagation for st-mipid02

Format propagation in the st-mipid02 driver is incorrect in that when
setting format for V4L2_SUBDEV_FORMAT_TRY on the source pad, the
_active_ rather than _try_ format from the sink pad is propagated.
This causes problems with format negotiation - update the function to
propagate the correct format.

Fixes: 642bb5e8 ("media: st-mipid02: MIPID02 CSI-2 to PARALLEL bridge driver")
Signed-off-by: default avatarDaniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent ad592954
......@@ -736,8 +736,13 @@ static void mipid02_set_fmt_source(struct v4l2_subdev *sd,
{
struct mipid02_dev *bridge = to_mipid02_dev(sd);
/* source pad mirror active sink pad */
format->format = bridge->fmt;
/* source pad mirror sink pad */
if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE)
format->format = bridge->fmt;
else
format->format = *v4l2_subdev_get_try_format(sd, sd_state,
MIPID02_SINK_0);
/* but code may need to be converted */
format->format.code = serial_to_parallel_code(format->format.code);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment