[libcamera-devel] [PATCH] libcamera: camera_sensor: Add IMX519 sensor properties

Laurent Pinchart laurent.pinchart at ideasonboard.com
Thu Dec 1 08:35:25 CET 2022


Hi Umang,

On Thu, Dec 01, 2022 at 01:45:35AM +0800, Umang Jain wrote:
> On 11/24/22 1:58 AM, Laurent Pinchart wrote:
> > On Wed, Nov 23, 2022 at 06:32:20PM +0100, Jacopo Mondi via libcamera-devel wrote:
> >> On Tue, Nov 15, 2022 at 08:48:15PM +0530, Umang Jain via libcamera-devel wrote:
> >>> Add an entry for Arducam IMX519 sensor which has 1220x1220 pixel array
> >
> > It's the pixel size, not the pixel array.
>
> ack
>
> >>> and supports four test pattern modes.
> >>>
> >>> Signed-off-by: Umang Jain <umang.jain at ideasonboard.com>
> >>> ---
> >>>   src/libcamera/camera_sensor_properties.cpp | 10 ++++++++++
> >>>   1 file changed, 10 insertions(+)
> >>>
> >>> diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp
> >>> index e5f27f06..04d80d6d 100644
> >>> --- a/src/libcamera/camera_sensor_properties.cpp
> >>> +++ b/src/libcamera/camera_sensor_properties.cpp
> >>> @@ -102,6 +102,16 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen
> >>>   			.unitCellSize = { 1550, 1550 },
> >>>   			.testPatternModes = {},
> >>>   		} },
> >>> +		{ "imx519", {
> >>> +			.unitCellSize = { 1220, 1220 },
> >>> +			.testPatternModes = {
> >>> +				{ controls::draft::TestPatternModeOff, 0 },
> >>> +				{ controls::draft::TestPatternModeColorBars, 1 },
> >>> +				{ controls::draft::TestPatternModeSolidColor, 2 },
> >>> +				{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },
> >>> +				{ controls::draft::TestPatternModePn9, 4 },
> >>> +			},
> >>> +		} },
> >>
> >> I don't have documentation, so it looks reasonable to me :)
> >>
> >> Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>
> >
> > Umang, do you have access to that camera module ? If so, have you been
> > able to compare the test patterns with the CCS specification ? If so,
> > with the commit message update,
> 
> So there are couple of things off with test patterns I obtained.
> 
> - The CCS specification say [1] for Solid Color and [2] for 100% Color 
> Bars. IMX519 got these indexes swapped while reporting via v4l2-ctl atleast

That's not an issue as such. The V4L2 test pattern control values are
driver-specific. The whole point of testPatternModes is to handle the
mapping between the V4L2 test pattern values for a particular driver and
the libcamera test pattern control values.

> - There is no 'ColorBars' and 'ColorBarsFadeToGray' patterns in my 
> testing  which comply with CCS's patterns atleast.

Then we shouldn't report those two in testPatternModes.

> What I obttained is the following:
> 
> [0]: (disabled)
> [1]: Two color bars only Aqua and Yellow (Does this count as color bars?)

That's a weird one. It may also be that the sensor is misconfigured by
the driver.

> [2]: Solid Color (white)
> [3]: Same as [1]
> [4]: PN9 seems fine
> 
> If you need visual samples let me know, I'll send it to you.
> 
> > Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> >
> >>>   		{ "ov2740", {
> >>>   			.unitCellSize = { 1400, 1400 },
> >>>   			.testPatternModes = {

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list