| Message ID | 20260717134634.2578897-2-naush@raspberrypi.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Hi Naush, Thank you for the patch. On Fri, Jul 17, 2026 at 02:42:11PM +0100, Naushir Patuck wrote: > Add the camera sensor properties and camera helper entry for the Sony > IMX355 sensor. > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com> > --- > src/ipa/libipa/camera_sensor_helper.cpp | 12 ++++++++++++ > .../sensor/camera_sensor_properties.cpp | 16 ++++++++++++++++ > 2 files changed, 28 insertions(+) > > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp > index 54a88c55bc2d..ce52c9e875ac 100644 > --- a/src/ipa/libipa/camera_sensor_helper.cpp > +++ b/src/ipa/libipa/camera_sensor_helper.cpp > @@ -617,6 +617,18 @@ public: > }; > REGISTER_CAMERA_SENSOR_HELPER("imx335", CameraSensorHelperImx335) > > +class CameraSensorHelperImx355 : public CameraSensorHelper > +{ > +public: > + CameraSensorHelperImx355() > + { > + /* From datasheet: 64 at 10bits. */ > + blackLevel_ = 4096; > + gain_ = AnalogueGainLinear{ 0, 1024, -1, 1024 }; The imx335 driver includes a comment that states /* * The sensor has an analog gain and a digital gain, both controlled * through a single gain value, expressed in 0.3dB increments. Values * from 0.0dB (0) to 30.0dB (100) apply analog gain only, higher values * up to 72.0dB (240) add further digital gain. Limit the range to * analog gain only, support for digital gain can be added separately * if needed. */ Linear gain doesn't seem to be the right model. > + } > +}; > +REGISTER_CAMERA_SENSOR_HELPER("imx355", CameraSensorHelperImx355) > + > class CameraSensorHelperImx415 : public CameraSensorHelper > { > public: > diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp > index 7685524ad189..49853f8080dc 100644 > --- a/src/libcamera/sensor/camera_sensor_properties.cpp > +++ b/src/libcamera/sensor/camera_sensor_properties.cpp > @@ -261,6 +261,22 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen > .testPatternModes = {}, > .sensorDelays = { }, > } }, > + { "imx355", { > + .unitCellSize = { 1120, 1120 }, > + .testPatternModes = { > + { controls::draft::TestPatternModeOff, 0 }, > + { controls::draft::TestPatternModeColorBars, 1 }, > + { controls::draft::TestPatternModeSolidColor, 2 }, > + { controls::draft::TestPatternModeColorBarsFadeToGray, 3 }, > + { controls::draft::TestPatternModePn9, 4 }, > + }, > + .sensorDelays = { > + .exposureDelay = 2, > + .gainDelay = 2, > + .vblankDelay = 2, > + .hblankDelay = 2 > + }, > + } }, > { "imx415", { > .unitCellSize = { 1450, 1450 }, > .testPatternModes = {},
On Fri, 17 Jul 2026 at 14:57, Laurent Pinchart < laurent.pinchart@ideasonboard.com> wrote: > Hi Naush, > > Thank you for the patch. > > On Fri, Jul 17, 2026 at 02:42:11PM +0100, Naushir Patuck wrote: > > Add the camera sensor properties and camera helper entry for the Sony > > IMX355 sensor. > > > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com> > > --- > > src/ipa/libipa/camera_sensor_helper.cpp | 12 ++++++++++++ > > .../sensor/camera_sensor_properties.cpp | 16 ++++++++++++++++ > > 2 files changed, 28 insertions(+) > > > > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp > b/src/ipa/libipa/camera_sensor_helper.cpp > > index 54a88c55bc2d..ce52c9e875ac 100644 > > --- a/src/ipa/libipa/camera_sensor_helper.cpp > > +++ b/src/ipa/libipa/camera_sensor_helper.cpp > > @@ -617,6 +617,18 @@ public: > > }; > > REGISTER_CAMERA_SENSOR_HELPER("imx335", CameraSensorHelperImx335) > > > > +class CameraSensorHelperImx355 : public CameraSensorHelper > > +{ > > +public: > > + CameraSensorHelperImx355() > > + { > > + /* From datasheet: 64 at 10bits. */ > > + blackLevel_ = 4096; > > + gain_ = AnalogueGainLinear{ 0, 1024, -1, 1024 }; > > The imx335 driver includes a comment that states > > /* > * The sensor has an analog gain and a digital gain, both > controlled > * through a single gain value, expressed in 0.3dB increments. > Values > * from 0.0dB (0) to 30.0dB (100) apply analog gain only, higher > values > * up to 72.0dB (240) add further digital gain. Limit the range to > * analog gain only, support for digital gain can be added > separately > * if needed. > */ > > Linear gain doesn't seem to be the right model. > Err, let me check that. I've used the linear gain model in userland and everything works perfectly... > > > + } > > +}; > > +REGISTER_CAMERA_SENSOR_HELPER("imx355", CameraSensorHelperImx355) > > + > > class CameraSensorHelperImx415 : public CameraSensorHelper > > { > > public: > > diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp > b/src/libcamera/sensor/camera_sensor_properties.cpp > > index 7685524ad189..49853f8080dc 100644 > > --- a/src/libcamera/sensor/camera_sensor_properties.cpp > > +++ b/src/libcamera/sensor/camera_sensor_properties.cpp > > @@ -261,6 +261,22 @@ const CameraSensorProperties > *CameraSensorProperties::get(const std::string &sen > > .testPatternModes = {}, > > .sensorDelays = { }, > > } }, > > + { "imx355", { > > + .unitCellSize = { 1120, 1120 }, > > + .testPatternModes = { > > + { controls::draft::TestPatternModeOff, 0 }, > > + { > controls::draft::TestPatternModeColorBars, 1 }, > > + { > controls::draft::TestPatternModeSolidColor, 2 }, > > + { > controls::draft::TestPatternModeColorBarsFadeToGray, 3 }, > > + { controls::draft::TestPatternModePn9, 4 }, > > + }, > > + .sensorDelays = { > > + .exposureDelay = 2, > > + .gainDelay = 2, > > + .vblankDelay = 2, > > + .hblankDelay = 2 > > + }, > > + } }, > > { "imx415", { > > .unitCellSize = { 1450, 1450 }, > > .testPatternModes = {}, > > -- > Regards, > > Laurent Pinchart >
On Fri, Jul 17, 2026 at 04:57:48PM +0300, Laurent Pinchart wrote: > Hi Naush, > > Thank you for the patch. > > On Fri, Jul 17, 2026 at 02:42:11PM +0100, Naushir Patuck wrote: > > Add the camera sensor properties and camera helper entry for the Sony > > IMX355 sensor. > > > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com> > > --- > > src/ipa/libipa/camera_sensor_helper.cpp | 12 ++++++++++++ > > .../sensor/camera_sensor_properties.cpp | 16 ++++++++++++++++ > > 2 files changed, 28 insertions(+) > > > > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp > > index 54a88c55bc2d..ce52c9e875ac 100644 > > --- a/src/ipa/libipa/camera_sensor_helper.cpp > > +++ b/src/ipa/libipa/camera_sensor_helper.cpp > > @@ -617,6 +617,18 @@ public: > > }; > > REGISTER_CAMERA_SENSOR_HELPER("imx335", CameraSensorHelperImx335) > > > > +class CameraSensorHelperImx355 : public CameraSensorHelper > > +{ > > +public: > > + CameraSensorHelperImx355() > > + { > > + /* From datasheet: 64 at 10bits. */ > > + blackLevel_ = 4096; > > + gain_ = AnalogueGainLinear{ 0, 1024, -1, 1024 }; > > The imx335 driver includes a comment that states > > /* > * The sensor has an analog gain and a digital gain, both controlled > * through a single gain value, expressed in 0.3dB increments. Values > * from 0.0dB (0) to 30.0dB (100) apply analog gain only, higher values > * up to 72.0dB (240) add further digital gain. Limit the range to > * analog gain only, support for digital gain can be added separately > * if needed. > */ > > Linear gain doesn't seem to be the right model. And I obviously confused IMX335 with IMX355. Sorry for the noise. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > + } > > +}; > > +REGISTER_CAMERA_SENSOR_HELPER("imx355", CameraSensorHelperImx355) > > + > > class CameraSensorHelperImx415 : public CameraSensorHelper > > { > > public: > > diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp > > index 7685524ad189..49853f8080dc 100644 > > --- a/src/libcamera/sensor/camera_sensor_properties.cpp > > +++ b/src/libcamera/sensor/camera_sensor_properties.cpp > > @@ -261,6 +261,22 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen > > .testPatternModes = {}, > > .sensorDelays = { }, > > } }, > > + { "imx355", { > > + .unitCellSize = { 1120, 1120 }, > > + .testPatternModes = { > > + { controls::draft::TestPatternModeOff, 0 }, > > + { controls::draft::TestPatternModeColorBars, 1 }, > > + { controls::draft::TestPatternModeSolidColor, 2 }, > > + { controls::draft::TestPatternModeColorBarsFadeToGray, 3 }, > > + { controls::draft::TestPatternModePn9, 4 }, > > + }, > > + .sensorDelays = { > > + .exposureDelay = 2, > > + .gainDelay = 2, > > + .vblankDelay = 2, > > + .hblankDelay = 2 > > + }, > > + } }, > > { "imx415", { > > .unitCellSize = { 1450, 1450 }, > > .testPatternModes = {},
On 17.07.26 15:42, Naushir Patuck wrote: > Add the camera sensor properties and camera helper entry for the Sony > IMX355 sensor. > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Tested this with the simple pipeline / softISP on a Pixel3a - seems to work great! Tested-by: Robert Mader <robert.mader@collabora.com> > --- > src/ipa/libipa/camera_sensor_helper.cpp | 12 ++++++++++++ > .../sensor/camera_sensor_properties.cpp | 16 ++++++++++++++++ > 2 files changed, 28 insertions(+) > > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp > index 54a88c55bc2d..ce52c9e875ac 100644 > --- a/src/ipa/libipa/camera_sensor_helper.cpp > +++ b/src/ipa/libipa/camera_sensor_helper.cpp > @@ -617,6 +617,18 @@ public: > }; > REGISTER_CAMERA_SENSOR_HELPER("imx335", CameraSensorHelperImx335) > > +class CameraSensorHelperImx355 : public CameraSensorHelper > +{ > +public: > + CameraSensorHelperImx355() > + { > + /* From datasheet: 64 at 10bits. */ > + blackLevel_ = 4096; > + gain_ = AnalogueGainLinear{ 0, 1024, -1, 1024 }; > + } > +}; > +REGISTER_CAMERA_SENSOR_HELPER("imx355", CameraSensorHelperImx355) > + > class CameraSensorHelperImx415 : public CameraSensorHelper > { > public: > diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp > index 7685524ad189..49853f8080dc 100644 > --- a/src/libcamera/sensor/camera_sensor_properties.cpp > +++ b/src/libcamera/sensor/camera_sensor_properties.cpp > @@ -261,6 +261,22 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen > .testPatternModes = {}, > .sensorDelays = { }, > } }, > + { "imx355", { > + .unitCellSize = { 1120, 1120 }, > + .testPatternModes = { > + { controls::draft::TestPatternModeOff, 0 }, > + { controls::draft::TestPatternModeColorBars, 1 }, > + { controls::draft::TestPatternModeSolidColor, 2 }, > + { controls::draft::TestPatternModeColorBarsFadeToGray, 3 }, > + { controls::draft::TestPatternModePn9, 4 }, > + }, > + .sensorDelays = { > + .exposureDelay = 2, > + .gainDelay = 2, > + .vblankDelay = 2, > + .hblankDelay = 2 > + }, > + } }, > { "imx415", { > .unitCellSize = { 1450, 1450 }, > .testPatternModes = {},
diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 54a88c55bc2d..ce52c9e875ac 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -617,6 +617,18 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("imx335", CameraSensorHelperImx335) +class CameraSensorHelperImx355 : public CameraSensorHelper +{ +public: + CameraSensorHelperImx355() + { + /* From datasheet: 64 at 10bits. */ + blackLevel_ = 4096; + gain_ = AnalogueGainLinear{ 0, 1024, -1, 1024 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("imx355", CameraSensorHelperImx355) + class CameraSensorHelperImx415 : public CameraSensorHelper { public: diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp index 7685524ad189..49853f8080dc 100644 --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -261,6 +261,22 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen .testPatternModes = {}, .sensorDelays = { }, } }, + { "imx355", { + .unitCellSize = { 1120, 1120 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeColorBars, 1 }, + { controls::draft::TestPatternModeSolidColor, 2 }, + { controls::draft::TestPatternModeColorBarsFadeToGray, 3 }, + { controls::draft::TestPatternModePn9, 4 }, + }, + .sensorDelays = { + .exposureDelay = 2, + .gainDelay = 2, + .vblankDelay = 2, + .hblankDelay = 2 + }, + } }, { "imx415", { .unitCellSize = { 1450, 1450 }, .testPatternModes = {},
Add the camera sensor properties and camera helper entry for the Sony IMX355 sensor. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> --- src/ipa/libipa/camera_sensor_helper.cpp | 12 ++++++++++++ .../sensor/camera_sensor_properties.cpp | 16 ++++++++++++++++ 2 files changed, 28 insertions(+)