diff options
author | Tomasz Gorochowik <tgorochowik@antmicro.com> | 2018-05-21 15:03:55 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2018-05-23 15:05:14 +0200 |
commit | a1a1244b1de00274586d1ea16048f8469966ff30 (patch) | |
tree | 79e0f1354ea79cfb23a22f1771b4201cba6b10b0 | |
parent | 148241e839644f6af83a3e677e1350ce50ce27e9 (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.
-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 efc96fc99400..3852129c5124 100644 --- a/drivers/media/platform/imx8/mxc-isi-cap.c +++ b/drivers/media/platform/imx8/mxc-isi-cap.c @@ -789,6 +789,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); |