| Message ID | 20260612074647.3118148-1-bogdan@nimblex.net |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Quoting Bogdan Radulescu (2026-06-12 08:46:47) > Without an entry for ov08x40, the software ISP used by the simple > pipeline handler can't run AGC for this sensor and logs: > > IPASoft: Failed to create camera sensor helper for ov08x40 > > The kernel driver (drivers/media/i2c/ov08x40.c) advertises analogue- > gain register values in the range 0x80..0x07c0 with a default of 0x80, > which is the same 1/128-step encoding already used by the other > OmniVision sensors in this file (ov5675, ov8858, ov8865, ov13858). > > The sensor outputs 10-bit Bayer data and, like the other OmniVision > sensors, applies a fixed 0x40 (64 LSB) black level pedestal, which > scales to 4096 at the 16-bit width expected by blackLevel(). > > Add a helper that follows the same pattern. Tested on a Lenovo > ThinkPad X1 Carbon Gen 13 (Intel Lunar Lake, IPU7), where this is > the only front camera. > > Signed-off-by: Bogdan Radulescu <bogdan@nimblex.net> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > --- > Changes since v1: > - Drop the explanatory comment on the gain model (it is already > covered by the commit message). > - Set blackLevel_ to 4096 (0x40 at 10 bits), which was missing. > - Move the entry so the helpers stay sorted by sensor model > (ov08x40 sorts before ov2685). > > src/ipa/libipa/camera_sensor_helper.cpp | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp > index 3028197..eb9acd1 100644 > --- a/src/ipa/libipa/camera_sensor_helper.cpp > +++ b/src/ipa/libipa/camera_sensor_helper.cpp > @@ -653,6 +653,17 @@ > }; > REGISTER_CAMERA_SENSOR_HELPER("imx708", CameraSensorHelperImx708) > > +class CameraSensorHelperOv08x40 : public CameraSensorHelper > +{ > +public: > + CameraSensorHelperOv08x40() > + { > + blackLevel_ = 4096; > + gain_ = AnalogueGainLinear{ 1, 0, 0, 128 }; > + } > +}; > +REGISTER_CAMERA_SENSOR_HELPER("ov08x40", CameraSensorHelperOv08x40) > + > class CameraSensorHelperOv2685 : public CameraSensorHelper > { > public: > -- > 2.54.0
diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 3028197..eb9acd1 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -653,6 +653,17 @@ }; REGISTER_CAMERA_SENSOR_HELPER("imx708", CameraSensorHelperImx708) +class CameraSensorHelperOv08x40 : public CameraSensorHelper +{ +public: + CameraSensorHelperOv08x40() + { + blackLevel_ = 4096; + gain_ = AnalogueGainLinear{ 1, 0, 0, 128 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("ov08x40", CameraSensorHelperOv08x40) + class CameraSensorHelperOv2685 : public CameraSensorHelper { public:
Without an entry for ov08x40, the software ISP used by the simple pipeline handler can't run AGC for this sensor and logs: IPASoft: Failed to create camera sensor helper for ov08x40 The kernel driver (drivers/media/i2c/ov08x40.c) advertises analogue- gain register values in the range 0x80..0x07c0 with a default of 0x80, which is the same 1/128-step encoding already used by the other OmniVision sensors in this file (ov5675, ov8858, ov8865, ov13858). The sensor outputs 10-bit Bayer data and, like the other OmniVision sensors, applies a fixed 0x40 (64 LSB) black level pedestal, which scales to 4096 at the 16-bit width expected by blackLevel(). Add a helper that follows the same pattern. Tested on a Lenovo ThinkPad X1 Carbon Gen 13 (Intel Lunar Lake, IPU7), where this is the only front camera. Signed-off-by: Bogdan Radulescu <bogdan@nimblex.net> --- Changes since v1: - Drop the explanatory comment on the gain model (it is already covered by the commit message). - Set blackLevel_ to 4096 (0x40 at 10 bits), which was missing. - Move the entry so the helpers stay sorted by sensor model (ov08x40 sorts before ov2685). src/ipa/libipa/camera_sensor_helper.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+)