Message ID | 1374677852-2006-1-git-send-email-s.nawrocki@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hello, On Wednesday 24 July 2013 16:57:32 Sylwester Nawrocki wrote: > From: Andrzej Hajda <a.hajda@samsung.com> > > Resolution set on ISP pad of S5C73M3-OIF subdev should be > propagated to source pad for TRY and ACTIVE formats. > The patch adds missing propagation for TRY format. I might be missing something, but where's the propagation for the ACTIVE format ? > Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> > Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> > --- > drivers/media/i2c/s5c73m3/s5c73m3-core.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c > b/drivers/media/i2c/s5c73m3/s5c73m3-core.c index 825ea86..b76ec0e 100644 > --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c > +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c > @@ -1111,6 +1111,11 @@ static int s5c73m3_oif_set_fmt(struct v4l2_subdev > *sd, if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) { > mf = v4l2_subdev_get_try_format(fh, fmt->pad); > *mf = fmt->format; > + if (fmt->pad == OIF_ISP_PAD) { > + mf = v4l2_subdev_get_try_format(fh, OIF_SOURCE_PAD); > + mf->width = fmt->format.width; > + mf->height = fmt->format.height; > + } > } else { > switch (fmt->pad) { > case OIF_ISP_PAD:
Hi Laurent, Thank you for the review. On 08/09/2013 12:58 AM, Laurent Pinchart wrote: > Hello, > > On Wednesday 24 July 2013 16:57:32 Sylwester Nawrocki wrote: >> From: Andrzej Hajda <a.hajda@samsung.com> >> >> Resolution set on ISP pad of S5C73M3-OIF subdev should be >> propagated to source pad for TRY and ACTIVE formats. >> The patch adds missing propagation for TRY format. > I might be missing something, but where's the propagation for the ACTIVE > format ? In case of active format there are no separate containers for the format of each pad, instead they shares common fields, precisely .oif_pix_size and .mbus_code. This way there is no need for extra code for format propagation. Regards Andrzej > >> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> >> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> >> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> >> --- >> drivers/media/i2c/s5c73m3/s5c73m3-core.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c >> b/drivers/media/i2c/s5c73m3/s5c73m3-core.c index 825ea86..b76ec0e 100644 >> --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c >> +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c >> @@ -1111,6 +1111,11 @@ static int s5c73m3_oif_set_fmt(struct v4l2_subdev >> *sd, if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) { >> mf = v4l2_subdev_get_try_format(fh, fmt->pad); >> *mf = fmt->format; >> + if (fmt->pad == OIF_ISP_PAD) { >> + mf = v4l2_subdev_get_try_format(fh, OIF_SOURCE_PAD); >> + mf->width = fmt->format.width; >> + mf->height = fmt->format.height; >> + } >> } else { >> switch (fmt->pad) { >> case OIF_ISP_PAD: -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Andrzej, On Friday 09 August 2013 08:24:10 Andrzej Hajda wrote: > On 08/09/2013 12:58 AM, Laurent Pinchart wrote: > > On Wednesday 24 July 2013 16:57:32 Sylwester Nawrocki wrote: > >> From: Andrzej Hajda <a.hajda@samsung.com> > >> > >> Resolution set on ISP pad of S5C73M3-OIF subdev should be > >> propagated to source pad for TRY and ACTIVE formats. > >> The patch adds missing propagation for TRY format. > > > > I might be missing something, but where's the propagation for the ACTIVE > > format ? > > In case of active format there are no separate containers > for the format of each pad, instead they shares common fields, > precisely .oif_pix_size and .mbus_code. > This way there is no need for extra code for format propagation. I got confused by the s5c73m3_oif_get_fmt() implementation that retrieves the pixel code and frame size from different internal state fields for the soruce pad. The code looks correct. > >> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> > >> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> > >> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> > >> --- > >> > >> drivers/media/i2c/s5c73m3/s5c73m3-core.c | 5 +++++ > >> 1 file changed, 5 insertions(+) > >> > >> diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c > >> b/drivers/media/i2c/s5c73m3/s5c73m3-core.c index 825ea86..b76ec0e 100644 > >> --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c > >> +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c > >> @@ -1111,6 +1111,11 @@ static int s5c73m3_oif_set_fmt(struct v4l2_subdev > >> *sd, if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) { > >> > >> mf = v4l2_subdev_get_try_format(fh, fmt->pad); > >> *mf = fmt->format; > >> > >> + if (fmt->pad == OIF_ISP_PAD) { > >> + mf = v4l2_subdev_get_try_format(fh, OIF_SOURCE_PAD); > >> + mf->width = fmt->format.width; > >> + mf->height = fmt->format.height; > >> + } > >> > >> } else { > >> > >> switch (fmt->pad) { > >> case OIF_ISP_PAD:
diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c index 825ea86..b76ec0e 100644 --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c @@ -1111,6 +1111,11 @@ static int s5c73m3_oif_set_fmt(struct v4l2_subdev *sd, if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) { mf = v4l2_subdev_get_try_format(fh, fmt->pad); *mf = fmt->format; + if (fmt->pad == OIF_ISP_PAD) { + mf = v4l2_subdev_get_try_format(fh, OIF_SOURCE_PAD); + mf->width = fmt->format.width; + mf->height = fmt->format.height; + } } else { switch (fmt->pad) { case OIF_ISP_PAD: