diff options
author | Tomasz Gorochowik <tgorochowik@antmicro.com> | 2018-05-21 15:03:55 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2020-02-09 22:49:20 +0100 |
commit | 8cc569eb4aea25ca6ad9d56840f2c3d7b2d9b464 (patch) | |
tree | 180e22b001f619f49e67ba47b0288c53d21b3343 | |
parent | 5370f09030c3ee9b957a60966a357868ce2b4f82 (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)
(cherry picked from commit f744198310d0849bd2fcb34bae4821317256b843)
(cherry picked from commit 8f67764a2fc758751a7de27973c4dd05a327244e)
-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 db04e8d54b05..b8e2e44ba0ec 100644 --- a/drivers/media/platform/imx8/mxc-isi-cap.c +++ b/drivers/media/platform/imx8/mxc-isi-cap.c @@ -978,6 +978,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; src_fmt.format.width = dst_f->width; |