]> asedeno.scripts.mit.edu Git - linux.git/commit
media: imx: Set capture compose rectangle in capture_device_set_format
authorSteve Longerbeam <slongerbeam@gmail.com>
Thu, 7 Feb 2019 23:42:55 +0000 (18:42 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 18 Feb 2019 15:55:30 +0000 (10:55 -0500)
commit5964cbd8692252615370b77eb96764dd70c2f837
treefc5699e3f4caa3ac5e595f1c27579b3cf2745b8c
parent09714569969cfe5e5b51fa5b0d9224ce38744e76
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>
drivers/staging/media/imx/imx-ic-prpencvf.c
drivers/staging/media/imx/imx-media-capture.c
drivers/staging/media/imx/imx-media-csi.c
drivers/staging/media/imx/imx-media-utils.c
drivers/staging/media/imx/imx-media.h