[{"id":32002,"web_url":"https://patchwork.libcamera.org/comment/32002/","msgid":"<lre7ymwa5cldr55w6yvchex73oyiavwmkgtkgfq3y2vlnoyloh@7d6jlezgj32m>","date":"2024-11-04T11:14:46","subject":"Re: [PATCH 5/6] libcamera: camera_sensor_properties: Add sensor\n\tcontrol delays","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Dan\n\nOn Thu, Oct 31, 2024 at 04:07:40PM +0000, Daniel Scally wrote:\n> Add properties covering the sensor control application delays to both\n> the list of control values and the static CameraSensorProperties\n> definitions. The values used are the defaults that're in use across\n> the library, with deviations from that taken from Raspberry Pi's\n> CamHelper class definitions.\n>\n> Initialise the properties from the static database during the same\n> CameraSensor::initStaticProperties() function that currently handles\n> the UnitCellSize.\n\nI welcome this change, but it doesn't seem to be related to the\nprevious patche ?\n\n>\n> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>\n> ---\n>\n> If anyone has a suggestion for a graceful way to set default values without\n> causing warnings due to -Wmissing-field-initializers I'm very interested...\n>\n>  .../internal/camera_sensor_properties.h       |  13 ++\n>  src/libcamera/property_ids_core.yaml          |  25 +++\n>  src/libcamera/sensor/camera_sensor.cpp        |   8 +\n>  .../sensor/camera_sensor_properties.cpp       | 167 ++++++++++++++++++\n>  4 files changed, 213 insertions(+)\n>\n> diff --git a/include/libcamera/internal/camera_sensor_properties.h b/include/libcamera/internal/camera_sensor_properties.h\n> index 480ac121..cd176b9e 100644\n> --- a/include/libcamera/internal/camera_sensor_properties.h\n> +++ b/include/libcamera/internal/camera_sensor_properties.h\n> @@ -10,6 +10,8 @@\n>  #include <map>\n>  #include <string>\n>\n> +#include <stdint.h>\n> +\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/geometry.h>\n>\n> @@ -20,6 +22,17 @@ struct CameraSensorProperties {\n>\n>  \tSize unitCellSize;\n>  \tstd::map<controls::draft::TestPatternModeEnum, int32_t> testPatternModes;\n> +\n> +\t/*\n> +\t * These values are correct for many sensors. Other sensors will need to\n> +\t * have the defaults overwritten in their CameraSensorProperties entry.\n> +\t */\n> +\tstruct {\n> +\t\tuint8_t exposureDelay;\n> +\t\tuint8_t gainDelay;\n> +\t\tuint8_t vblankDelay;\n> +\t\tuint8_t hblankDelay;\n> +\t} sensorDelays;\n>  };\n>\n>  } /* namespace libcamera */\n> diff --git a/src/libcamera/property_ids_core.yaml b/src/libcamera/property_ids_core.yaml\n> index 834454a4..a01c4014 100644\n> --- a/src/libcamera/property_ids_core.yaml\n> +++ b/src/libcamera/property_ids_core.yaml\n> @@ -701,4 +701,29 @@ controls:\n>\n>          Different cameras may report identical devices.\n>\n> +  - ExposureDelay:\n> +      type: uint8_t\n> +      description: |\n> +        The number of frames delay between an Exposure value being configured in\n> +        the sensor's registers and taking effect in the output data.\n> +\n> +  - GainDelay:\n> +      type: uint8_t\n> +      description: |\n> +        The number of frames delay between a Gain value being configured in\n> +        the sensor's registers and taking effect in the output data.\n> +\n> +  - VerticalBlankingDelay:\n> +      type: uint8_t\n> +      description: |\n> +        The number of frames delay between a Horizontal Blanking value being\n> +        configured in the sensor's registers and taking effect in the output\n> +        data.\n> +\n> +  - HorizontalBlankingDelay:\n> +      type: uint8_t\n> +      description: |\n> +        The number of frames delay between a Vertical Blanking value being\n> +        configured in the sensor's registers and taking effect in the output\n> +        data.\n\nDo we want these to be exposed to applications ??\n\nNow that we have control namespacing we can define a namespace for\ncamera sensor specific controls where to store these information as\nwell as controls used for the pipeline-IPA communication (once we move\nthe interface away from V4L2 controls).\n\n>  ...\n> diff --git a/src/libcamera/sensor/camera_sensor.cpp b/src/libcamera/sensor/camera_sensor.cpp\n> index 1b224f19..c9a3761e 100644\n> --- a/src/libcamera/sensor/camera_sensor.cpp\n> +++ b/src/libcamera/sensor/camera_sensor.cpp\n> @@ -387,6 +387,14 @@ void CameraSensor::initStaticProperties()\n>\n>  \t/* Register the properties retrieved from the sensor database. */\n>  \tproperties_.set(properties::UnitCellSize, staticProps_->unitCellSize);\n> +\tproperties_.set(properties::ExposureDelay,\n> +\t\t\tstaticProps_->sensorDelays.exposureDelay);\n> +\tproperties_.set(properties::GainDelay,\n> +\t\t\tstaticProps_->sensorDelays.gainDelay);\n> +\tproperties_.set(properties::VerticalBlankingDelay,\n> +\t\t\tstaticProps_->sensorDelays.vblankDelay);\n> +\tproperties_.set(properties::HorizontalBlankingDelay,\n> +\t\t\tstaticProps_->sensorDelays.hblankDelay);\n\nI don't think these should be part of the properties exposed to\napplications.. Or is there a reason to do so I am missing.\n\n>\n>  \tinitTestPatternModes();\n>  }\n> diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp\n> index 6d4136d0..60d59f79 100644\n> --- a/src/libcamera/sensor/camera_sensor_properties.cpp\n> +++ b/src/libcamera/sensor/camera_sensor_properties.cpp\n> @@ -41,6 +41,11 @@ LOG_DEFINE_CATEGORY(CameraSensorProperties)\n>   * \\brief Map that associates the TestPattern control value with the indexes of\n>   * the corresponding sensor test pattern modes as returned by\n>   * V4L2_CID_TEST_PATTERN.\n> + *\n> + * \\var CameraSensorProperties::sensorDelays\n> + * \\brief struct holding the number of frames delay between a control value\n> + * set and taking effect for each of exposure, gain, vertical blanking and\n> + * horizontal blanking.\n>   */\n\n\nShould we make it mandatory for all newly added helpers to specify\ndelays ? How easy is this information to get ? Do we need a fallback\nmechanism ?\n\n\n>\n>  /**\n> @@ -60,6 +65,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t{ controls::draft::TestPatternModeColorBars, 2 },\n>  \t\t\t\t{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"ar0521\", {\n>  \t\t\t.unitCellSize = { 2200, 2200 },\n> @@ -69,6 +80,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t{ controls::draft::TestPatternModeColorBars, 2 },\n>  \t\t\t\t{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"hi846\", {\n>  \t\t\t.unitCellSize = { 1120, 1120 },\n> @@ -87,6 +104,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t * 9: \"Resolution Pattern\"\n>  \t\t\t\t */\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"imx214\", {\n>  \t\t\t.unitCellSize = { 1120, 1120 },\n> @@ -97,6 +120,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },\n>  \t\t\t\t{ controls::draft::TestPatternModePn9, 4 },\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"imx219\", {\n>  \t\t\t.unitCellSize = { 1120, 1120 },\n> @@ -107,6 +136,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },\n>  \t\t\t\t{ controls::draft::TestPatternModePn9, 4 },\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"imx258\", {\n>  \t\t\t.unitCellSize = { 1120, 1120 },\n> @@ -117,34 +152,82 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },\n>  \t\t\t\t{ controls::draft::TestPatternModePn9, 4 },\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"imx283\", {\n>  \t\t\t.unitCellSize = { 2400, 2400 },\n>  \t\t\t.testPatternModes = {},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 2,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"imx290\", {\n>  \t\t\t.unitCellSize = { 2900, 2900 },\n>  \t\t\t.testPatternModes = {},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 2,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"imx296\", {\n>  \t\t\t.unitCellSize = { 3450, 3450 },\n>  \t\t\t.testPatternModes = {},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 2,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"imx327\", {\n>  \t\t\t.unitCellSize = { 2900, 2900 },\n>  \t\t\t.testPatternModes = {},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"imx335\", {\n>  \t\t\t.unitCellSize = { 2000, 2000 },\n>  \t\t\t.testPatternModes = {},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"imx415\", {\n>  \t\t\t.unitCellSize = { 1450, 1450 },\n>  \t\t\t.testPatternModes = {},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"imx477\", {\n>  \t\t\t.unitCellSize = { 1550, 1550 },\n>  \t\t\t.testPatternModes = {},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 2,\n> +\t\t\t\t.vblankDelay = 3,\n> +\t\t\t\t.hblankDelay = 3\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"imx519\", {\n>  \t\t\t.unitCellSize = { 1220, 1220 },\n> @@ -157,6 +240,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t * these two patterns do not comply with MIPI CCS v1.1 (Section 10.1).\n>  \t\t\t\t */\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 2,\n> +\t\t\t\t.vblankDelay = 3,\n> +\t\t\t\t.hblankDelay = 3\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"imx708\", {\n>  \t\t\t.unitCellSize = { 1400, 1400 },\n> @@ -167,6 +256,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },\n>  \t\t\t\t{ controls::draft::TestPatternModePn9, 4 },\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 2,\n> +\t\t\t\t.vblankDelay = 3,\n> +\t\t\t\t.hblankDelay = 3\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"ov2685\", {\n>  \t\t\t.unitCellSize = { 1750, 1750 },\n> @@ -181,6 +276,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t * 5: \"Color Square\"\n>  \t\t\t\t */\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"ov2740\", {\n>  \t\t\t.unitCellSize = { 1400, 1400 },\n> @@ -188,6 +289,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n>  \t\t\t\t{ controls::draft::TestPatternModeColorBars, 1},\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"ov4689\", {\n>  \t\t\t.unitCellSize = { 2000, 2000 },\n> @@ -201,6 +308,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t * colorBarType2 and colorBarType3.\n>  \t\t\t\t */\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"ov5640\", {\n>  \t\t\t.unitCellSize = { 1400, 1400 },\n> @@ -208,10 +321,22 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n>  \t\t\t\t{ controls::draft::TestPatternModeColorBars, 1 },\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"ov5647\", {\n>  \t\t\t.unitCellSize = { 1400, 1400 },\n>  \t\t\t.testPatternModes = {},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 2,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"ov5670\", {\n>  \t\t\t.unitCellSize = { 1120, 1120 },\n> @@ -219,6 +344,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n>  \t\t\t\t{ controls::draft::TestPatternModeColorBars, 1 },\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"ov5675\", {\n>  \t\t\t.unitCellSize = { 1120, 1120 },\n> @@ -226,6 +357,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n>  \t\t\t\t{ controls::draft::TestPatternModeColorBars, 1 },\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"ov5693\", {\n>  \t\t\t.unitCellSize = { 1400, 1400 },\n> @@ -238,6 +375,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t * Rolling Bar\".\n>  \t\t\t\t */\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"ov64a40\", {\n>  \t\t\t.unitCellSize = { 1008, 1008 },\n> @@ -251,6 +394,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t * 4: \"Vertical Color Bar Type 4\"\n>  \t\t\t\t */\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 2,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"ov8858\", {\n>  \t\t\t.unitCellSize = { 1120, 1120 },\n> @@ -264,6 +413,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t * 4: \"Vertical Color Bar Type 4\"\n>  \t\t\t\t */\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"ov8865\", {\n>  \t\t\t.unitCellSize = { 1400, 1400 },\n> @@ -278,6 +433,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t * 5: \"Color squares with rolling bar\"\n>  \t\t\t\t */\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"ov13858\", {\n>  \t\t\t.unitCellSize = { 1120, 1120 },\n> @@ -285,6 +446,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n>  \t\t\t\t{ controls::draft::TestPatternModeColorBars, 1 },\n>  \t\t\t},\n> +\t\t\t.sensorDelays = {\n> +\t\t\t\t.exposureDelay = 2,\n> +\t\t\t\t.gainDelay = 1,\n> +\t\t\t\t.vblankDelay = 2,\n> +\t\t\t\t.hblankDelay = 2\n> +\t\t\t},\n>  \t\t} },\n>  \t};\n>\n> --\n> 2.30.2\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 89F2CBDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  4 Nov 2024 11:14:56 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CAB9A653CE;\n\tMon,  4 Nov 2024 12:14:55 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 853BD653C6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  4 Nov 2024 12:14:53 +0100 (CET)","from ideasonboard.com (mob-5-90-48-188.net.vodafone.it\n\t[5.90.48.188])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BB6D122E;\n\tMon,  4 Nov 2024 12:14:44 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"NMnHF7JL\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1730718886;\n\tbh=id/bsAz805PkKMqMvkD/aw6iLxRH0nbHkGBmWAblOj4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=NMnHF7JLPo+azNxzXT5ZKWqH7iciimdPh6Sj/5hOeVmt+5T+K1dvRbeCQSlX8Z0i9\n\tp++175Ae8y4a3wqfenB8b+o00TmsfTwUznGbAVxwdXPJB1q75e5mL3DALBOlp8a/0m\n\tEu0vAQW0p5sThZKCU34OK/yI6hNlQbDPlPBS2jxY=","Date":"Mon, 4 Nov 2024 12:14:46 +0100","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Daniel Scally <dan.scally@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, mike.rudenko@gmail.com","Subject":"Re: [PATCH 5/6] libcamera: camera_sensor_properties: Add sensor\n\tcontrol delays","Message-ID":"<lre7ymwa5cldr55w6yvchex73oyiavwmkgtkgfq3y2vlnoyloh@7d6jlezgj32m>","References":"<20241031160741.253855-1-dan.scally@ideasonboard.com>\n\t<20241031160741.253855-6-dan.scally@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20241031160741.253855-6-dan.scally@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32037,"web_url":"https://patchwork.libcamera.org/comment/32037/","msgid":"<ca1266d3-0aeb-4a4d-8017-87821d5523f5@ideasonboard.com>","date":"2024-11-06T09:42:13","subject":"Re: [PATCH 5/6] libcamera: camera_sensor_properties: Add sensor\n\tcontrol delays","submitter":{"id":156,"url":"https://patchwork.libcamera.org/api/people/156/","name":"Dan Scally","email":"dan.scally@ideasonboard.com"},"content":"Hi Jacopo\n\nOn 04/11/2024 11:14, Jacopo Mondi wrote:\n> Hi Dan\n>\n> On Thu, Oct 31, 2024 at 04:07:40PM +0000, Daniel Scally wrote:\n>> Add properties covering the sensor control application delays to both\n>> the list of control values and the static CameraSensorProperties\n>> definitions. The values used are the defaults that're in use across\n>> the library, with deviations from that taken from Raspberry Pi's\n>> CamHelper class definitions.\n>>\n>> Initialise the properties from the static database during the same\n>> CameraSensor::initStaticProperties() function that currently handles\n>> the UnitCellSize.\n> I welcome this change, but it doesn't seem to be related to the\n> previous patche ?\n\n\nOnly in the sense that they all stemmed from Kieran's review of the C55 series\n\n>\n>> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>\n>> ---\n>>\n>> If anyone has a suggestion for a graceful way to set default values without\n>> causing warnings due to -Wmissing-field-initializers I'm very interested...\n>>\n>>   .../internal/camera_sensor_properties.h       |  13 ++\n>>   src/libcamera/property_ids_core.yaml          |  25 +++\n>>   src/libcamera/sensor/camera_sensor.cpp        |   8 +\n>>   .../sensor/camera_sensor_properties.cpp       | 167 ++++++++++++++++++\n>>   4 files changed, 213 insertions(+)\n>>\n>> diff --git a/include/libcamera/internal/camera_sensor_properties.h b/include/libcamera/internal/camera_sensor_properties.h\n>> index 480ac121..cd176b9e 100644\n>> --- a/include/libcamera/internal/camera_sensor_properties.h\n>> +++ b/include/libcamera/internal/camera_sensor_properties.h\n>> @@ -10,6 +10,8 @@\n>>   #include <map>\n>>   #include <string>\n>>\n>> +#include <stdint.h>\n>> +\n>>   #include <libcamera/control_ids.h>\n>>   #include <libcamera/geometry.h>\n>>\n>> @@ -20,6 +22,17 @@ struct CameraSensorProperties {\n>>\n>>   \tSize unitCellSize;\n>>   \tstd::map<controls::draft::TestPatternModeEnum, int32_t> testPatternModes;\n>> +\n>> +\t/*\n>> +\t * These values are correct for many sensors. Other sensors will need to\n>> +\t * have the defaults overwritten in their CameraSensorProperties entry.\n>> +\t */\n>> +\tstruct {\n>> +\t\tuint8_t exposureDelay;\n>> +\t\tuint8_t gainDelay;\n>> +\t\tuint8_t vblankDelay;\n>> +\t\tuint8_t hblankDelay;\n>> +\t} sensorDelays;\n>>   };\n>>\n>>   } /* namespace libcamera */\n>> diff --git a/src/libcamera/property_ids_core.yaml b/src/libcamera/property_ids_core.yaml\n>> index 834454a4..a01c4014 100644\n>> --- a/src/libcamera/property_ids_core.yaml\n>> +++ b/src/libcamera/property_ids_core.yaml\n>> @@ -701,4 +701,29 @@ controls:\n>>\n>>           Different cameras may report identical devices.\n>>\n>> +  - ExposureDelay:\n>> +      type: uint8_t\n>> +      description: |\n>> +        The number of frames delay between an Exposure value being configured in\n>> +        the sensor's registers and taking effect in the output data.\n>> +\n>> +  - GainDelay:\n>> +      type: uint8_t\n>> +      description: |\n>> +        The number of frames delay between a Gain value being configured in\n>> +        the sensor's registers and taking effect in the output data.\n>> +\n>> +  - VerticalBlankingDelay:\n>> +      type: uint8_t\n>> +      description: |\n>> +        The number of frames delay between a Horizontal Blanking value being\n>> +        configured in the sensor's registers and taking effect in the output\n>> +        data.\n>> +\n>> +  - HorizontalBlankingDelay:\n>> +      type: uint8_t\n>> +      description: |\n>> +        The number of frames delay between a Vertical Blanking value being\n>> +        configured in the sensor's registers and taking effect in the output\n>> +        data.\n> Do we want these to be exposed to applications ??\n\n\nI have no strong feelings on that I think; what makes you think that they shouldn't be?\n\n>\n> Now that we have control namespacing we can define a namespace for\n> camera sensor specific controls where to store these information as\n> well as controls used for the pipeline-IPA communication (once we move\n> the interface away from V4L2 controls).\n>\n>>   ...\n>> diff --git a/src/libcamera/sensor/camera_sensor.cpp b/src/libcamera/sensor/camera_sensor.cpp\n>> index 1b224f19..c9a3761e 100644\n>> --- a/src/libcamera/sensor/camera_sensor.cpp\n>> +++ b/src/libcamera/sensor/camera_sensor.cpp\n>> @@ -387,6 +387,14 @@ void CameraSensor::initStaticProperties()\n>>\n>>   \t/* Register the properties retrieved from the sensor database. */\n>>   \tproperties_.set(properties::UnitCellSize, staticProps_->unitCellSize);\n>> +\tproperties_.set(properties::ExposureDelay,\n>> +\t\t\tstaticProps_->sensorDelays.exposureDelay);\n>> +\tproperties_.set(properties::GainDelay,\n>> +\t\t\tstaticProps_->sensorDelays.gainDelay);\n>> +\tproperties_.set(properties::VerticalBlankingDelay,\n>> +\t\t\tstaticProps_->sensorDelays.vblankDelay);\n>> +\tproperties_.set(properties::HorizontalBlankingDelay,\n>> +\t\t\tstaticProps_->sensorDelays.hblankDelay);\n> I don't think these should be part of the properties exposed to\n> applications.. Or is there a reason to do so I am missing.\n>\n>>   \tinitTestPatternModes();\n>>   }\n>> diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp\n>> index 6d4136d0..60d59f79 100644\n>> --- a/src/libcamera/sensor/camera_sensor_properties.cpp\n>> +++ b/src/libcamera/sensor/camera_sensor_properties.cpp\n>> @@ -41,6 +41,11 @@ LOG_DEFINE_CATEGORY(CameraSensorProperties)\n>>    * \\brief Map that associates the TestPattern control value with the indexes of\n>>    * the corresponding sensor test pattern modes as returned by\n>>    * V4L2_CID_TEST_PATTERN.\n>> + *\n>> + * \\var CameraSensorProperties::sensorDelays\n>> + * \\brief struct holding the number of frames delay between a control value\n>> + * set and taking effect for each of exposure, gain, vertical blanking and\n>> + * horizontal blanking.\n>>    */\n>\n> Should we make it mandatory for all newly added helpers to specify\n> delays ? How easy is this information to get ? Do we need a fallback\n> mechanism ?\n\n\nIndeed a way to specify a default would be helpful...that was possible in the CameraSensorHelper as \nMikhail did it but I couldn't see a way for here. I think they need to be experimentally verified.\n\n>\n>\n>>   /**\n>> @@ -60,6 +65,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t{ controls::draft::TestPatternModeColorBars, 2 },\n>>   \t\t\t\t{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"ar0521\", {\n>>   \t\t\t.unitCellSize = { 2200, 2200 },\n>> @@ -69,6 +80,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t{ controls::draft::TestPatternModeColorBars, 2 },\n>>   \t\t\t\t{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"hi846\", {\n>>   \t\t\t.unitCellSize = { 1120, 1120 },\n>> @@ -87,6 +104,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t * 9: \"Resolution Pattern\"\n>>   \t\t\t\t */\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"imx214\", {\n>>   \t\t\t.unitCellSize = { 1120, 1120 },\n>> @@ -97,6 +120,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },\n>>   \t\t\t\t{ controls::draft::TestPatternModePn9, 4 },\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"imx219\", {\n>>   \t\t\t.unitCellSize = { 1120, 1120 },\n>> @@ -107,6 +136,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },\n>>   \t\t\t\t{ controls::draft::TestPatternModePn9, 4 },\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"imx258\", {\n>>   \t\t\t.unitCellSize = { 1120, 1120 },\n>> @@ -117,34 +152,82 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },\n>>   \t\t\t\t{ controls::draft::TestPatternModePn9, 4 },\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"imx283\", {\n>>   \t\t\t.unitCellSize = { 2400, 2400 },\n>>   \t\t\t.testPatternModes = {},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 2,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"imx290\", {\n>>   \t\t\t.unitCellSize = { 2900, 2900 },\n>>   \t\t\t.testPatternModes = {},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 2,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"imx296\", {\n>>   \t\t\t.unitCellSize = { 3450, 3450 },\n>>   \t\t\t.testPatternModes = {},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 2,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"imx327\", {\n>>   \t\t\t.unitCellSize = { 2900, 2900 },\n>>   \t\t\t.testPatternModes = {},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"imx335\", {\n>>   \t\t\t.unitCellSize = { 2000, 2000 },\n>>   \t\t\t.testPatternModes = {},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"imx415\", {\n>>   \t\t\t.unitCellSize = { 1450, 1450 },\n>>   \t\t\t.testPatternModes = {},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"imx477\", {\n>>   \t\t\t.unitCellSize = { 1550, 1550 },\n>>   \t\t\t.testPatternModes = {},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 2,\n>> +\t\t\t\t.vblankDelay = 3,\n>> +\t\t\t\t.hblankDelay = 3\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"imx519\", {\n>>   \t\t\t.unitCellSize = { 1220, 1220 },\n>> @@ -157,6 +240,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t * these two patterns do not comply with MIPI CCS v1.1 (Section 10.1).\n>>   \t\t\t\t */\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 2,\n>> +\t\t\t\t.vblankDelay = 3,\n>> +\t\t\t\t.hblankDelay = 3\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"imx708\", {\n>>   \t\t\t.unitCellSize = { 1400, 1400 },\n>> @@ -167,6 +256,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },\n>>   \t\t\t\t{ controls::draft::TestPatternModePn9, 4 },\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 2,\n>> +\t\t\t\t.vblankDelay = 3,\n>> +\t\t\t\t.hblankDelay = 3\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"ov2685\", {\n>>   \t\t\t.unitCellSize = { 1750, 1750 },\n>> @@ -181,6 +276,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t * 5: \"Color Square\"\n>>   \t\t\t\t */\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"ov2740\", {\n>>   \t\t\t.unitCellSize = { 1400, 1400 },\n>> @@ -188,6 +289,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n>>   \t\t\t\t{ controls::draft::TestPatternModeColorBars, 1},\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"ov4689\", {\n>>   \t\t\t.unitCellSize = { 2000, 2000 },\n>> @@ -201,6 +308,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t * colorBarType2 and colorBarType3.\n>>   \t\t\t\t */\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"ov5640\", {\n>>   \t\t\t.unitCellSize = { 1400, 1400 },\n>> @@ -208,10 +321,22 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n>>   \t\t\t\t{ controls::draft::TestPatternModeColorBars, 1 },\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"ov5647\", {\n>>   \t\t\t.unitCellSize = { 1400, 1400 },\n>>   \t\t\t.testPatternModes = {},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 2,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"ov5670\", {\n>>   \t\t\t.unitCellSize = { 1120, 1120 },\n>> @@ -219,6 +344,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n>>   \t\t\t\t{ controls::draft::TestPatternModeColorBars, 1 },\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"ov5675\", {\n>>   \t\t\t.unitCellSize = { 1120, 1120 },\n>> @@ -226,6 +357,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n>>   \t\t\t\t{ controls::draft::TestPatternModeColorBars, 1 },\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"ov5693\", {\n>>   \t\t\t.unitCellSize = { 1400, 1400 },\n>> @@ -238,6 +375,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t * Rolling Bar\".\n>>   \t\t\t\t */\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"ov64a40\", {\n>>   \t\t\t.unitCellSize = { 1008, 1008 },\n>> @@ -251,6 +394,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t * 4: \"Vertical Color Bar Type 4\"\n>>   \t\t\t\t */\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 2,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"ov8858\", {\n>>   \t\t\t.unitCellSize = { 1120, 1120 },\n>> @@ -264,6 +413,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t * 4: \"Vertical Color Bar Type 4\"\n>>   \t\t\t\t */\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"ov8865\", {\n>>   \t\t\t.unitCellSize = { 1400, 1400 },\n>> @@ -278,6 +433,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t * 5: \"Color squares with rolling bar\"\n>>   \t\t\t\t */\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t\t{ \"ov13858\", {\n>>   \t\t\t.unitCellSize = { 1120, 1120 },\n>> @@ -285,6 +446,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>>   \t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n>>   \t\t\t\t{ controls::draft::TestPatternModeColorBars, 1 },\n>>   \t\t\t},\n>> +\t\t\t.sensorDelays = {\n>> +\t\t\t\t.exposureDelay = 2,\n>> +\t\t\t\t.gainDelay = 1,\n>> +\t\t\t\t.vblankDelay = 2,\n>> +\t\t\t\t.hblankDelay = 2\n>> +\t\t\t},\n>>   \t\t} },\n>>   \t};\n>>\n>> --\n>> 2.30.2\n>>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 0CBB8BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  6 Nov 2024 09:42:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 300956541A;\n\tWed,  6 Nov 2024 10:42:19 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4498560393\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Nov 2024 10:42:17 +0100 (CET)","from [192.168.0.43]\n\t(cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C1AFF475;\n\tWed,  6 Nov 2024 10:42:08 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"kUNdiJwM\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1730886129;\n\tbh=Z8RcZVo7DTS6tgNGTu2ht5sQ6Caj7ktyITVt3Cx3gvk=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=kUNdiJwM2mxRLFYgImDLpHzvjw1bOWgmz/796ws7cB0XMz+RXNzLZ3Kk1N91u0Cp1\n\tXe5ilKtUurvQO1uMsZIrMUei4k5JO8tKfhyiGkFBd0LRhmOpxOyxizxW2hHql+iR7s\n\tZL0vOiQWlpPpVK8kMPHxHUEC9Vg1n8bFHNe8uICI=","Message-ID":"<ca1266d3-0aeb-4a4d-8017-87821d5523f5@ideasonboard.com>","Date":"Wed, 6 Nov 2024 09:42:13 +0000","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 5/6] libcamera: camera_sensor_properties: Add sensor\n\tcontrol delays","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, mike.rudenko@gmail.com","References":"<20241031160741.253855-1-dan.scally@ideasonboard.com>\n\t<20241031160741.253855-6-dan.scally@ideasonboard.com>\n\t<lre7ymwa5cldr55w6yvchex73oyiavwmkgtkgfq3y2vlnoyloh@7d6jlezgj32m>","Content-Language":"en-US","From":"Dan Scally <dan.scally@ideasonboard.com>","Autocrypt":"addr=dan.scally@ideasonboard.com; keydata=\n\t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","In-Reply-To":"<lre7ymwa5cldr55w6yvchex73oyiavwmkgtkgfq3y2vlnoyloh@7d6jlezgj32m>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]