| Message ID | 20260512164926.2947313-1-bogdan@nimblex.net |
|---|---|
| State | Changes Requested |
| Headers | show |
| Series |
|
| Related | show |
Hi Bogdan, Thank you for the patch. On Tue, May 12, 2026 at 07:49:26PM +0300, Bogdan Radulescu wrote: > 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). > > 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> > --- > src/ipa/libipa/camera_sensor_helper.cpp | 17 +++++++++++++++++ > 1 file changed, 17 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 > @@ -755,6 +755,23 @@ public: > }; > REGISTER_CAMERA_SENSOR_HELPER("ov64a40", CameraSensorHelperOv64a40) > > +class CameraSensorHelperOv08x40 : public CameraSensorHelper > +{ > +public: > + CameraSensorHelperOv08x40() > + { > + /* > + * The Linux kernel ov08x40 driver advertises analogue-gain > + * register values in the range 0x80..0x07c0 with a default > + * of 0x80; matching the convention used by OmniVision's other > + * 8/13MP class sensors (ov8858, ov8865, ov13858), the gain > + * multiplier is encoded as register_value / 128. > + */ I think you can drop the comment, the explanation in the commit message is enough. The black level is missing. > + gain_ = AnalogueGainLinear{ 1, 0, 0, 128 }; > + } > +}; > +REGISTER_CAMERA_SENSOR_HELPER("ov08x40", CameraSensorHelperOv08x40) Please keep entries alphabetically sorted. > + > class CameraSensorHelperOv8858 : public CameraSensorHelper > { > public:
Hello Laurent, I dropped the comments and added blackevel. It's a 10bit sensor and uses the same pedestal as the other Omnivision parts. v2 follows in this thread if I don't mess up the message ID :) Best regards, Bogdan On Thu, Jun 11, 2026 at 4:53 PM Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote: > > Hi Bogdan, > > Thank you for the patch. > > On Tue, May 12, 2026 at 07:49:26PM +0300, Bogdan Radulescu wrote: > > 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). > > > > 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> > > --- > > src/ipa/libipa/camera_sensor_helper.cpp | 17 +++++++++++++++++ > > 1 file changed, 17 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 > > @@ -755,6 +755,23 @@ public: > > }; > > REGISTER_CAMERA_SENSOR_HELPER("ov64a40", CameraSensorHelperOv64a40) > > > > +class CameraSensorHelperOv08x40 : public CameraSensorHelper > > +{ > > +public: > > + CameraSensorHelperOv08x40() > > + { > > + /* > > + * The Linux kernel ov08x40 driver advertises analogue-gain > > + * register values in the range 0x80..0x07c0 with a default > > + * of 0x80; matching the convention used by OmniVision's other > > + * 8/13MP class sensors (ov8858, ov8865, ov13858), the gain > > + * multiplier is encoded as register_value / 128. > > + */ > > I think you can drop the comment, the explanation in the commit message > is enough. > > The black level is missing. > > > + gain_ = AnalogueGainLinear{ 1, 0, 0, 128 }; > > + } > > +}; > > +REGISTER_CAMERA_SENSOR_HELPER("ov08x40", CameraSensorHelperOv08x40) > > Please keep entries alphabetically sorted. > > > + > > class CameraSensorHelperOv8858 : public CameraSensorHelper > > { > > public: > > -- > Regards, > > Laurent Pinchart
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 @@ -755,6 +755,23 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("ov64a40", CameraSensorHelperOv64a40) +class CameraSensorHelperOv08x40 : public CameraSensorHelper +{ +public: + CameraSensorHelperOv08x40() + { + /* + * The Linux kernel ov08x40 driver advertises analogue-gain + * register values in the range 0x80..0x07c0 with a default + * of 0x80; matching the convention used by OmniVision's other + * 8/13MP class sensors (ov8858, ov8865, ov13858), the gain + * multiplier is encoded as register_value / 128. + */ + gain_ = AnalogueGainLinear{ 1, 0, 0, 128 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("ov08x40", CameraSensorHelperOv08x40) + class CameraSensorHelperOv8858 : 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). 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> --- src/ipa/libipa/camera_sensor_helper.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)