When setting formats on the sink pad, propagate the adjusted format over to the subdev's source pad. Use the MIPID02_SOURCE macro to fetch the pad's try format rather than relying on the pad field of the format to facilitate this - the function is specific to the source pad anyway. Signed-off-by: Daniel Scally <dan.scally@xxxxxxxxxxxxxxxx> --- drivers/media/i2c/st-mipid02.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c index f20f87562bf1..04112f26bc9d 100644 --- a/drivers/media/i2c/st-mipid02.c +++ b/drivers/media/i2c/st-mipid02.c @@ -750,7 +750,7 @@ static void mipid02_set_fmt_source(struct v4l2_subdev *sd, if (format->which != V4L2_SUBDEV_FORMAT_TRY) return; - *v4l2_subdev_get_try_format(sd, sd_state, format->pad) = format->format; + *v4l2_subdev_get_try_format(sd, sd_state, MIPID02_SOURCE) = format->format; } static void mipid02_set_fmt_sink(struct v4l2_subdev *sd, @@ -768,6 +768,9 @@ static void mipid02_set_fmt_sink(struct v4l2_subdev *sd, fmt = &bridge->fmt; *fmt = format->format; + + /* Propagate the format change to the source pad */ + mipid02_set_fmt_source(sd, sd_state, format); } static int mipid02_set_fmt(struct v4l2_subdev *sd, -- 2.34.1