lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <PH0PR11MB5611988F18EF02394E983AA881CB2@PH0PR11MB5611.namprd11.prod.outlook.com>
Date: Wed, 5 Mar 2025 10:22:12 +0000
From: <Shravan.Chippa@...rochip.com>
To: <kieran.bingham@...asonboard.com>, <mchehab@...nel.org>,
	<sakari.ailus@...ux.intel.com>
CC: <linux-media@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<Conor.Dooley@...rochip.com>, <Valentina.FernandezAlanis@...rochip.com>,
	<Praveen.Kumar@...rochip.com>
Subject: RE: [PATCH V7 4/4] media: i2c: imx334: add modes for 720p and 480p
 resolutions

Hi Kieran

> -----Original Message-----
> From: Kieran Bingham <kieran.bingham@...asonboard.com>
> Sent: Wednesday, March 5, 2025 3:05 PM
> To: mchehab@...nel.org; sakari.ailus@...ux.intel.com; shravan Chippa -
> I35088 <Shravan.Chippa@...rochip.com>
> Cc: linux-media@...r.kernel.org; linux-kernel@...r.kernel.org; Conor Dooley
> - M52691 <Conor.Dooley@...rochip.com>; Valentina Fernandez Alanis -
> M63239 <Valentina.FernandezAlanis@...rochip.com>; Praveen Kumar -
> I30718 <Praveen.Kumar@...rochip.com>; shravan Chippa - I35088
> <Shravan.Chippa@...rochip.com>
> Subject: Re: [PATCH V7 4/4] media: i2c: imx334: add modes for 720p and 480p
> resolutions
> 
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> 
> Quoting shravan kumar (2025-03-05 05:14:42)
> > From: Shravan Chippa <shravan.chippa@...rochip.com>
> >
> > Added support for 1280x720@30 and 640x480@30 resolutions
> >
> > Signed-off-by: Shravan Chippa <shravan.chippa@...rochip.com>
> > ---
> >  drivers/media/i2c/imx334.c | 66
> > ++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 66 insertions(+)
> >
> > diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c
> > index a7c0bd38c9b8..8cd1eecd0143 100644
> > --- a/drivers/media/i2c/imx334.c
> > +++ b/drivers/media/i2c/imx334.c
> > @@ -314,6 +314,46 @@ static const struct imx334_reg
> common_mode_regs[] = {
> >         {0x3002, 0x00},
> >  };
> >
> > +/* Sensor mode registers for 640x480@...ps */ static const struct
> > +imx334_reg mode_640x480_regs[] = {
> > +       {0x302c, 0x70},
> > +       {0x302d, 0x06},
> 
> These two are a single 16 bit register HTRIMMING_START = 1648
> 
> > +       {0x302e, 0x80},
> > +       {0x302f, 0x02},
> 
> These two are a single 16 bit register HNUM = 640
> 
> > +       {0x3074, 0x48},
> > +       {0x3075, 0x07},
> 
> These two are a single 16 bit (well, 12 bit value) AREA3_ST_ADR_1 = 1864
> 
> > +       {0x308e, 0x49},
> > +       {0x308f, 0x07},
> 
> These two are a single 16 bit register AREA3_ST_ADR_2 = 1865
> 
> > +       {0x3076, 0xe0},
> > +       {0x3077, 0x01},
> 
> These two are a single 16 bit register AREA3_WIDTH_1 = 480
> 
> > +       {0x3090, 0xe0},
> > +       {0x3091, 0x01},
> 
> These two are a single 16 bit register AREA3_WIDTH_2 = 480
> 
> > +       {0x3308, 0xe0},
> > +       {0x3309, 0x01},
> 
> These two are a single 16 bit register Y_OUT_SIZE
> 
> Don't you think
>         { Y_OUT_SIZE, 480 },
> 
> Is so much more readable and easier to comprehend and maintain?
> 
> 
> > +       {0x30d8, 0x30},
> > +       {0x30d9, 0x0b},
> 
> These two are a single 16 bit register UNREAD_ED_ADR = 2864
> 
> > +};
> 
> I'm still sad that we can all know the names of all these registers and yet this
> is writing new tables of hex values.

Do you want me use call like bellow API with register names:
CCI_REG16_LE(0x30d8);
cci_write();
cci_multi_reg_write();
devm_cci_regmap_init_i2c();


Thanks,
Shravan
> 
> 
> --
> Kieran
> 
> 
> > +
> > +/* Sensor mode registers for 1280x720@...ps */ static const struct
> > +imx334_reg mode_1280x720_regs[] = {
> > +       {0x302c, 0x30},
> > +       {0x302d, 0x05},
> > +       {0x302e, 0x00},
> > +       {0x302f, 0x05},
> > +       {0x3074, 0x84},
> > +       {0x3075, 0x03},
> > +       {0x308e, 0x85},
> > +       {0x308f, 0x03},
> > +       {0x3076, 0xd0},
> > +       {0x3077, 0x02},
> > +       {0x3090, 0xd0},
> > +       {0x3091, 0x02},
> > +       {0x3308, 0xd0},
> > +       {0x3309, 0x02},
> > +       {0x30d8, 0x30},
> > +       {0x30d9, 0x0b},
> > +};
> > +
> >  /* Sensor mode registers for 1920x1080@...ps */  static const struct
> > imx334_reg mode_1920x1080_regs[] = {
> >         {0x302c, 0xf0},
> > @@ -433,6 +473,32 @@ static const struct imx334_mode
> supported_modes[] = {
> >                         .num_of_regs = ARRAY_SIZE(mode_1920x1080_regs),
> >                         .regs = mode_1920x1080_regs,
> >                 },
> > +       }, {
> > +               .width = 1280,
> > +               .height = 720,
> > +               .hblank = 2480,
> > +               .vblank = 1170,
> > +               .vblank_min = 45,
> > +               .vblank_max = 132840,
> > +               .pclk = 297000000,
> > +               .link_freq_idx = 1,
> > +               .reg_list = {
> > +                       .num_of_regs = ARRAY_SIZE(mode_1280x720_regs),
> > +                       .regs = mode_1280x720_regs,
> > +               },
> > +       }, {
> > +               .width = 640,
> > +               .height = 480,
> > +               .hblank = 2480,
> > +               .vblank = 1170,
> > +               .vblank_min = 45,
> > +               .vblank_max = 132840,
> > +               .pclk = 297000000,
> > +               .link_freq_idx = 1,
> > +               .reg_list = {
> > +                       .num_of_regs = ARRAY_SIZE(mode_640x480_regs),
> > +                       .regs = mode_640x480_regs,
> > +               },
> >         },
> >  };
> >
> > --
> > 2.34.1
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ