diff --git a/drivers/media/i2c/imx708.c b/drivers/media/i2c/imx708.c index 2453923a4ae3b5..bfa9768586fa67 100644 --- a/drivers/media/i2c/imx708.c +++ b/drivers/media/i2c/imx708.c @@ -20,6 +20,14 @@ #include #include +/* + * Parameter to adjust Quad Bayer re-mosaic broken line correction strength + * (LPF_INTENSITY), used in full-resolution mode only. Set zero to disable. + */ +static int qbc_adjust = 2; +module_param(qbc_adjust, int, 0644); +MODULE_PARM_DESC(qbc_adjust, "Quad Bayer broken line correction strength [0,2-5]"); + #define IMX708_REG_VALUE_08BIT 1 #define IMX708_REG_VALUE_16BIT 2 @@ -363,8 +371,6 @@ static const struct imx708_reg mode_4608x2592_regs[] = { {0x341f, 0x20}, {0x3420, 0x00}, {0x3421, 0xd8}, - {0xC428, 0x00}, - {0xC429, 0x04}, {0x3366, 0x00}, {0x3367, 0x00}, {0x3368, 0x00}, @@ -1515,6 +1521,10 @@ static int imx708_start_streaming(struct imx708 *imx708) return ret; } + /* Quad Bayer re-mosaic adjustments (for full-resolution mode only) */ + imx708_write_reg(imx708, 0xC428, IMX708_REG_VALUE_08BIT, !qbc_adjust); + imx708_write_reg(imx708, 0xC429, IMX708_REG_VALUE_08BIT, qbc_adjust); + /* Apply customized values from user */ ret = __v4l2_ctrl_handler_setup(imx708->sd.ctrl_handler); if (ret)