media: tegra-video: Add support for selection ioctl ops
authorSowjanya Komatineni <skomatineni@nvidia.com>
Wed, 12 Aug 2020 00:27:18 +0000 (02:27 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 28 Aug 2020 13:12:07 +0000 (15:12 +0200)
commitbdcad5ce6dde6e4f0767aef7b63c164b9435bd8c
tree3347f9a70e266cad76a779a7480bd8dc70b19daf
parent1ebaeb09830f36c1111b72a95420814225bd761c
media: tegra-video: Add support for selection ioctl ops

This patch adds selection v4l2 ioctl operations to allow configuring
a selection rectangle in the sensor through the Tegra video device
node.

Some sensor drivers supporting crop uses try_crop rectangle from
v4l2_subdev_pad_config during try format for computing binning.

So with selection ops support, this patch also updates try format
to use try crop rectangle either from subdev frame size enumeration
or from subdev crop boundary.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/tegra-video/vi.c