<div dir="ltr"><div dir="ltr">Hi Laurent,<div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 22 Jan 2023 at 18:58, Laurent Pinchart <<a href="mailto:laurent.pinchart@ideasonboard.com">laurent.pinchart@ideasonboard.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Jan 19, 2023 at 01:03:04PM +0000, Kieran Bingham via libcamera-devel wrote:<br>
> Quoting Naushir Patuck via libcamera-devel (2023-01-19 10:45:43)<br>
> > From: Nick Hollinghurst <<a href="mailto:nick.hollinghurst@raspberrypi.com" target="_blank">nick.hollinghurst@raspberrypi.com</a>><br>
> > <br>
> > The IMX708 sensor driver advertises its module variants (narrow/wide angle lens,<br>
> > IR block/pass) by modifying the media entity name string. So add duplicate<br>
> > entries for each variant.<br>
> <br>
> The duplication here is a bit of a pain. Are there any sensor properties<br>
> we might register that would change in each of these variants?<br>
> <br>
> Or should we make the CameraSensorProperties class more intelligent so<br>
> it just does the lookup on the sensor only. Of course ideally we should<br>
> be able to identify the sensor and the variant separately from the<br>
> kernel - which might not be possible right now - in which case, given<br>
> how little information is actually duplicated here I'd be fine with this<br>
> for now.<br>
<br>
I'm concerned by this too. The kernel shouldn't report different entity<br>
names for different lenses. There should thus be a single entry in the<br>
camera sensors properties table, and lens information should be reported<br>
separately.<br></blockquote><div><br></div><div>I agree this is not the tidiest thing to do.  Right now, we have no other way of<br>getting the variant details from the kernel driver into userland.  I believe<br>@Dave Stevenson raised this topic at the last Embedded Linux Conference, but no<br>consensus was reached.  Once we have a mechanism in the kernel to report lens<br>properties, we will remove this workaround.  Would a \todo suffice for now?<br></div><div><br></div><div>Regards,</div><div>Naush</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> Reviewed-by: Kieran Bingham <<a href="mailto:kieran.bingham@ideasonboard.com" target="_blank">kieran.bingham@ideasonboard.com</a>><br>
> <br>
> > Signed-off-by: Nick Hollinghurst <<a href="mailto:nick.hollinghurst@raspberrypi.com" target="_blank">nick.hollinghurst@raspberrypi.com</a>><br>
> > Signed-off-by: Naushir Patuck <<a href="mailto:naush@raspberrypi.com" target="_blank">naush@raspberrypi.com</a>><br>
> > Reviewed-by: Naushir Patuck <<a href="mailto:naush@raspberrypi.com" target="_blank">naush@raspberrypi.com</a>><br>
> > Reviewed-by: David Plowman <<a href="mailto:david.plowman@raspberrypi.com" target="_blank">david.plowman@raspberrypi.com</a>><br>
> > ---<br>
> >  src/libcamera/camera_sensor_properties.cpp | 16 ++++++++++++++++<br>
> >  1 file changed, 16 insertions(+)<br>
> > <br>
> > diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp<br>
> > index c3c2caced906..3afd500ea3be 100644<br>
> > --- a/src/libcamera/camera_sensor_properties.cpp<br>
> > +++ b/src/libcamera/camera_sensor_properties.cpp<br>
> > @@ -123,6 +123,22 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen<br>
> >                                  */<br>
> >                         },<br>
> >                 } },<br>
> > +               { "imx708", {<br>
> > +                       .unitCellSize = { 1400, 1400 },<br>
> > +                       .testPatternModes = {},<br>
> > +               } },<br>
> > +               { "imx708_noir", {<br>
> > +                       .unitCellSize = { 1400, 1400 },<br>
> > +                       .testPatternModes = {},<br>
> > +               } },<br>
> > +               { "imx708_wide", {<br>
> > +                       .unitCellSize = { 1400, 1400 },<br>
> > +                       .testPatternModes = {},<br>
> > +               } },<br>
> > +               { "imx708_wide_noir", {<br>
> > +                       .unitCellSize = { 1400, 1400 },<br>
> > +                       .testPatternModes = {},<br>
> > +               } },<br>
> >                 { "ov2740", {<br>
> >                         .unitCellSize = { 1400, 1400 },<br>
> >                         .testPatternModes = {<br>
<br>
-- <br>
Regards,<br>
<br>
Laurent Pinchart<br>
</blockquote></div></div>