media: i2c: imx219: Infer binning settings from format and crop
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 24 Sep 2023 15:32:59 +0000 (18:32 +0300)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 7 Oct 2023 08:55:47 +0000 (10:55 +0200)
commitc59d77be1b8349757660216e20db8cac75e6c967
tree427fc21c1a131d3fa18b3d782914e116c3edc1c6
parent00eb22782bb15b04dddc8471bbcee68b7613ba0f
media: i2c: imx219: Infer binning settings from format and crop

Compare the format and crop rectangle dimensions to infer binning
settings, instead of storing the binning mode in the imx219_mode
structure. This removes duplicate information from the mode.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/i2c/imx219.c