media: atomisp: Add enum_framesizes function for sensors with selection / crop support
Some sensor drivers with crop support (e.g. the ov5693 driver) only
return the current crop rectangle + 1/2 (binning) of the current crop
rectangle when calling their enum_frame_sizes op.
This causes 2 issues:
1. Atomisp sets to the crop area to include the padding, where as
the enum_framesizes ioctl should return values without padding.
2. With cropping a lot more standard resolutions are possible then
just these 2 and many apps limit the list given to the end user
to the list returned by enum_framesizes.
Add an alternative enum_framesizes function for sensors which support
cropping to fix both issues.
Link: https://lore.kernel.org/r/20230529103741.11904-21-hdegoede@redhat.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>