Re: [PATCH v3 10/17] media: i2c: os05b10: Add 1080p and 2x2 binning 720p modes

From: Jai Luthra

Date: Wed Jul 22 2026 - 02:06:04 EST


Hi Tarang,

Quoting Tarang Raval (2026-07-19 01:39:01)
> Add support for 1920x1080 and 1280x720 resolutions.
> The 1280x720 mode uses 2x2 binning.
>
> Both 10-bit and 12-bit pixel formats are supported.
>
> Signed-off-by: Tarang Raval <tarang.raval@xxxxxxxxxxxxxxxxx>
> ---
> drivers/media/i2c/os05b10.c | 120 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 120 insertions(+)
>
> diff --git a/drivers/media/i2c/os05b10.c b/drivers/media/i2c/os05b10.c
> index 3fd788bd8b20..c54b466656aa 100644
> --- a/drivers/media/i2c/os05b10.c
> +++ b/drivers/media/i2c/os05b10.c
> @@ -460,6 +460,78 @@ static const struct cci_reg_sequence mode_2592_1944_regs[] = {
> { CCI_REG8(0x4837), 0x12 },
> };
>
> +static const struct cci_reg_sequence mode_1920_1080_regs[] = {
> + { OS05B10_REG_X_ADDR_START, 0x0280 },
> + { OS05B10_REG_Y_ADDR_START, 0x01b4 },
> + { OS05B10_REG_X_ADDR_END, 0x0a0f },
> + { OS05B10_REG_Y_ADDR_END, 0x05f3 },
> + { OS05B10_REG_X_OUTPUT_SIZE, 0x0780 },
> + { OS05B10_REG_Y_OUTPUT_SIZE, 0x0438 },
> + { OS05B10_REG_HTS, 0x06d0 },
> + { OS05B10_REG_ISP_X_WIN, 0x0008 },
> + { OS05B10_REG_ISP_Y_WIN, 0x0008 },
> + { OS05B10_REG_X_INC_ODD, 0x01 },
> + { OS05B10_REG_X_INC_EVEN, 0x01 },
> + { OS05B10_REG_Y_INC_ODD, 0x01 },
> + { OS05B10_REG_Y_INC_EVEN, 0x01 },

Mode-based sensor drivers are the last option, especially if the sensor has
known registers for configuring the crop size, which seems to me is
possible here?

There's the new common raw sensor model in the works too, which can even
handle separate userspace configuration for analogue and digital crop,
subsampling (INC_ODD/INC_EVEN), binning and output size.

Could you please explore that? Adding hard-coded modes would make this
driver a mess when we move to the new model.

Thanks,
Jai