libcamera: camera_sensor_properties: Add OmniVision OV08X40 properties
diff mbox series

Message ID 20260816204253.2845257-1-opensource@inspiredexperts.com
State Changes Requested
Headers show
Series
  • libcamera: camera_sensor_properties: Add OmniVision OV08X40 properties
Related show

Commit Message

James Alexander Aug. 16, 2026, 8:42 p.m. UTC
The ov08x40 sensor helper is already present, but the sensor has no static
properties. Add its 700 nm unit-cell size, test-pattern mapping and two-frame
delays.

The unit-cell size comes from OmniVision's OV08X product information. The delay
values are experimental and need wider hardware validation.

Build-tested against libcamera base b8910c9a4961 and hardware-tested as part of
the complete patch set on the target HP Spectre.

Signed-off-by: James Alexander <opensource@inspiredexperts.com>
---

Comments

Jacopo Mondi Aug. 18, 2026, 10:33 a.m. UTC | #1
Hi James,

On Sun, Aug 16, 2026 at 02:42:53PM -0600, James Alexander wrote:
> The ov08x40 sensor helper is already present, but the sensor has no static

well, it's in review :)

Why not send this patch with the other ones ?

> properties. Add its 700 nm unit-cell size, test-pattern mapping and two-frame
> delays.
>
> The unit-cell size comes from OmniVision's OV08X product information. The delay
> values are experimental and need wider hardware validation.

Do you see different result compared to omitting them and using the
defaults ?

	static constexpr CameraSensorProperties::SensorDelays defaultSensorDelays = {
		.exposureDelay = 2,
		.gainDelay = 1,
		.vblankDelay = 2,
		.hblankDelay = 2,
	};


>
> Build-tested against libcamera base b8910c9a4961 and hardware-tested as part of
> the complete patch set on the target HP Spectre.
>
> Signed-off-by: James Alexander <opensource@inspiredexperts.com>
> ---
> diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp
> index 819f07b..c31f9e7 100644
> --- a/src/libcamera/sensor/camera_sensor_properties.cpp
> +++ b/src/libcamera/sensor/camera_sensor_properties.cpp
> @@ -510,6 +510,25 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen
>  				.hblankDelay = 2
>  			},
>  		} },
> +		{ "ov08x40", {
> +			.unitCellSize = { 700, 700 },
> +			.testPatternModes = {
> +				{ controls::draft::TestPatternModeOff, 0 },
> +				{ controls::draft::TestPatternModeColorBars, 1 },
> +				/*
> +				 * No corresponding test pattern mode for:
> +				 * 2: "Vertical Color Bar Type 2"
> +				 * 3: "Vertical Color Bar Type 3"
> +				 * 4: "Vertical Color Bar Type 4"
> +				 */
> +			},
> +			.sensorDelays = {
> +				.exposureDelay = 2,
> +				.gainDelay = 2,
> +				.vblankDelay = 2,
> +				.hblankDelay = 2
> +			},
> +		} },
>  		{ "ov8858", {
>  			.unitCellSize = { 1120, 1120 },
>  			.testPatternModes = {
> --
> 2.46.0
James Alexander Sept. 12, 2026, 11:35 p.m. UTC | #2
The properties patch is separate because it is independent of the tuning 
series. I don't have measurements supporting different control delays, 
so v2 drops them and uses the defaults.

On 2026-08-18 04:33, Jacopo Mondi wrote:
> Hi James,
> 
> On Sun, Aug 16, 2026 at 02:42:53PM -0600, James Alexander wrote:
>> The ov08x40 sensor helper is already present, but the sensor has no 
>> static
> 
> well, it's in review :)
> 
> Why not send this patch with the other ones ?
> 
>> properties. Add its 700 nm unit-cell size, test-pattern mapping and 
>> two-frame
>> delays.
>> 
>> The unit-cell size comes from OmniVision's OV08X product information. 
>> The delay
>> values are experimental and need wider hardware validation.
> 
> Do you see different result compared to omitting them and using the
> defaults ?
> 
> 	static constexpr CameraSensorProperties::SensorDelays 
> defaultSensorDelays = {
> 		.exposureDelay = 2,
> 		.gainDelay = 1,
> 		.vblankDelay = 2,
> 		.hblankDelay = 2,
> 	};
> 
> 
>> 
>> Build-tested against libcamera base b8910c9a4961 and hardware-tested 
>> as part of
>> the complete patch set on the target HP Spectre.
>> 
>> Signed-off-by: James Alexander <opensource@inspiredexperts.com>
>> ---
>> diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp 
>> b/src/libcamera/sensor/camera_sensor_properties.cpp
>> index 819f07b..c31f9e7 100644
>> --- a/src/libcamera/sensor/camera_sensor_properties.cpp
>> +++ b/src/libcamera/sensor/camera_sensor_properties.cpp
>> @@ -510,6 +510,25 @@ const CameraSensorProperties 
>> *CameraSensorProperties::get(const std::string &sen
>>  				.hblankDelay = 2
>>  			},
>>  		} },
>> +		{ "ov08x40", {
>> +			.unitCellSize = { 700, 700 },
>> +			.testPatternModes = {
>> +				{ controls::draft::TestPatternModeOff, 0 },
>> +				{ controls::draft::TestPatternModeColorBars, 1 },
>> +				/*
>> +				 * No corresponding test pattern mode for:
>> +				 * 2: "Vertical Color Bar Type 2"
>> +				 * 3: "Vertical Color Bar Type 3"
>> +				 * 4: "Vertical Color Bar Type 4"
>> +				 */
>> +			},
>> +			.sensorDelays = {
>> +				.exposureDelay = 2,
>> +				.gainDelay = 2,
>> +				.vblankDelay = 2,
>> +				.hblankDelay = 2
>> +			},
>> +		} },
>>  		{ "ov8858", {
>>  			.unitCellSize = { 1120, 1120 },
>>  			.testPatternModes = {
>> --
>> 2.46.0
Kieran Bingham Sept. 14, 2026, 7:43 a.m. UTC | #3
Quoting James Alexander (2026-09-13 00:35:30)
> The properties patch is separate because it is independent of the tuning 
> series. I don't have measurements supporting different control delays, 
> so v2 drops them and uses the defaults.
> 
> On 2026-08-18 04:33, Jacopo Mondi wrote:
> > Hi James,
> > 
> > On Sun, Aug 16, 2026 at 02:42:53PM -0600, James Alexander wrote:
> >> The ov08x40 sensor helper is already present, but the sensor has no 
> >> static
> > 
> > well, it's in review :)
> > 
> > Why not send this patch with the other ones ?
> > 
> >> properties. Add its 700 nm unit-cell size, test-pattern mapping and 
> >> two-frame
> >> delays.
> >> 
> >> The unit-cell size comes from OmniVision's OV08X product information. 
> >> The delay
> >> values are experimental and need wider hardware validation.
> > 
> > Do you see different result compared to omitting them and using the
> > defaults ?
> > 
> >       static constexpr CameraSensorProperties::SensorDelays 
> > defaultSensorDelays = {
> >               .exposureDelay = 2,
> >               .gainDelay = 1,
> >               .vblankDelay = 2,
> >               .hblankDelay = 2,
> >       };
> > 
> > 
> >> 
> >> Build-tested against libcamera base b8910c9a4961 and hardware-tested 
> >> as part of
> >> the complete patch set on the target HP Spectre.
> >> 
> >> Signed-off-by: James Alexander <opensource@inspiredexperts.com>
> >> ---
> >> diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp 
> >> b/src/libcamera/sensor/camera_sensor_properties.cpp
> >> index 819f07b..c31f9e7 100644
> >> --- a/src/libcamera/sensor/camera_sensor_properties.cpp
> >> +++ b/src/libcamera/sensor/camera_sensor_properties.cpp
> >> @@ -510,6 +510,25 @@ const CameraSensorProperties 
> >> *CameraSensorProperties::get(const std::string &sen
> >>                              .hblankDelay = 2
> >>                      },
> >>              } },
> >> +            { "ov08x40", {
> >> +                    .unitCellSize = { 700, 700 },

When you send a v2 can you correct this as well please ?

As noted by Barnabás in https://patchwork.libcamera.org/patch/28148/#40545

https://www.ovt.com/wp-content/uploads/2022/09/OV08X-PB-v1.0-WEB.pdf
says the unitCellSize is 702. It's arbitrary, but it may as well be
correct.

--
Kieran


> >> +                    .testPatternModes = {
> >> +                            { controls::draft::TestPatternModeOff, 0 },
> >> +                            { controls::draft::TestPatternModeColorBars, 1 },
> >> +                            /*
> >> +                             * No corresponding test pattern mode for:
> >> +                             * 2: "Vertical Color Bar Type 2"
> >> +                             * 3: "Vertical Color Bar Type 3"
> >> +                             * 4: "Vertical Color Bar Type 4"
> >> +                             */
> >> +                    },
> >> +                    .sensorDelays = {
> >> +                            .exposureDelay = 2,
> >> +                            .gainDelay = 2,
> >> +                            .vblankDelay = 2,
> >> +                            .hblankDelay = 2
> >> +                    },
> >> +            } },
> >>              { "ov8858", {
> >>                      .unitCellSize = { 1120, 1120 },
> >>                      .testPatternModes = {
> >> --
> >> 2.46.0

Patch
diff mbox series

diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp
index 819f07b..c31f9e7 100644
--- a/src/libcamera/sensor/camera_sensor_properties.cpp
+++ b/src/libcamera/sensor/camera_sensor_properties.cpp
@@ -510,6 +510,25 @@  const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen
 				.hblankDelay = 2
 			},
 		} },
+		{ "ov08x40", {
+			.unitCellSize = { 700, 700 },
+			.testPatternModes = {
+				{ controls::draft::TestPatternModeOff, 0 },
+				{ controls::draft::TestPatternModeColorBars, 1 },
+				/*
+				 * No corresponding test pattern mode for:
+				 * 2: "Vertical Color Bar Type 2"
+				 * 3: "Vertical Color Bar Type 3"
+				 * 4: "Vertical Color Bar Type 4"
+				 */
+			},
+			.sensorDelays = {
+				.exposureDelay = 2,
+				.gainDelay = 2,
+				.vblankDelay = 2,
+				.hblankDelay = 2
+			},
+		} },
 		{ "ov8858", {
 			.unitCellSize = { 1120, 1120 },
 			.testPatternModes = {