]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
media: i2c: imx219: Increase minimum LLP to fix blocky artefacts
authorJai Luthra <jai.luthra@ideasonboard.com>
Tue, 4 Feb 2025 07:04:39 +0000 (12:34 +0530)
committerHans Verkuil <hverkuil@xs4all.nl>
Sat, 15 Feb 2025 14:23:00 +0000 (15:23 +0100)
The sensor's internal ADC supports a minimum line length of 3448 pixels,
which may be too small to use with analog binning, where ADC operates on
two lines together. Switch to a higher minimum line length of 3560
pixels to fix the blocky artefacts seen with analog binning [1].

To keep the same default framerate as before for all the modes, lower
the default fll value to compensate for the increase in llp.

[1]: https://github.com/raspberrypi/rpicam-apps/issues/281#issuecomment-1082894118

Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/i2c/imx219.c

index 72f4f7716ca1ad400a452abfedcd1dd9f4f2b8a6..41dda3f0bf59ce643dd1f3f5797e6543c760ea03 100644 (file)
@@ -74,7 +74,7 @@
 #define IMX219_FLL_MAX                 0xffff
 #define IMX219_VBLANK_MIN              32
 #define IMX219_REG_LINE_LENGTH_A       CCI_REG16(0x0162)
-#define IMX219_LLP_MIN                 0x0d78
+#define IMX219_LLP_MIN                 0x0de8
 #define IMX219_LLP_MAX                 0x7ff0
 
 #define IMX219_REG_X_ADD_STA_A         CCI_REG16(0x0164)
@@ -311,25 +311,25 @@ static const struct imx219_mode supported_modes[] = {
                /* 8MPix 15fps mode */
                .width = 3280,
                .height = 2464,
-               .fll_def = 3526,
+               .fll_def = 3415,
        },
        {
                /* 1080P 30fps cropped */
                .width = 1920,
                .height = 1080,
-               .fll_def = 1763,
+               .fll_def = 1707,
        },
        {
                /* 2x2 binned 30fps mode */
                .width = 1640,
                .height = 1232,
-               .fll_def = 1763,
+               .fll_def = 1707,
        },
        {
                /* 640x480 30fps mode */
                .width = 640,
                .height = 480,
-               .fll_def = 1763,
+               .fll_def = 1707,
        },
 };