diff options
author | Tomasz Gorochowik <tgorochowik@antmicro.com> | 2018-05-21 15:03:55 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2018-10-11 19:40:26 +0200 |
commit | f744198310d0849bd2fcb34bae4821317256b843 (patch) | |
tree | 346271f9acc4d82f02f08f4b339789808735f3e1 | |
parent | 3ab199d9b1b3d0c94d89c2c1c5b2c5749d4bc476 (diff) |
imx8: isi: XXX: Add code to force format setting in the actual sensor
This commit adds code that forces setting the requested format in the
actual sensor driver.
Note that currently it is commented out as imx8 isi does not seem to
work properly with any other source resolution than the default
1920x1080.
Without this code, the driver will work with other resolutions (the ones
which are reported as supported by the connected sensors and lower than
1920x1080), but the image will be scaled down from 1920x1080. Scaling up
is not supported.
(cherry picked from commit a1a1244b1de00274586d1ea16048f8469966ff30)
(cherry picked from commit 16a4bd33e589b1f08c64a1b593d11921e62d6e72)
-rw-r--r-- | drivers/media/platform/imx8/mxc-isi-cap.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/platform/imx8/mxc-isi-cap.c b/drivers/media/platform/imx8/mxc-isi-cap.c index ef0914d003a8..0bb1373b1aa8 100644 --- a/drivers/media/platform/imx8/mxc-isi-cap.c +++ b/drivers/media/platform/imx8/mxc-isi-cap.c @@ -884,6 +884,20 @@ static int mxc_isi_source_fmt_init(struct mxc_isi_dev *mxc_isi) return -EINVAL; } +# if 0 + struct mxc_isi_frame *dst_f = &mxc_isi->isi_cap.dst_f; + struct v4l2_subdev_format dst_fmt; + struct v4l2_subdev *sd; + + dst_fmt.pad = source_pad->index; + dst_fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE; + dst_fmt.format.width = dst_f->o_width; + dst_fmt.format.height = dst_f->o_height; + + sd = mxc_isi_get_sensor_subdev(&mxc_isi->isi_cap.sd); + v4l2_subdev_call(sd, pad, set_fmt, NULL, &dst_fmt); +# endif + src_fmt.pad = source_pad->index; src_fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE; ret = v4l2_subdev_call(src_sd, pad, get_fmt, NULL, &src_fmt); |