From a1a1244b1de00274586d1ea16048f8469966ff30 Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Mon, 21 May 2018 15:03:55 +0200 Subject: 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. --- drivers/media/platform/imx8/mxc-isi-cap.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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); -- cgit v1.2.3