RE: [PATCH v5] media: ov08x40: Reduce start streaming time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




-----Original Message-----
From: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> 
Sent: Wednesday, January 24, 2024 7:10 PM
To: Tomasz Figa <tfiga@xxxxxxxxxxxx>
Cc: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>; Chen, Jason Z <jason.z.chen@xxxxxxxxx>; bingbu.cao@xxxxxxxxxxxxxxx; linux-media@xxxxxxxxxxxxxxx; Yeh, Andy <andy.yeh@xxxxxxxxx>; Zhang, Qingwu <qingwu.zhang@xxxxxxxxx>
Subject: Re: [PATCH v5] media: ov08x40: Reduce start streaming time

On Wed, Jan 24, 2024 at 04:27:51PM +0900, Tomasz Figa wrote:
> On Wed, Jan 24, 2024 at 4:18 PM Sergey Senozhatsky 
> <senozhatsky@xxxxxxxxxxxx> wrote:
> >
> > On (24/01/24 11:31), Chen, Jason Z wrote:
> > [..]
> > >  /* Write registers up to 4 at a time */  static int 
> > > ov08x40_write_reg(struct ov08x40 *ov08x,
> > >                            u16 reg, u32 len, u32 __val) @@ -2936,6 
> > > +1827,19 @@ static int ov08x40_start_streaming(struct ov08x40 *ov08x)
> > >               return ret;
> > >       }
> > >
> > > +     /* Use i2c burst to write register on full size registers */
> > > +     if (ov08x->cur_mode->exposure_shift == 1) {
> > > +             ret = ov08x40_burst_fill_regs(ov08x, OV08X40_REG_XTALK_FIRST_A,
> > > +                                           OV08X40_REG_XTALK_LAST_A, 0x75);
> > > +             ret = ov08x40_burst_fill_regs(ov08x, OV08X40_REG_XTALK_FIRST_B,
> > > +                                           
> > > + OV08X40_REG_XTALK_LAST_B, 0x75);
> >
> > If we have to be pedantic then second ov08x40_burst_fill_regs() 
> > overwrites whatever first ov08x40_burst_fill_regs() returns.
> >
> > But it's unlikely to be a real problem.
> 
> Hmm, good point. I guess in theory we could have a situation when the 
> first write fails and the second succeeds and no error is returned 
> ultimately... I guess I'll leave the final call on this one to Sakari, 
> as the maintainer. :)

>It's a bug, isn't it?

Yeah, thanks for pointing that out, Sergey.
Let me provide an update.

--
Sakari Ailus




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux