From 6f1af6f578892d20f7b83fab816cae9b384f99a6 Mon Sep 17 00:00:00 2001 From: Benjamin Mugnier Date: Mon, 28 Jul 2025 11:09:14 +0200 Subject: [PATCH] libcamera: camera_sensor_properties: Add vd56g3 camera sensor Add unit cell size from the 'pixel size' element in the datasheet. Delays are set to 2 in case a setting is entered at the very end of the N frame, the N+1 frame will miss it and only the N+2 frame will use this new setting. Note that vd56g3 has a diagonal color test pattern, but does not match any description in specified test patterns and therefore is ignored. Signed-off-by: Benjamin Mugnier Reviewed-by: Naushir Patuck Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham --- .../sensor/camera_sensor_properties.cpp | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp index c9e9e148..f2973417 100644 --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -456,6 +456,27 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen }, .sensorDelays = { }, } }, + { "vd56g3", { + .unitCellSize = { 2610, 2610 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeSolidColor, 1 }, + { controls::draft::TestPatternModePn9, 6 }, + /* + * No corresponding test pattern mode for: + * 2: "Vertical Color Bars" + * 3: "Horizontal Gray Scale" + * 4: "Vertical Gray Scale" + * 5: "Diagonal Gray Scale" + */ + }, + .sensorDelays = { + .exposureDelay = 2, + .gainDelay = 2, + .vblankDelay = 2, + .hblankDelay = 2 + }, + } }, }; const auto it = sensorProps.find(sensor);