[v2,4/4] ipa: libipa: camera_sensor_helper: Add OV2740 black level
diff mbox series

Message ID 20260304232545.DDBF41EA006B@mailuser.phl.internal
State New
Headers show
Series
  • Untitled series #5821
Related show

Commit Message

Javier Tia March 4, 2026, 11:02 p.m. UTC
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>
---
 src/ipa/libipa/camera_sensor_helper.cpp | 2 ++
 1 file changed, 2 insertions(+)

Patch
diff mbox series

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 };
 	}
 };