[PATCH v2 00/25] drivers: media: imx283 improvements

Kieran Bingham posted 25 patches 2 months ago
drivers/media/i2c/imx283.c | 600 +++++++++++++++++++++++++++++----------------
1 file changed, 393 insertions(+), 207 deletions(-)
[PATCH v2 00/25] drivers: media: imx283 improvements
Posted by Kieran Bingham 2 months ago
This now far more extensive series reposts some patches which provide
fixes to the users of the IMX283 camera sensor to resolve handling
exposure and blanking updates and the reporting of the cropping modes
configured.

The series then goes on to extensively extend the driver to move towards
a dedicated scan out structure allowing mode definitions to be greatly
simplified and factor out a lot of common definitions and duplication.

Vertical offset corrections are added which handle the correct
alignment of the output mode in the different binning combinations which
otherwise translate to an offset in the image capture which is
detectable when the camera is used as a measurement device.

To make use of this, the horizontal and vertical configuration is
refactored to make it clearer what calculations are being performed and
manage the vertical positioning based on the VOB and binning offsets
accordingly.

This then provides us with a mechanism to fix a separate issue that
occurs on the IMX283 where an 'extra black line' is inserted by the
sensor to resolve bayer re-ordering. This extra line is undesirable in
the output and so we account for this and remove it by instead
requesting *two* additional lines, and moving two lines back into the
VOB data type. The extra line is required to maintain bayer order, and
moving the lines prevents them from being added to the captured image.

Extra modes are added based on this new simplified mode configuration
structure to match the diagrams present in the sensor datasheet.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
Kieran Bingham (23):
      media: i2c: imx283: Move imx283_mode structure definition
      media: i2c: imx283: Move scan out data to single data structure
      media: i2c: imx283: Remove horizontal_ob
      media: i2c: imx283: Move vertical_ob to scan modes
      media: i2c: imx283: Factor out vertical cropping parameters
      media: i2c: imx283: Vertical offset corrections
      media: i2c: imx283: Define recommended area
      media: i2c: imx283: Move Horizontal configuration block
      media: i2c: imx283: Constrain scope of vertical calculations
      media: i2c: imx283: Simplify v_pos determination
      media: i2c: imx283: Move binning to scan modes
      media: i2c: imx283: Move minimum exposure handling to scan modes
      media: i2c: imx283: Simplify and clamp widcut calculation
      media: i2c: imx283: Account for clamp region coordinates
      media: i2c: imx283: Crop leading lines with user clamp
      media: i2c: imx283: Reduce vertical cutting
      media: i2c: imx283: Provide Native pixel array capture mode
      media: i2c: imx283: Provide a full active pixels mode
      media: i2c: imx283: Provide an effective pixel array mode
      media: i2c: imx283: Recalculate SHR on blanking changes
      media: i2c: imx283: Fix binned mode blanking timings
      media: i2c: imx283: Update exposure range on blanking changes
      media: i2c: imx283: Simplify VFLIP control setting

Stefan Klug (2):
      media: i2c: imx283: Report correct V4L2_SEL_TGT_CROP
      media: i2c: imx283: Fix handling of unsupported mbus codes

 drivers/media/i2c/imx283.c | 600 +++++++++++++++++++++++++++++----------------
 1 file changed, 393 insertions(+), 207 deletions(-)
---
base-commit: c824345288d11e269ce41b36c105715bc2286050
change-id: 20260212-mainline-imx283-v2-695ef290871f

Best regards,
-- 
--
Kieran