]> asedeno.scripts.mit.edu Git - linux.git/commit
media: atmel: atmel-isc-base: initialize the try_crop for the pads in try_fmt
authorEugen Hristev <eugen.hristev@microchip.com>
Mon, 25 Nov 2019 08:32:54 +0000 (09:32 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 16 Dec 2019 09:16:25 +0000 (10:16 +0100)
commit374d968ac7440d128f93128e7f13f2ab035b0dcc
treec3f6bb75de3baeb0ba9d6215e7305d458ee08307
parentda3a55b5a948e0226c2811d001df40c8ba6b4ac1
media: atmel: atmel-isc-base: initialize the try_crop for the pads in try_fmt

When requesting format from sensor, some sensors call the
subdev_get_try_crop which for ISC was not properly initialized, and this
causes errors in determining proper image resolutions.
To accommodate for this, when trying a format (in try_fmt), first attempt
to obtain the framesize for this format from sensor.
In case this fails, use the maximum ISC width/height as try_crop, otherwise
provide the first size height/width from the sensor.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
[hverkuil-cisco@xs4all.nl: changed {0} to {}]
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/atmel/atmel-isc-base.c