sensor: Add static properties for OV08X40
diff mbox series

Message ID 0fac6c52-6c6c-42a7-8ad4-8061d315a8ee@gmail.com
State New
Headers show
Series
  • sensor: Add static properties for OV08X40
Related show

Commit Message

Oleg Mikheev Aug. 30, 2026, 1:52 a.m. UTC
Adding the missing static sensor properties for the OV08X40 front camera
(0.7um OV08X, front cameras on Intel Meteor Lake laptops). Full report 
on the
now-working IPU6 + ov08x40 setup (kernel 7.2, libcamera, v4l2-compat shim in
Firefox/Zoom): https://gitlab.freedesktop.org/camera/libcamera/-/issues/237
Same change as branch ov08x40-properties in fork omikheev/libcamera,
commit 51a7a5c.

 From 51a7a5c90f5ae98e1aaf4bebdb06475c44368cb2 Mon Sep 17 00:00:00 2001
From: Oleg Mikheev <omikheev@gmail.com>
Date: Thu, 27 Aug 2026 21:51:15 -0400
Subject: [PATCH] sensor: Add static properties for OV08X40

The OV08X40 9.2MP sensor (0.7um pixel, front-facing camera on
multiple Intel Meteor Lake laptop platforms) has no static sensor
properties, so libcamera falls back to generic defaults (including
an unverified unit cell size) for its AEC/AWB computation.

Add the unit cell size (700nm, per the OVT OV08X product spec) and
the test pattern modes matching the in-tree ov08x40 driver's
test_pattern control (0 = Off, 1 = Color Bars,
2 = Color Bars Fade To Gray).

Signed-off-by: Oleg Mikheev <omikheev@gmail.com>
---
  src/libcamera/sensor/camera_sensor_properties.cpp | 13 +++++++++++++
  1 file changed, 13 insertions(+)

  			.testPatternModes = {

Comments

Barnabás Pőcze Sept. 2, 2026, 11:15 a.m. UTC | #1
2026. 08. 30. 3:52 keltezéssel, Oleg Mikheev írta:
> Adding the missing static sensor properties for the OV08X40 front camera
> (0.7um OV08X, front cameras on Intel Meteor Lake laptops). Full report on the
> now-working IPU6 + ov08x40 setup (kernel 7.2, libcamera, v4l2-compat shim in
> Firefox/Zoom): https://gitlab.freedesktop.org/camera/libcamera/-/issues/237
> Same change as branch ov08x40-properties in fork omikheev/libcamera,
> commit 51a7a5c.
> 
>  From 51a7a5c90f5ae98e1aaf4bebdb06475c44368cb2 Mon Sep 17 00:00:00 2001
> From: Oleg Mikheev <omikheev@gmail.com>
> Date: Thu, 27 Aug 2026 21:51:15 -0400
> Subject: [PATCH] sensor: Add static properties for OV08X40
> 
> The OV08X40 9.2MP sensor (0.7um pixel, front-facing camera on
> multiple Intel Meteor Lake laptop platforms) has no static sensor
> properties, so libcamera falls back to generic defaults (including
> an unverified unit cell size) for its AEC/AWB computation.
> 
> Add the unit cell size (700nm, per the OVT OV08X product spec) and
> the test pattern modes matching the in-tree ov08x40 driver's
> test_pattern control (0 = Off, 1 = Color Bars,
> 2 = Color Bars Fade To Gray).

Something is a bit off with the text here. Seems like you added more text
before sending the patch? Could you please resend with proper formatting?


> 
> Signed-off-by: Oleg Mikheev <omikheev@gmail.com>
> ---
>   src/libcamera/sensor/camera_sensor_properties.cpp | 13 +++++++++++++
>   1 file changed, 13 insertions(+)
> 
> diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp
> index 819f07b..fab8f7c 100644
> --- a/src/libcamera/sensor/camera_sensor_properties.cpp
> +++ b/src/libcamera/sensor/camera_sensor_properties.cpp
> @@ -389,6 +389,19 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen
>                   .hblankDelay = 2
>               },
>           } },
> +        { "ov08x40", {
> +            .unitCellSize = { 700, 700 },

https://www.ovt.com/wp-content/uploads/2022/09/OV08X-PB-v1.0-WEB.pdf says

   pixel size: 0.702 μm x 0.702 μm

or am I looking at the wrong thing?


> +            .testPatternModes = {
> +                { controls::draft::TestPatternModeOff, 0 },
> +                { controls::draft::TestPatternModeColorBars, 1 },
> +                { controls::draft::TestPatternModeColorBarsFadeToGray, 2 },
> +                /*
> +                 * No corresponding test pattern mode for:
> +                 * 3: "Vertical Color Bar Type 3",
> +                 * 4: "Vertical Color Bar Type 4"
> +                 */
> +            },
> +        } },
>           { "ov2685", {
>               .unitCellSize = { 1750, 1750 },
>               .testPatternModes = {
Oleg Mikheev Sept. 14, 2026, 5 a.m. UTC | #2
Gentle reminder on this one, first posted August 30th.

It's a small, self-contained data addition for the OV08X40 front cameras 
on Meteor Lake laptops: the libipa sensor helper (gain model) is already 
upstream, and this entry fills in the remaining static sensor properties 
(700nm unit cell, test-pattern modes) so the simple pipeline's AEC/AWB 
uses verified numbers instead of unverified fallback defaults.

Verified on HP Spectre 2025 (MTL, IPU6, kernel 7.2, libcamera, qcam/cam 
streaming with swISP); full context in:

https://gitlab.freedesktop.org/camera/libcamera/-/issues/237

same diff as

https://gitlab.freedesktop.org/omikheev/libcamera/-/commit/51a7a5c

Happy to change anything or provide more information.

Oleg

On 8/29/26 9:52 PM, Oleg Mikheev wrote:
> Adding the missing static sensor properties for the OV08X40 front camera
> (0.7um OV08X, front cameras on Intel Meteor Lake laptops). Full report 
> on the
> now-working IPU6 + ov08x40 setup (kernel 7.2, libcamera, v4l2-compat 
> shim in
> Firefox/Zoom): https://gitlab.freedesktop.org/camera/libcamera/-/issues/237
> Same change as branch ov08x40-properties in fork omikheev/libcamera,
> commit 51a7a5c.
> 
>  From 51a7a5c90f5ae98e1aaf4bebdb06475c44368cb2 Mon Sep 17 00:00:00 2001
> From: Oleg Mikheev <omikheev@gmail.com>
> Date: Thu, 27 Aug 2026 21:51:15 -0400
> Subject: [PATCH] sensor: Add static properties for OV08X40
> 
> The OV08X40 9.2MP sensor (0.7um pixel, front-facing camera on
> multiple Intel Meteor Lake laptop platforms) has no static sensor
> properties, so libcamera falls back to generic defaults (including
> an unverified unit cell size) for its AEC/AWB computation.
> 
> Add the unit cell size (700nm, per the OVT OV08X product spec) and
> the test pattern modes matching the in-tree ov08x40 driver's
> test_pattern control (0 = Off, 1 = Color Bars,
> 2 = Color Bars Fade To Gray).
> 
> Signed-off-by: Oleg Mikheev <omikheev@gmail.com>
> ---
>   src/libcamera/sensor/camera_sensor_properties.cpp | 13 +++++++++++++
>   1 file changed, 13 insertions(+)
> 
> diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/ 
> libcamera/sensor/camera_sensor_properties.cpp
> index 819f07b..fab8f7c 100644
> --- a/src/libcamera/sensor/camera_sensor_properties.cpp
> +++ b/src/libcamera/sensor/camera_sensor_properties.cpp
> @@ -389,6 +389,19 @@ const CameraSensorProperties 
> *CameraSensorProperties::get(const std::string &sen
>                   .hblankDelay = 2
>               },
>           } },
> +        { "ov08x40", {
> +            .unitCellSize = { 700, 700 },
> +            .testPatternModes = {
> +                { controls::draft::TestPatternModeOff, 0 },
> +                { controls::draft::TestPatternModeColorBars, 1 },
> +                { controls::draft::TestPatternModeColorBarsFadeToGray, 
> 2 },
> +                /*
> +                 * No corresponding test pattern mode for:
> +                 * 3: "Vertical Color Bar Type 3",
> +                 * 4: "Vertical Color Bar Type 4"
> +                 */
> +            },
> +        } },
>           { "ov2685", {
>               .unitCellSize = { 1750, 1750 },
>               .testPatternModes = {
Oleg Mikheev Sept. 14, 2026, 7:35 a.m. UTC | #3
I'm terribly sorry; I missed this email from you.

Regarding formatting: you are right, I pasted the intro paragraph before
the patch. My first email patch.

On the pixel size: you're right again. I had taken the rounded "0.7-micron"
number from the overview instead. So the value
should be 702, not 700.

I've also just realized that this post is a duplicate: James Alexander
posted "[PATCH] libcamera: camera_sensor_properties: Add OmniVision OV08X40
properties" on Aug 16[1], and Jacopo is already reviewing it[2].

I'll withdraw this patch, and my fork branch is obsolete.

[1]
https://lists.libcamera.org/pipermail/libcamera-devel/2026-August/061219.html
[2]
https://lists.libcamera.org/pipermail/libcamera-devel/2026-August/061329.html


On Wed, Sep 2, 2026 at 7:15 AM Barnabás Pőcze <
barnabas.pocze@ideasonboard.com> wrote:

> 2026. 08. 30. 3:52 keltezéssel, Oleg Mikheev írta:
> > Adding the missing static sensor properties for the OV08X40 front camera
> > (0.7um OV08X, front cameras on Intel Meteor Lake laptops). Full report
> on the
> > now-working IPU6 + ov08x40 setup (kernel 7.2, libcamera, v4l2-compat
> shim in
> > Firefox/Zoom):
> https://gitlab.freedesktop.org/camera/libcamera/-/issues/237
> > Same change as branch ov08x40-properties in fork omikheev/libcamera,
> > commit 51a7a5c.
> >
> >  From 51a7a5c90f5ae98e1aaf4bebdb06475c44368cb2 Mon Sep 17 00:00:00 2001
> > From: Oleg Mikheev <omikheev@gmail.com>
> > Date: Thu, 27 Aug 2026 21:51:15 -0400
> > Subject: [PATCH] sensor: Add static properties for OV08X40
> >
> > The OV08X40 9.2MP sensor (0.7um pixel, front-facing camera on
> > multiple Intel Meteor Lake laptop platforms) has no static sensor
> > properties, so libcamera falls back to generic defaults (including
> > an unverified unit cell size) for its AEC/AWB computation.
> >
> > Add the unit cell size (700nm, per the OVT OV08X product spec) and
> > the test pattern modes matching the in-tree ov08x40 driver's
> > test_pattern control (0 = Off, 1 = Color Bars,
> > 2 = Color Bars Fade To Gray).
>
> Something is a bit off with the text here. Seems like you added more text
> before sending the patch? Could you please resend with proper formatting?
>
>
> >
> > Signed-off-by: Oleg Mikheev <omikheev@gmail.com>
> > ---
> >   src/libcamera/sensor/camera_sensor_properties.cpp | 13 +++++++++++++
> >   1 file changed, 13 insertions(+)
> >
> > diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp
> b/src/libcamera/sensor/camera_sensor_properties.cpp
> > index 819f07b..fab8f7c 100644
> > --- a/src/libcamera/sensor/camera_sensor_properties.cpp
> > +++ b/src/libcamera/sensor/camera_sensor_properties.cpp
> > @@ -389,6 +389,19 @@ const CameraSensorProperties
> *CameraSensorProperties::get(const std::string &sen
> >                   .hblankDelay = 2
> >               },
> >           } },
> > +        { "ov08x40", {
> > +            .unitCellSize = { 700, 700 },
>
> https://www.ovt.com/wp-content/uploads/2022/09/OV08X-PB-v1.0-WEB.pdf says
>
>    pixel size: 0.702 μm x 0.702 μm
>
> or am I looking at the wrong thing?
>
>
> > +            .testPatternModes = {
> > +                { controls::draft::TestPatternModeOff, 0 },
> > +                { controls::draft::TestPatternModeColorBars, 1 },
> > +                { controls::draft::TestPatternModeColorBarsFadeToGray,
> 2 },
> > +                /*
> > +                 * No corresponding test pattern mode for:
> > +                 * 3: "Vertical Color Bar Type 3",
> > +                 * 4: "Vertical Color Bar Type 4"
> > +                 */
> > +            },
> > +        } },
> >           { "ov2685", {
> >               .unitCellSize = { 1750, 1750 },
> >               .testPatternModes = {
>
>

Patch
diff mbox series

diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp 
b/src/libcamera/sensor/camera_sensor_properties.cpp
index 819f07b..fab8f7c 100644
--- a/src/libcamera/sensor/camera_sensor_properties.cpp
+++ b/src/libcamera/sensor/camera_sensor_properties.cpp
@@ -389,6 +389,19 @@  const CameraSensorProperties 
*CameraSensorProperties::get(const std::string &sen
  				.hblankDelay = 2
  			},
  		} },
+		{ "ov08x40", {
+			.unitCellSize = { 700, 700 },
+			.testPatternModes = {
+				{ controls::draft::TestPatternModeOff, 0 },
+				{ controls::draft::TestPatternModeColorBars, 1 },
+				{ controls::draft::TestPatternModeColorBarsFadeToGray, 2 },
+				/*
+				 * No corresponding test pattern mode for:
+				 * 3: "Vertical Color Bar Type 3",
+				 * 4: "Vertical Color Bar Type 4"
+				 */
+			},
+		} },
  		{ "ov2685", {
  			.unitCellSize = { 1750, 1750 },