| Message ID | 20260506221945.ACDC41EA006B@mailuser.phl.internal |
|---|---|
| State | Accepted |
| Headers | show |
| Series |
|
| Related | show |
Hi, On 6-May-26 23:46, Javier Tia wrote: > Set blackLevel_ = 4096 (0x40 at 10-bit) in CameraSensorHelperOv2740. > The OV2740 kernel driver programs BLC target register 0x4003 with 0x40 > for the 180 MHz link frequency mode. This matches the same pattern > used by OV5675 and other OmniVision sensors with a 10-bit black level > of 64. > > Without this, the Simple pipeline falls back to auto-guessing the > black level, which happens to arrive at the same value but isn't > documented. More importantly, the CameraSensorHelper is the canonical > location for sensor calibration data and is used across all pipeline > handlers, not just Simple. > > Suggested-by: Robert Mader <robert.mader@collabora.com> > Signed-off-by: Javier Tia <floss@jetm.me> > Reviewed-by: Milan Zamazal <mzamazal@redhat.com> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Thanks, patch looks good to me: Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com> Regards, Hans > --- > src/ipa/libipa/camera_sensor_helper.cpp | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp > index e3e3e535..3028197e 100644 > --- a/src/ipa/libipa/camera_sensor_helper.cpp > +++ b/src/ipa/libipa/camera_sensor_helper.cpp > @@ -672,6 +672,8 @@ class CameraSensorHelperOv2740 : public CameraSensorHelper > public: > CameraSensorHelperOv2740() > { > + /* From Linux kernel driver: 0x40 at 10bits. */ > + blackLevel_ = 4096; > gain_ = AnalogueGainLinear{ 1, 0, 0, 128 }; > } > };
Hi Javier, Thank you for the patch. On Wed, May 06, 2026 at 03:46:42PM -0600, Javier Tia wrote: > Set blackLevel_ = 4096 (0x40 at 10-bit) in CameraSensorHelperOv2740. > The OV2740 kernel driver programs BLC target register 0x4003 with 0x40 > for the 180 MHz link frequency mode. This matches the same pattern > used by OV5675 and other OmniVision sensors with a 10-bit black level > of 64. > > Without this, the Simple pipeline falls back to auto-guessing the > black level, which happens to arrive at the same value but isn't > documented. More importantly, the CameraSensorHelper is the canonical > location for sensor calibration data and is used across all pipeline > handlers, not just Simple. > > Suggested-by: Robert Mader <robert.mader@collabora.com> > Signed-off-by: Javier Tia <floss@jetm.me> > Reviewed-by: Milan Zamazal <mzamazal@redhat.com> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > src/ipa/libipa/camera_sensor_helper.cpp | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp > index e3e3e535..3028197e 100644 > --- a/src/ipa/libipa/camera_sensor_helper.cpp > +++ b/src/ipa/libipa/camera_sensor_helper.cpp > @@ -672,6 +672,8 @@ class CameraSensorHelperOv2740 : public CameraSensorHelper > public: > CameraSensorHelperOv2740() > { > + /* From Linux kernel driver: 0x40 at 10bits. */ > + blackLevel_ = 4096; > gain_ = AnalogueGainLinear{ 1, 0, 0, 128 }; > } > };
diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index e3e3e535..3028197e 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -672,6 +672,8 @@ class CameraSensorHelperOv2740 : public CameraSensorHelper public: CameraSensorHelperOv2740() { + /* From Linux kernel driver: 0x40 at 10bits. */ + blackLevel_ = 4096; gain_ = AnalogueGainLinear{ 1, 0, 0, 128 }; } };