[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241226-imx219_fixes-v4-4-dd28383f06f7@ideasonboard.com>
Date: Thu, 26 Dec 2024 13:19:36 +0530
From: Jai Luthra <jai.luthra@...asonboard.com>
To: Dave Stevenson <dave.stevenson@...pberrypi.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
Jacopo Mondi <jacopo.mondi@...asonboard.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Jai Luthra <jai.luthra@...asonboard.com>
Subject: [PATCH v4 4/5] media: i2c: imx219: Update PLL multipliers
Switch to different PLL multipliers and FLL/LLP to achieve the same
resolution and framerate while avoiding blocky artefacts seen when using
analog binning with RAW10 format on higher resolutions [1].
These new settings match the register sequence generated for
1640x1232@...ps (2x2 analog binned) RAW10 mode where no artefacts are
present. The same values work for other modes as well. It is unclear
from the datasheet why a higher HBLANK, lower VBLANK and lower PLL
multipliers fix the artefacts seen before.
[1]: https://github.com/raspberrypi/rpicam-apps/issues/281#issuecomment-1082894118
Signed-off-by: Jai Luthra <jai.luthra@...asonboard.com>
---
drivers/media/i2c/imx219.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
index 84681e5da3e238905139fe174e9ee3cfe5fa0246..a8fcb7234c78b888cd7424629ced02cdc55a98fd 100644
--- a/drivers/media/i2c/imx219.c
+++ b/drivers/media/i2c/imx219.c
@@ -74,7 +74,7 @@
#define IMX219_FLL_MAX 0xffff
#define IMX219_VBLANK_MIN 32
#define IMX219_REG_LINE_LENGTH 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)
@@ -171,9 +171,9 @@ static const struct cci_reg_sequence imx219_common_regs[] = {
{ IMX219_REG_VTSYCK_DIV, 1 },
{ IMX219_REG_PREPLLCK_VT_DIV, 3 }, /* 0x03 = AUTO set */
{ IMX219_REG_PREPLLCK_OP_DIV, 3 }, /* 0x03 = AUTO set */
- { IMX219_REG_PLL_VT_MPY, 57 },
+ { IMX219_REG_PLL_VT_MPY, 48 },
{ IMX219_REG_OPSYCK_DIV, 1 },
- { IMX219_REG_PLL_OP_MPY, 114 },
+ { IMX219_REG_PLL_OP_MPY, 96 },
/* Undocumented registers */
{ CCI_REG8(0x455e), 0x00 },
@@ -287,25 +287,25 @@ static const struct imx219_mode supported_modes[] = {
/* 8MPix 15fps mode */
.width = 3280,
.height = 2464,
- .vts_def = 3526,
+ .vts_def = 2876,
},
{
/* 1080P 30fps cropped */
.width = 1920,
.height = 1080,
- .vts_def = 1763,
+ .vts_def = 1438,
},
{
/* 2x2 binned 30fps mode */
.width = 1640,
.height = 1232,
- .vts_def = 1763,
+ .vts_def = 1438,
},
{
/* 640x480 30fps mode */
.width = 640,
.height = 480,
- .vts_def = 1763,
+ .vts_def = 1438,
},
};
--
2.47.1
Powered by blists - more mailing lists