| Message ID | 20261022-mainline-imx676-v2-2-0b839f1001c0@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Quoting Jai Luthra (2026-10-22 16:48:31) > Sony IMX585 (8.4MP) and IMX676 (12.6MP) are Starvis 2 sensors. Add the > camera sensor properties for both. > > To my knowledge, all Starvis 2 sensors have the same black level and > gain models. So for the camera helper, combine the existing helpers for > other sensors from the same family (IMX662, IMX678) and use it for > IMX585 and IMX676 too. > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> > --- > src/ipa/libipa/camera_sensor_helper.cpp | 19 ++++--------------- > src/libcamera/sensor/camera_sensor_properties.cpp | 20 ++++++++++++++++++++ > 2 files changed, 24 insertions(+), 15 deletions(-) > > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp > index 5fbeefaf5e90..d8a9fe63417c 100644 > --- a/src/ipa/libipa/camera_sensor_helper.cpp > +++ b/src/ipa/libipa/camera_sensor_helper.cpp > @@ -658,29 +658,18 @@ public: > }; > REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperImx477, "imx477") > > -class CameraSensorHelperImx662 : public CameraSensorHelper > +class CameraSensorHelperStarvis2: public CameraSensorHelper > { > public: > - CameraSensorHelperImx662() > - { > - /* From datasheet: 0xc8 at 12bits. */ > - blackLevel_ = 3200; > - gain_ = AnalogueGainExp{ 1.0, expGainDb(0.3) }; > - } > -}; > -REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperImx662, "imx662") > - > -class CameraSensorHelperImx678 : public CameraSensorHelper > -{ > -public: > - CameraSensorHelperImx678() > + CameraSensorHelperStarvis2() > { > /* From datasheet: 0x32 at 10bits. */ > blackLevel_ = 3200; > gain_ = AnalogueGainExp{ 1.0, expGainDb(0.3) }; > } > }; > -REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperImx678, "imx678") > +REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperStarvis2, "imx585", "imx662", > + "imx676", "imx678") To align with the other recent additions we should provide imx675 and imx832 in here too. But those are still pending additions to the camera_sensor_properties, so should probably be added in a patch on their own. -- Kieran > > class CameraSensorHelperImx708 : public CameraSensorHelper > { > diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp > index 20cfd0bc11a6..1916e905cb7c 100644 > --- a/src/libcamera/sensor/camera_sensor_properties.cpp > +++ b/src/libcamera/sensor/camera_sensor_properties.cpp > @@ -340,6 +340,16 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen > .hblankDelay = 3 > }, > } }, > + { "imx585", { > + .unitCellSize = { 2900, 2900 }, > + .testPatternModes = {}, > + .sensorDelays = { > + .exposureDelay = 2, > + .gainDelay = 2, > + .vblankDelay = 2, > + .hblankDelay = 2 > + }, > + } }, > { "imx662", { > .unitCellSize = { 2900, 2900 }, > .testPatternModes = {}, > @@ -350,6 +360,16 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen > .hblankDelay = 2 > }, > } }, > + { "imx676", { > + .unitCellSize = { 2000, 2000 }, > + .testPatternModes = {}, > + .sensorDelays = { > + .exposureDelay = 2, > + .gainDelay = 2, > + .vblankDelay = 2, > + .hblankDelay = 2 > + }, > + } }, > { "imx678", { > .unitCellSize = { 2000, 2000 }, > .testPatternModes = {}, > > -- > 2.55.0 >
On Thu, Oct 22, 2026 at 05:20:33PM +0100, Kieran Bingham wrote: > Quoting Jai Luthra (2026-10-22 16:48:31) > > Sony IMX585 (8.4MP) and IMX676 (12.6MP) are Starvis 2 sensors. Add the > > camera sensor properties for both. > > > > To my knowledge, all Starvis 2 sensors have the same black level and > > gain models. So for the camera helper, combine the existing helpers for > > other sensors from the same family (IMX662, IMX678) and use it for > > IMX585 and IMX676 too. > > > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> > > --- > > src/ipa/libipa/camera_sensor_helper.cpp | 19 ++++--------------- > > src/libcamera/sensor/camera_sensor_properties.cpp | 20 ++++++++++++++++++++ > > 2 files changed, 24 insertions(+), 15 deletions(-) > > > > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp > > index 5fbeefaf5e90..d8a9fe63417c 100644 > > --- a/src/ipa/libipa/camera_sensor_helper.cpp > > +++ b/src/ipa/libipa/camera_sensor_helper.cpp > > @@ -658,29 +658,18 @@ public: > > }; > > REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperImx477, "imx477") > > > > -class CameraSensorHelperImx662 : public CameraSensorHelper > > +class CameraSensorHelperStarvis2: public CameraSensorHelper > > { > > public: > > - CameraSensorHelperImx662() > > - { > > - /* From datasheet: 0xc8 at 12bits. */ > > - blackLevel_ = 3200; > > - gain_ = AnalogueGainExp{ 1.0, expGainDb(0.3) }; > > - } > > -}; > > -REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperImx662, "imx662") > > - > > -class CameraSensorHelperImx678 : public CameraSensorHelper > > -{ > > -public: > > - CameraSensorHelperImx678() > > + CameraSensorHelperStarvis2() > > { > > /* From datasheet: 0x32 at 10bits. */ > > blackLevel_ = 3200; > > gain_ = AnalogueGainExp{ 1.0, expGainDb(0.3) }; > > } > > }; > > -REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperImx678, "imx678") > > +REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperStarvis2, "imx585", "imx662", > > + "imx676", "imx678") > > To align with the other recent additions we should provide imx675 and > imx832 in here too. But those are still pending additions to the > camera_sensor_properties, so should probably be added in a patch on > their own. As explained in the review of 1/3, I think it's best to keep separate helpers for sensors that have different properties. > > class CameraSensorHelperImx708 : public CameraSensorHelper > > { > > diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp > > index 20cfd0bc11a6..1916e905cb7c 100644 > > --- a/src/libcamera/sensor/camera_sensor_properties.cpp > > +++ b/src/libcamera/sensor/camera_sensor_properties.cpp > > @@ -340,6 +340,16 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen > > .hblankDelay = 3 > > }, > > } }, > > + { "imx585", { > > + .unitCellSize = { 2900, 2900 }, > > + .testPatternModes = {}, > > + .sensorDelays = { > > + .exposureDelay = 2, > > + .gainDelay = 2, > > + .vblankDelay = 2, > > + .hblankDelay = 2 > > + }, > > + } }, > > { "imx662", { > > .unitCellSize = { 2900, 2900 }, > > .testPatternModes = {}, > > @@ -350,6 +360,16 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen > > .hblankDelay = 2 > > }, > > } }, > > + { "imx676", { > > + .unitCellSize = { 2000, 2000 }, > > + .testPatternModes = {}, > > + .sensorDelays = { > > + .exposureDelay = 2, > > + .gainDelay = 2, > > + .vblankDelay = 2, > > + .hblankDelay = 2 > > + }, > > + } }, > > { "imx678", { > > .unitCellSize = { 2000, 2000 }, > > .testPatternModes = {},
diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 5fbeefaf5e90..d8a9fe63417c 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -658,29 +658,18 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperImx477, "imx477") -class CameraSensorHelperImx662 : public CameraSensorHelper +class CameraSensorHelperStarvis2: public CameraSensorHelper { public: - CameraSensorHelperImx662() - { - /* From datasheet: 0xc8 at 12bits. */ - blackLevel_ = 3200; - gain_ = AnalogueGainExp{ 1.0, expGainDb(0.3) }; - } -}; -REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperImx662, "imx662") - -class CameraSensorHelperImx678 : public CameraSensorHelper -{ -public: - CameraSensorHelperImx678() + CameraSensorHelperStarvis2() { /* From datasheet: 0x32 at 10bits. */ blackLevel_ = 3200; gain_ = AnalogueGainExp{ 1.0, expGainDb(0.3) }; } }; -REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperImx678, "imx678") +REGISTER_CAMERA_SENSOR_HELPER(CameraSensorHelperStarvis2, "imx585", "imx662", + "imx676", "imx678") class CameraSensorHelperImx708 : public CameraSensorHelper { diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp index 20cfd0bc11a6..1916e905cb7c 100644 --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -340,6 +340,16 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen .hblankDelay = 3 }, } }, + { "imx585", { + .unitCellSize = { 2900, 2900 }, + .testPatternModes = {}, + .sensorDelays = { + .exposureDelay = 2, + .gainDelay = 2, + .vblankDelay = 2, + .hblankDelay = 2 + }, + } }, { "imx662", { .unitCellSize = { 2900, 2900 }, .testPatternModes = {}, @@ -350,6 +360,16 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen .hblankDelay = 2 }, } }, + { "imx676", { + .unitCellSize = { 2000, 2000 }, + .testPatternModes = {}, + .sensorDelays = { + .exposureDelay = 2, + .gainDelay = 2, + .vblankDelay = 2, + .hblankDelay = 2 + }, + } }, { "imx678", { .unitCellSize = { 2000, 2000 }, .testPatternModes = {},