Re: [PATCH v1] media: i2c: alvium: Fix controls for WB/AWB
From: Sakari Ailus
Date: Wed May 06 2026 - 07:11:50 EST
Hi Martin,
On Wed, May 06, 2026 at 12:16:13PM +0200, Martin Hecht wrote:
> Hi Sakari,
>
> thank you for the comments.
>
> On 5/6/26 11:28, Sakari Ailus wrote:
> > Hi Martin,
> >
> > Thanks for the patch.
> >
> > On Tue, May 05, 2026 at 04:25:10PM +0200, Martin Hecht wrote:
> > > With that patch the controls for red-balance and blue-balance were created
> > > only if the particular camera supports that. Otherwise the pointers on
> > > the control variable are initialized with NULL to prevent side effects for
> > > clustering with AWB control.
> > >
> > > Fixes: 0a7af872915e ("media: i2c: Add support for alvium camera")
> > > Signed-off-by: Martin Hecht <mhecht73@xxxxxxxxx>
> > > ---
> > > drivers/media/i2c/alvium-csi2.c | 37 ++++++++++++++++++++-------------
> > > 1 file changed, 22 insertions(+), 15 deletions(-)
> > >
> > > diff --git a/drivers/media/i2c/alvium-csi2.c b/drivers/media/i2c/alvium-csi2.c
> > > index b62b45a4f2fc..4c6934e9e177 100644
> > > --- a/drivers/media/i2c/alvium-csi2.c
> > > +++ b/drivers/media/i2c/alvium-csi2.c
> > > @@ -2108,26 +2108,33 @@ static int alvium_ctrl_init(struct alvium_dev *alvium)
> > > 0, 0, &alvium->link_freq);
> > > ctrls->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY;
> >
> > This is a problem. Can you move setting the flags after checking the
> > handler's error status? The functions adding controls may fail and this is
> > simply a missing error check.
> >
> > Can you submit a fix, with a Fixes: tag and this patch should be rebased on
> > the fix, please?
>
> I'm preparing a separate fix for that issue. It's the same situation also
> for some other controls like pixel_rate and link_frequency but not only. Can
> I combine that into one patch for fix only that in alvium_ctrl_init?
Please do.
--
Regards,
Sakari Ailus