media: ov5640: Adjust format to bpp in s_fmt
authorJacopo Mondi <jacopo@jmondi.org>
Fri, 13 May 2022 14:14:14 +0000 (15:14 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 8 Jul 2022 14:40:14 +0000 (15:40 +0100)
commitdd81b8ff90cac2c7eaa8247a0209d61e76582017
tree87a157f95f0914304603b632ff880de2666aad54
parent7dcb3a2f1f1871cc6e18e744d125baaedada3944
media: ov5640: Adjust format to bpp in s_fmt

The ov5640 driver supports different sizes for different mbus_codes.
In particular:

- 8bpp modes: high resolution sizes (>= 1280x720)
- 16bpp modes: all sizes
- 24bpp modes: low resolutions sizes (< 1280x720)

Adjust the image sizes according to the above constraints.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/ov5640.c