[libcamera-devel] [PATCH] libipa: camera_sensor_helper: Add IMX327 helper

Jacopo Mondi jacopo.mondi at ideasonboard.com
Fri May 19 18:23:54 CEST 2023


Hello

On Fri, May 19, 2023 at 04:57:37PM +0100, Kieran Bingham via libcamera-devel wrote:
> Quoting Benjamin Bara via libcamera-devel (2023-05-19 16:48:13)
> > From: Benjamin Bara <benjamin.bara at skidata.com>
> >
> > Add support for the Sony IMX327, which is added to the kernel with
> > commit 2d41947ec2c0 ("media: i2c: imx290: Add support for imx327
> > variant"). It is basically a derivate of the IMX290, therefore also
> > derive the helper.
> >
> > Signed-off-by: Benjamin Bara <benjamin.bara at skidata.com>
> > ---
> >  src/ipa/libipa/camera_sensor_helper.cpp | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
> > index 21cdabd1..2eebd7ab 100644
> > --- a/src/ipa/libipa/camera_sensor_helper.cpp
> > +++ b/src/ipa/libipa/camera_sensor_helper.cpp
> > @@ -428,6 +428,11 @@ public:
> >  };
> >  REGISTER_CAMERA_SENSOR_HELPER("imx290", CameraSensorHelperImx290)
> >
> > +class CameraSensorHelperImx327 : public CameraSensorHelperImx290
> > +{
> > +};
> > +REGISTER_CAMERA_SENSOR_HELPER("imx327", CameraSensorHelperImx327)
>
> This looks reasonable.
>
> I wonder if we even need to have the new class at all? Does this work:
>
>
>   REGISTER_CAMERA_SENSOR_HELPER("imx290", CameraSensorHelperImx290)
>  +REGISTER_CAMERA_SENSOR_HELPER("imx327", CameraSensorHelperImx290)
>
> ?
>
> I would indeed rather add references to existing compatibles than
> duplicate entire Helper classes where the result would be identical for
> equivalent devices so either way:
>
>
> Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

With Kieran's suggestions, if possible. Either waysL
Reviewed-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>

Thanks
  j

>
> > +
> >  class CameraSensorHelperImx296 : public CameraSensorHelper
> >  {
> >  public:
> > --
> > 2.34.1
> >


More information about the libcamera-devel mailing list