summaryrefslogtreecommitdiff
path: root/drivers/staging/media/imx/imx-ic-prpencvf.c
diff options
context:
space:
mode:
authorSteve Longerbeam <slongerbeam@gmail.com>2019-02-07 18:42:55 -0500
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-02-18 10:55:30 -0500
commit5964cbd8692252615370b77eb96764dd70c2f837 (patch)
treefc5699e3f4caa3ac5e595f1c27579b3cf2745b8c /drivers/staging/media/imx/imx-ic-prpencvf.c
parent09714569969cfe5e5b51fa5b0d9224ce38744e76 (diff)
media: imx: Set capture compose rectangle in capture_device_set_format
The capture compose rectangle was not getting updated when setting the source subdevice's source pad format. This causes the compose window to be zero (or not updated) at stream start unless the capture device format was set explicitly at the capture device node. Fix by moving the calculation of the capture compose rectangle to imx_media_mbus_fmt_to_pix_fmt(), and pass the rectangle to imx_media_capture_device_set_format(). Fixes: 439d8186fb23 ("media: imx: add capture compose rectangle") Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/staging/media/imx/imx-ic-prpencvf.c')
-rw-r--r--drivers/staging/media/imx/imx-ic-prpencvf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/media/imx/imx-ic-prpencvf.c b/drivers/staging/media/imx/imx-ic-prpencvf.c
index 376b504e8a42..5c8e6ad8c025 100644
--- a/drivers/staging/media/imx/imx-ic-prpencvf.c
+++ b/drivers/staging/media/imx/imx-ic-prpencvf.c
@@ -912,6 +912,7 @@ static int prp_set_fmt(struct v4l2_subdev *sd,
const struct imx_media_pixfmt *cc;
struct v4l2_pix_format vdev_fmt;
struct v4l2_mbus_framefmt *fmt;
+ struct v4l2_rect vdev_compose;
int ret = 0;
if (sdformat->pad >= PRPENCVF_NUM_PADS)
@@ -953,11 +954,11 @@ static int prp_set_fmt(struct v4l2_subdev *sd,
priv->cc[sdformat->pad] = cc;
/* propagate output pad format to capture device */
- imx_media_mbus_fmt_to_pix_fmt(&vdev_fmt,
+ imx_media_mbus_fmt_to_pix_fmt(&vdev_fmt, &vdev_compose,
&priv->format_mbus[PRPENCVF_SRC_PAD],
priv->cc[PRPENCVF_SRC_PAD]);
mutex_unlock(&priv->lock);
- imx_media_capture_device_set_format(vdev, &vdev_fmt);
+ imx_media_capture_device_set_format(vdev, &vdev_fmt, &vdev_compose);
return 0;
out: