[1/3] libcamera: camera_sensor_properties: Add IMX582, IMX586 and OV8856
diff mbox series

Message ID ioJ8nPXN2MBNRgT4B5U28pjyL8KbNNuVXRxABp3f4rV29EizfJc_CM41sGVZGFgKmk2WkpqUGm1si06zKfhXiJmqs2eJwtQFpUYAdB5uaN0=@proton.me
State Changes Requested
Headers show
Series
  • [1/3] libcamera: camera_sensor_properties: Add IMX582, IMX586 and OV8856
Related show

Commit Message

j4niwzis Aug. 2, 2026, 1:59 p.m. UTC
All three are on the Xiaomi Mi 9T: the IMX582 is its wide camera, the OV8856
its telephoto one, and the IMX586 is the same silicon as the IMX582 with phase
detection, described by the same driver.

Without an entry the unit cell falls back to one micrometre, which throws off
every field of view calculation.  The pitch is 0.8 um for the quad bayer 48
megapixel Sony parts and 1.12 um for the OV8856.

The test pattern numbering of the Sony parts is the MIPI CCS one implemented
by their register 0x0600; the OV8856 exposes the two bar patterns of its
register 0x5e00, the same its sibling the OV8858 does.

Signed-off-by: j4niwzis <j4niwzis@proton.me>
---

Comments

Laurent Pinchart Aug. 3, 2026, 1:02 a.m. UTC | #1
Hello,

On Sun, Aug 02, 2026 at 01:59:08PM +0000, j4niwzis wrote:
> All three are on the Xiaomi Mi 9T: the IMX582 is its wide camera, the OV8856
> its telephoto one, and the IMX586 is the same silicon as the IMX582 with phase
> detection, described by the same driver.
> 
> Without an entry the unit cell falls back to one micrometre, which throws off
> every field of view calculation.  The pitch is 0.8 um for the quad bayer 48
> megapixel Sony parts and 1.12 um for the OV8856.
> 
> The test pattern numbering of the Sony parts is the MIPI CCS one implemented
> by their register 0x0600; the OV8856 exposes the two bar patterns of its
> register 0x5e00, the same its sibling the OV8858 does.
> 
> Signed-off-by: j4niwzis <j4niwzis@proton.me>

We follow the same rule as the Linux kernel regarding contributor
identities. Quoting
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n409,

--------
[...] you just add a line saying::

        Signed-off-by: Random J Developer <random@developer.example.org>

using a known identity (sorry, no anonymous contributions.)
--------

The goal is to ensure submissions can be tracked in case a copyright
issue occurs. The "known identify" does not need to match a legal ID
document, but should be sufficient enough to contact you if an issue
were to arise in the future with code you have contributed.

Please feel free to reply privately if you are not comfortable
discussing this in public.

> ---
> diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp
> --- a/src/libcamera/sensor/camera_sensor_properties.cpp
> +++ b/src/libcamera/sensor/camera_sensor_properties.cpp
> @@ -325,6 +325,38 @@
>  				.hblankDelay = 3
>  			},
>  		} },
> +		{ "imx582", {
> +			.unitCellSize = { 800, 800 },
> +			.testPatternModes = {
> +				{ controls::draft::TestPatternModeOff, 0 },
> +				{ controls::draft::TestPatternModeSolidColor, 1 },
> +				{ controls::draft::TestPatternModeColorBars, 2 },
> +				{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },
> +				{ controls::draft::TestPatternModePn9, 4 },
> +			},
> +			.sensorDelays = {
> +				.exposureDelay = 2,
> +				.gainDelay = 2,
> +				.vblankDelay = 3,
> +				.hblankDelay = 3
> +			},
> +		} },
> +		{ "imx586", {
> +			.unitCellSize = { 800, 800 },
> +			.testPatternModes = {
> +				{ controls::draft::TestPatternModeOff, 0 },
> +				{ controls::draft::TestPatternModeSolidColor, 1 },
> +				{ controls::draft::TestPatternModeColorBars, 2 },
> +				{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },
> +				{ controls::draft::TestPatternModePn9, 4 },
> +			},
> +			.sensorDelays = {
> +				.exposureDelay = 2,
> +				.gainDelay = 2,
> +				.vblankDelay = 3,
> +				.hblankDelay = 3
> +			},
> +		} },
>  		{ "imx662", {
>  			.unitCellSize = { 2900, 2900 },
>  			.testPatternModes = {},
> @@ -495,6 +527,15 @@
>  				.hblankDelay = 2
>  			},
>  		} },
> +		{ "ov8856", {
> +			.unitCellSize = { 1120, 1120 },
> +			.testPatternModes = {
> +				{ controls::draft::TestPatternModeOff, 0 },
> +				{ controls::draft::TestPatternModeColorBars, 1 },
> +				{ controls::draft::TestPatternModeColorBarsFadeToGray, 2 },
> +			},
> +			.sensorDelays = { },
> +		} },
>  		{ "ov8858", {
>  			.unitCellSize = { 1120, 1120 },
>  			.testPatternModes = {
Jacopo Mondi Aug. 3, 2026, 8:01 a.m. UTC | #2
Hi

On Mon, Aug 03, 2026 at 04:02:00AM +0300, Laurent Pinchart wrote:
> Hello,
>
> On Sun, Aug 02, 2026 at 01:59:08PM +0000, j4niwzis wrote:
> > All three are on the Xiaomi Mi 9T: the IMX582 is its wide camera, the OV8856
> > its telephoto one, and the IMX586 is the same silicon as the IMX582 with phase
> > detection, described by the same driver.
> >
> > Without an entry the unit cell falls back to one micrometre, which throws off
> > every field of view calculation.  The pitch is 0.8 um for the quad bayer 48
> > megapixel Sony parts and 1.12 um for the OV8856.
> >
> > The test pattern numbering of the Sony parts is the MIPI CCS one implemented
> > by their register 0x0600; the OV8856 exposes the two bar patterns of its
> > register 0x5e00, the same its sibling the OV8858 does.
> >
> > Signed-off-by: j4niwzis <j4niwzis@proton.me>
>
> We follow the same rule as the Linux kernel regarding contributor
> identities. Quoting
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n409,
>
> --------
> [...] you just add a line saying::
>
>         Signed-off-by: Random J Developer <random@developer.example.org>
>
> using a known identity (sorry, no anonymous contributions.)
> --------
>
> The goal is to ensure submissions can be tracked in case a copyright
> issue occurs. The "known identify" does not need to match a legal ID
> document, but should be sufficient enough to contact you if an issue
> were to arise in the future with code you have contributed.
>
> Please feel free to reply privately if you are not comfortable
> discussing this in public.
>

A few more points to what Laurent said:

it appears you have sent:

[PATCH 1/3] libcamera: camera_sensor_properties: Add IMX582, IMX586 and OV8856
[PATCH 2/3] ipa: libipa: Add sensor helpers for the IMX582, IMX586 and OV8856
[PATCH 3/3] ipa: simple: Add a tuning file for the IMX582 and IMX586

but they do not appear to be sent as a thread.

Have you sent patches individually ?

What client have you used ?

Patches 2 and 3 do not apply cleanly for me

Applying: ipa: libipa: Add sensor helpers for the IMX582, IMX586 and OV8856
error: corrupt patch at .git/rebase-apply/patch:6
Patch failed at 0001 ipa: libipa: Add sensor helpers for the IMX582, IMX586 and OV8856

Applying: ipa: simple: Add a tuning file for the IMX582 and IMX586
error: corrupt patch at .git/rebase-apply/patch:6
Patch failed at 0001 ipa: simple: Add a tuning file for the IMX582 and IMX586

Have a look at Documentation/contribuing.rst, in particular
https://git-send-email.io/

Thanks
  j


> > ---
> > diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp
> > --- a/src/libcamera/sensor/camera_sensor_properties.cpp
> > +++ b/src/libcamera/sensor/camera_sensor_properties.cpp
> > @@ -325,6 +325,38 @@
> >  				.hblankDelay = 3
> >  			},
> >  		} },
> > +		{ "imx582", {
> > +			.unitCellSize = { 800, 800 },
> > +			.testPatternModes = {
> > +				{ controls::draft::TestPatternModeOff, 0 },
> > +				{ controls::draft::TestPatternModeSolidColor, 1 },
> > +				{ controls::draft::TestPatternModeColorBars, 2 },
> > +				{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },
> > +				{ controls::draft::TestPatternModePn9, 4 },
> > +			},
> > +			.sensorDelays = {
> > +				.exposureDelay = 2,
> > +				.gainDelay = 2,
> > +				.vblankDelay = 3,
> > +				.hblankDelay = 3
> > +			},
> > +		} },
> > +		{ "imx586", {
> > +			.unitCellSize = { 800, 800 },
> > +			.testPatternModes = {
> > +				{ controls::draft::TestPatternModeOff, 0 },
> > +				{ controls::draft::TestPatternModeSolidColor, 1 },
> > +				{ controls::draft::TestPatternModeColorBars, 2 },
> > +				{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },
> > +				{ controls::draft::TestPatternModePn9, 4 },
> > +			},
> > +			.sensorDelays = {
> > +				.exposureDelay = 2,
> > +				.gainDelay = 2,
> > +				.vblankDelay = 3,
> > +				.hblankDelay = 3
> > +			},
> > +		} },
> >  		{ "imx662", {
> >  			.unitCellSize = { 2900, 2900 },
> >  			.testPatternModes = {},
> > @@ -495,6 +527,15 @@
> >  				.hblankDelay = 2
> >  			},
> >  		} },
> > +		{ "ov8856", {
> > +			.unitCellSize = { 1120, 1120 },
> > +			.testPatternModes = {
> > +				{ controls::draft::TestPatternModeOff, 0 },
> > +				{ controls::draft::TestPatternModeColorBars, 1 },
> > +				{ controls::draft::TestPatternModeColorBarsFadeToGray, 2 },
> > +			},
> > +			.sensorDelays = { },
> > +		} },
> >  		{ "ov8858", {
> >  			.unitCellSize = { 1120, 1120 },
> >  			.testPatternModes = {
>
> --
> Regards,
>
> Laurent Pinchart
Dave Stevenson Aug. 3, 2026, 10:15 a.m. UTC | #3
Hi

On Sun, 2 Aug 2026 at 14:59, j4niwzis <j4niwzis@proton.me> wrote:
>
> All three are on the Xiaomi Mi 9T: the IMX582 is its wide camera, the OV8856
> its telephoto one, and the IMX586 is the same silicon as the IMX582 with phase
> detection, described by the same driver.

Have the drivers for imx582 and imx586 been posted to linux-media? I
can't find the patchset if they have.

Or are they actually CCS compliant so they can use the generic CCS driver?

  Dave

> Without an entry the unit cell falls back to one micrometre, which throws off
> every field of view calculation.  The pitch is 0.8 um for the quad bayer 48
> megapixel Sony parts and 1.12 um for the OV8856.
>
> The test pattern numbering of the Sony parts is the MIPI CCS one implemented
> by their register 0x0600; the OV8856 exposes the two bar patterns of its
> register 0x5e00, the same its sibling the OV8858 does.
>
> Signed-off-by: j4niwzis <j4niwzis@proton.me>
> ---
> diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp
> --- a/src/libcamera/sensor/camera_sensor_properties.cpp
> +++ b/src/libcamera/sensor/camera_sensor_properties.cpp
> @@ -325,6 +325,38 @@
>                                 .hblankDelay = 3
>                         },
>                 } },
> +               { "imx582", {
> +                       .unitCellSize = { 800, 800 },
> +                       .testPatternModes = {
> +                               { controls::draft::TestPatternModeOff, 0 },
> +                               { controls::draft::TestPatternModeSolidColor, 1 },
> +                               { controls::draft::TestPatternModeColorBars, 2 },
> +                               { controls::draft::TestPatternModeColorBarsFadeToGray, 3 },
> +                               { controls::draft::TestPatternModePn9, 4 },
> +                       },
> +                       .sensorDelays = {
> +                               .exposureDelay = 2,
> +                               .gainDelay = 2,
> +                               .vblankDelay = 3,
> +                               .hblankDelay = 3
> +                       },
> +               } },
> +               { "imx586", {
> +                       .unitCellSize = { 800, 800 },
> +                       .testPatternModes = {
> +                               { controls::draft::TestPatternModeOff, 0 },
> +                               { controls::draft::TestPatternModeSolidColor, 1 },
> +                               { controls::draft::TestPatternModeColorBars, 2 },
> +                               { controls::draft::TestPatternModeColorBarsFadeToGray, 3 },
> +                               { controls::draft::TestPatternModePn9, 4 },
> +                       },
> +                       .sensorDelays = {
> +                               .exposureDelay = 2,
> +                               .gainDelay = 2,
> +                               .vblankDelay = 3,
> +                               .hblankDelay = 3
> +                       },
> +               } },
>                 { "imx662", {
>                         .unitCellSize = { 2900, 2900 },
>                         .testPatternModes = {},
> @@ -495,6 +527,15 @@
>                                 .hblankDelay = 2
>                         },
>                 } },
> +               { "ov8856", {
> +                       .unitCellSize = { 1120, 1120 },
> +                       .testPatternModes = {
> +                               { controls::draft::TestPatternModeOff, 0 },
> +                               { controls::draft::TestPatternModeColorBars, 1 },
> +                               { controls::draft::TestPatternModeColorBarsFadeToGray, 2 },
> +                       },
> +                       .sensorDelays = { },
> +               } },
>                 { "ov8858", {
>                         .unitCellSize = { 1120, 1120 },
>                         .testPatternModes = {
> --
> 2.51.0

Patch
diff mbox series

diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp
--- a/src/libcamera/sensor/camera_sensor_properties.cpp
+++ b/src/libcamera/sensor/camera_sensor_properties.cpp
@@ -325,6 +325,38 @@ 
 				.hblankDelay = 3
 			},
 		} },
+		{ "imx582", {
+			.unitCellSize = { 800, 800 },
+			.testPatternModes = {
+				{ controls::draft::TestPatternModeOff, 0 },
+				{ controls::draft::TestPatternModeSolidColor, 1 },
+				{ controls::draft::TestPatternModeColorBars, 2 },
+				{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },
+				{ controls::draft::TestPatternModePn9, 4 },
+			},
+			.sensorDelays = {
+				.exposureDelay = 2,
+				.gainDelay = 2,
+				.vblankDelay = 3,
+				.hblankDelay = 3
+			},
+		} },
+		{ "imx586", {
+			.unitCellSize = { 800, 800 },
+			.testPatternModes = {
+				{ controls::draft::TestPatternModeOff, 0 },
+				{ controls::draft::TestPatternModeSolidColor, 1 },
+				{ controls::draft::TestPatternModeColorBars, 2 },
+				{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },
+				{ controls::draft::TestPatternModePn9, 4 },
+			},
+			.sensorDelays = {
+				.exposureDelay = 2,
+				.gainDelay = 2,
+				.vblankDelay = 3,
+				.hblankDelay = 3
+			},
+		} },
 		{ "imx662", {
 			.unitCellSize = { 2900, 2900 },
 			.testPatternModes = {},
@@ -495,6 +527,15 @@ 
 				.hblankDelay = 2
 			},
 		} },
+		{ "ov8856", {
+			.unitCellSize = { 1120, 1120 },
+			.testPatternModes = {
+				{ controls::draft::TestPatternModeOff, 0 },
+				{ controls::draft::TestPatternModeColorBars, 1 },
+				{ controls::draft::TestPatternModeColorBarsFadeToGray, 2 },
+			},
+			.sensorDelays = { },
+		} },
 		{ "ov8858", {
 			.unitCellSize = { 1120, 1120 },
 			.testPatternModes = {