media: atomisp: Make atomisp_try_fmt_cap() take padding into account
authorHans de Goede <hdegoede@redhat.com>
Sat, 13 Aug 2022 15:08:44 +0000 (17:08 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sat, 24 Sep 2022 07:38:52 +0000 (09:38 +0200)
commite0ae3048b3db5a380a7196f58d5eeebb6770bad2
tree4c2c83b8643fc643f015095d96dd4b6fbc663f2f
parent4d3aafb9c9bba59c9b6f6df8ea6c89483bfed8d4
media: atomisp: Make atomisp_try_fmt_cap() take padding into account

atomisp_try_fmt() gives results with padding included. So when userspace
asks for e.g. 1600x1200 then we should pass 1616x1216 to atomisp_try_fmt()
this will then get adjusted back to 1600x1200 before returning it to
userspace by the atomisp_adjust_fmt() call at the end of atomisp_try_fmt().

This fixes the resolution list in camorama showing resolutions like e.g.
1584x1184 instead of 1600x1200.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_ioctl.c