Re: [PATCH] media: atomisp: ov2722: flush buffered writes before they overflow

Andy Shevchenko
2026-03-23T13:44:01Z

On Mon, Mar 23, 2026 at 04:18:04PM +0300, Dan Carpenter wrote:
> On Mon, Mar 23, 2026 at 08:17:30PM +0800, Pengpeng Hou wrote:
> > __ov2722_buf_reg_array() appends 8-bit or 16-bit values to the buffered
> > register-write payload and only checks whether it should flush after the
> > new value has already been written. When ctrl->index points at the last
> > byte of the fixed 30-byte data buffer and the next register is 16-bit,
> > the helper writes one byte past the end of the local buffer before the
> > flush threshold check runs.
> >
> > Check whether the next value fits before writing it. If not, flush the
> > current buffered write first and then append the new value.
> >
> > Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
>
> The patch is wrong and just adds dead code.

I believe the idea is not to touch sensor drivers in atomisp at all.
They all should be heavily lifted and updated and moved to generic
folder for all v4l2 cases. I believe Hans had some plans, not sure
what is the state with that now (I know he is busy with something
else).

--
With Best Regards,
Andy Shevchenko