| Message ID | 20260916184959.204572-1-opensource@inspiredexperts.com |
|---|---|
| State | Superseded |
| Headers | show |
| Series |
|
| Related | show |
2026. 09. 16. 20:49 keltezéssel, James Alexander írta: > The ov08x40 sensor helper is already present, but the sensor has no static > properties. This adds its documented 702 nm unit-cell size and test-pattern > mapping. > > The unit-cell size comes from OmniVision's OV08X40 product information. Control > delays remain unspecified so the common defaults are used. I'm guessing the test pattern mode mapping was derived "manually" looking at the images? Assuming that's correct, this looks ok to me. Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > > Signed-off-by: James Alexander <opensource@inspiredexperts.com> > --- > Changes in v2: > - Use the documented 0.702 um unit-cell size. > - Map test-pattern value 2 to fading colour bars. > - Use the default control delays. > > src/libcamera/sensor/camera_sensor_properties.cpp | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp > index 20cfd0bc1..f0f530f34 100644 > --- a/src/libcamera/sensor/camera_sensor_properties.cpp > +++ b/src/libcamera/sensor/camera_sensor_properties.cpp > @@ -524,6 +524,20 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen > .hblankDelay = 2 > }, > } }, > + { "ov08x40", { > + .unitCellSize = { 702, 702 }, > + .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" > + */ > + }, > + .sensorDelays = { }, > + } }, > { "ov8858", { > .unitCellSize = { 1120, 1120 }, > .testPatternModes = {
Quoting Barnabás Pőcze (2026-09-21 11:46:41) > 2026. 09. 16. 20:49 keltezéssel, James Alexander írta: > > The ov08x40 sensor helper is already present, but the sensor has no static > > properties. This adds its documented 702 nm unit-cell size and test-pattern > > mapping. > > > > The unit-cell size comes from OmniVision's OV08X40 product information. Control > > delays remain unspecified so the common defaults are used. > > I'm guessing the test pattern mode mapping was derived "manually" looking > at the images? Assuming that's correct, this looks ok to me. > > Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > Me too: Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > > > > Signed-off-by: James Alexander <opensource@inspiredexperts.com> > > --- > > Changes in v2: > > - Use the documented 0.702 um unit-cell size. > > - Map test-pattern value 2 to fading colour bars. > > - Use the default control delays. > > > > src/libcamera/sensor/camera_sensor_properties.cpp | 14 ++++++++++++++ > > 1 file changed, 14 insertions(+) > > > > diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp > > index 20cfd0bc1..f0f530f34 100644 > > --- a/src/libcamera/sensor/camera_sensor_properties.cpp > > +++ b/src/libcamera/sensor/camera_sensor_properties.cpp > > @@ -524,6 +524,20 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen > > .hblankDelay = 2 > > }, > > } }, > > + { "ov08x40", { > > + .unitCellSize = { 702, 702 }, > > + .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" > > + */ > > + }, > > + .sensorDelays = { }, > > + } }, > > { "ov8858", { > > .unitCellSize = { 1120, 1120 }, > > .testPatternModes = { >
Thanks both. To clarify, I did not derive the value 2 mapping by inspecting the pattern on this system. I adopted it from Oleg's earlier OV08X40 properties patch; the test-pattern control was not exposed by this pipeline during my hardware testing. Oleg, could you confirm whether you identified value 2 as the fade-to-gray pattern from the sensor output or another source? Thanks, James On 2026-09-21 05:54, Kieran Bingham wrote: > Quoting Barnabás Pőcze (2026-09-21 11:46:41) >> 2026. 09. 16. 20:49 keltezéssel, James Alexander írta: >> > The ov08x40 sensor helper is already present, but the sensor has no static >> > properties. This adds its documented 702 nm unit-cell size and test-pattern >> > mapping. >> > >> > The unit-cell size comes from OmniVision's OV08X40 product information. Control >> > delays remain unspecified so the common defaults are used. >> >> I'm guessing the test pattern mode mapping was derived "manually" >> looking >> at the images? Assuming that's correct, this looks ok to me. >> >> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> >> > > Me too: > > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > >> >> > >> > Signed-off-by: James Alexander <opensource@inspiredexperts.com> >> > --- >> > Changes in v2: >> > - Use the documented 0.702 um unit-cell size. >> > - Map test-pattern value 2 to fading colour bars. >> > - Use the default control delays. >> > >> > src/libcamera/sensor/camera_sensor_properties.cpp | 14 ++++++++++++++ >> > 1 file changed, 14 insertions(+) >> > >> > diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp >> > index 20cfd0bc1..f0f530f34 100644 >> > --- a/src/libcamera/sensor/camera_sensor_properties.cpp >> > +++ b/src/libcamera/sensor/camera_sensor_properties.cpp >> > @@ -524,6 +524,20 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen >> > .hblankDelay = 2 >> > }, >> > } }, >> > + { "ov08x40", { >> > + .unitCellSize = { 702, 702 }, >> > + .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" >> > + */ >> > + }, >> > + .sensorDelays = { }, >> > + } }, >> > { "ov8858", { >> > .unitCellSize = { 1120, 1120 }, >> > .testPatternModes = { >>
2026. 09. 25. 6:00 keltezéssel, James Alexander írta: > Thanks both. > > To clarify, I did not derive the value 2 mapping by inspecting the pattern on this system. I adopted it from Oleg's earlier OV08X40 properties patch; the test-pattern control was not exposed by this pipeline during my hardware testing. I presume you have access to the sensor? Then you can just start `cam -c<N> -C --sdl` (or any kind of streaming, really) and then use `v4l2-ctl -d /dev/v4l-subdev<n> -c test_pattern=<k>` and see how the image changes. (You can use `media-ctl -d<n> -p | grep -C1 Sensor` to find the subdev path.) > > Oleg, could you confirm whether you identified value 2 as the fade-to-gray pattern from the sensor output or another source? > > Thanks, > James > > On 2026-09-21 05:54, Kieran Bingham wrote: >> Quoting Barnabás Pőcze (2026-09-21 11:46:41) >>> 2026. 09. 16. 20:49 keltezéssel, James Alexander írta: >>> > The ov08x40 sensor helper is already present, but the sensor has no static >>> > properties. This adds its documented 702 nm unit-cell size and test-pattern >>> > mapping. >>> > >>> > The unit-cell size comes from OmniVision's OV08X40 product information. Control >>> > delays remain unspecified so the common defaults are used. >>> >>> I'm guessing the test pattern mode mapping was derived "manually" looking >>> at the images? Assuming that's correct, this looks ok to me. >>> >>> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> >>> >> >> Me too: >> >> >> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> >> >>> >>> > >>> > Signed-off-by: James Alexander <opensource@inspiredexperts.com> >>> > --- >>> > Changes in v2: >>> > - Use the documented 0.702 um unit-cell size. >>> > - Map test-pattern value 2 to fading colour bars. >>> > - Use the default control delays. >>> > >>> > src/libcamera/sensor/camera_sensor_properties.cpp | 14 ++++++++++++++ >>> > 1 file changed, 14 insertions(+) >>> > >>> > diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp >>> > index 20cfd0bc1..f0f530f34 100644 >>> > --- a/src/libcamera/sensor/camera_sensor_properties.cpp >>> > +++ b/src/libcamera/sensor/camera_sensor_properties.cpp >>> > @@ -524,6 +524,20 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen >>> > .hblankDelay = 2 >>> > }, >>> > } }, >>> > + { "ov08x40", { >>> > + .unitCellSize = { 702, 702 }, >>> > + .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" >>> > + */ >>> > + }, >>> > + .sensorDelays = { }, >>> > + } }, >>> > { "ov8858", { >>> > .unitCellSize = { 1120, 1120 }, >>> > .testPatternModes = { >>>
Thanks. I tested this on the HP Spectre with cam streaming and changed the control directly on /dev/v4l-subdev6. Value 2 produced six solid vertical colour bars; it did not fade to gray. Using the same procedure, value 1 did not replace the live image. The v2 mapping is therefore incorrect. I have prepared v3 mapping TestPatternModeColorBars to value 2 and leaving values 1, 3, and 4 unmapped. It applies cleanly and builds against current upstream master (0024628dae48). I will not carry the v2 review tags over to the changed patch. Thanks, James
diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp index 20cfd0bc1..f0f530f34 100644 --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -524,6 +524,20 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen .hblankDelay = 2 }, } }, + { "ov08x40", { + .unitCellSize = { 702, 702 }, + .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" + */ + }, + .sensorDelays = { }, + } }, { "ov8858", { .unitCellSize = { 1120, 1120 }, .testPatternModes = {
The ov08x40 sensor helper is already present, but the sensor has no static properties. This adds its documented 702 nm unit-cell size and test-pattern mapping. The unit-cell size comes from OmniVision's OV08X40 product information. Control delays remain unspecified so the common defaults are used. Signed-off-by: James Alexander <opensource@inspiredexperts.com> --- Changes in v2: - Use the documented 0.702 um unit-cell size. - Map test-pattern value 2 to fading colour bars. - Use the default control delays. src/libcamera/sensor/camera_sensor_properties.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+)