[{"id":3458,"web_url":"https://patchwork.libcamera.org/comment/3458/","msgid":"<20200115201735.GG977577@oden.dyn.berto.se>","date":"2020-01-15T20:17:35","subject":"Re: [libcamera-devel] [RFC 5/7] libcamera: sensor: ov5670: Register\n\tpixel array properties","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Jacopo,\n\nThanks for your work.\n\nOn 2019-12-18 15:49:59 +0100, Jacopo Mondi wrote:\n> Implement sensor specific pixel array properties initialization for the\n> OV5670 sensor driver by overriding CameraSensor::initProperties()\n> method.\n\nWould it be possible to reference what document source was used to find \nthe values used in the code?\n\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/libcamera/sensor/ov5670.cpp | 19 +++++++++++++++++++\n>  src/libcamera/sensor/ov5670.h   |  3 +++\n>  2 files changed, 22 insertions(+)\n> \n> diff --git a/src/libcamera/sensor/ov5670.cpp b/src/libcamera/sensor/ov5670.cpp\n> index ca9f3c1d544f..c2d996785717 100644\n> --- a/src/libcamera/sensor/ov5670.cpp\n> +++ b/src/libcamera/sensor/ov5670.cpp\n> @@ -6,6 +6,10 @@\n>   */\n>  \n>  #include \"ov5670.h\"\n> +\n> +#include <libcamera/controls.h>\n> +#include <libcamera/property_ids.h>\n> +\n>  #include \"camera_sensor.h\"\n>  \n>  namespace libcamera {\n> @@ -15,4 +19,19 @@ OV5670CameraSensor::OV5670CameraSensor(const MediaEntity *entity)\n>  {\n>  }\n>  \n> +int OV5670CameraSensor::initProperties(const ControlInfoMap &controlMap)\n> +{\n> +\t/* Pixel Array Properties. */\n> +\tproperties_.set(properties::PixelArraySize, { 2.9f, 1.18f });\n> +\tproperties_.set(properties::PixelArrayBounds, { 2592, 1944 });\n> +\tproperties_.set(properties::PixelArrays, { 2592, 1944 });\n> +\tproperties_.set(properties::ActiveAreaSize, { 16, 6, 2560, 1920 });\n> +\tint32_t bayerFilter = properties::BayerFilterGRBG;\n> +\tproperties_.set(properties::BayerFilterArrangement, bayerFilter);\n> +\tproperties_.set(properties::ISOSensitivityRange, { 50, 800 });\n> +\n> +\treturn CameraSensor::initProperties(controlMap);\n> +}\n> +\n>  }; /* namespace libcamera */\n> +\n> diff --git a/src/libcamera/sensor/ov5670.h b/src/libcamera/sensor/ov5670.h\n> index f84239c8411d..564a4546d69b 100644\n> --- a/src/libcamera/sensor/ov5670.h\n> +++ b/src/libcamera/sensor/ov5670.h\n> @@ -11,8 +11,11 @@\n>  \n>  namespace libcamera {\n>  \n> +class ControlInfoMap;\n\nMissing newline.\n\n>  class OV5670CameraSensor final : public CameraSensor\n>  {\n> +\tint initProperties(const ControlInfoMap &controlMap);\n> +\n>  private:\n>  \tOV5670CameraSensor(const MediaEntity *entity);\n>  \tfriend CameraSensorFactory;\n> -- \n> 2.24.0\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lf1-x131.google.com (mail-lf1-x131.google.com\n\t[IPv6:2a00:1450:4864:20::131])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0296F6075C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 15 Jan 2020 21:17:36 +0100 (CET)","by mail-lf1-x131.google.com with SMTP id l18so13746441lfc.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 15 Jan 2020 12:17:36 -0800 (PST)","from localhost (h-93-159.A463.priv.bahnhof.se. [46.59.93.159])\n\tby smtp.gmail.com with ESMTPSA id\n\tu24sm9624353ljo.77.2020.01.15.12.17.35\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 15 Jan 2020 12:17:35 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=K6/dx26SEEyq8v+OaCQnnY6jSMe3PlD7zWbCv5h6R24=;\n\tb=xa4E0n70ImXvorUW73nbe3vgn7rFC59aTqd8IqAUL+ISOnUwsRRtL2TaYxkXj6YAnu\n\tb3IBPwgd2qHr8hlj8XXua8L3jTNi1URkbj6op35b44nQReVcU1s+OZ16s7fO6zyUZgx4\n\tC36nNPcajCmYnUHhNADxKkXYlb+St9XiNGlaZoYhAsAd0k5s6NnM0cBAUEO3fpzoSWCa\n\t92z2MhLd8cjkQIjK73DYyXCBauKnM3RZEWt92ixlPniVgUuQiAagBa+NnD6myqQAek0P\n\tPWsCudm36pSmWU/JLQq/mA30c2PKKNE+UhBPkPCLLmVOLyOKyoo8V3f7rukT7X2p6mKL\n\tTiyg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=K6/dx26SEEyq8v+OaCQnnY6jSMe3PlD7zWbCv5h6R24=;\n\tb=DDGUdI/aNJgK8J7PNB+jaQdHZaJzudS89qHXae7+jyfkWoalLsZaxZ4ovsWwGli9xk\n\t0PlRxjqaPRyZBa+xMERUhsRY0KMajN0HpjcKg6kdne26S7xGkobh7jCZ+BpnZ0WUMOzu\n\tJtveoscmJsrwmBkaBBAw8eR+RYxZAxmw1POc5XcPJacpI0Qc/l2IoUjKdhW+zUTE4+bx\n\tzKqZ5iUOGkS6zV2bVVtzANS2d+zQn3LB1seLuOgzc/VJqfGvCE0Mub6bxsZVyIQsaPQx\n\tKcBsV2/lcjOO3XtLIJ4/rNdctyts3y9BZUZY0wfBUrFpcI+rxC7uBfKQyc1Ks0F770nS\n\tLRLg==","X-Gm-Message-State":"APjAAAU1FgwqSzRIb3bZ0bg2rtd2lQ6g50MjLfPnA1B5mIqv/1zpPkx6\n\tsmzqgM5rVVoHx7ReLeskiHTwZ1ex+Lo=","X-Google-Smtp-Source":"APXvYqyJ01mnxgWbI+HTcVKWCtCraXNV5wLe17PqylvbKjh0EVMMvycZwgx8sZE5aj8jeA9SBmio5A==","X-Received":"by 2002:a19:5e16:: with SMTP id s22mr379633lfb.33.1579119456370; \n\tWed, 15 Jan 2020 12:17:36 -0800 (PST)","Date":"Wed, 15 Jan 2020 21:17:35 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200115201735.GG977577@oden.dyn.berto.se>","References":"<20191218145001.22283-1-jacopo@jmondi.org>\n\t<20191218145001.22283-6-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20191218145001.22283-6-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [RFC 5/7] libcamera: sensor: ov5670: Register\n\tpixel array properties","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>","X-List-Received-Date":"Wed, 15 Jan 2020 20:17:37 -0000"}},{"id":3559,"web_url":"https://patchwork.libcamera.org/comment/3559/","msgid":"<20200120211856.GK856@valkosipuli.retiisi.org.uk>","date":"2020-01-20T21:18:56","subject":"Re: [libcamera-devel] [RFC 5/7] libcamera: sensor: ov5670: Register\n\tpixel array properties","submitter":{"id":32,"url":"https://patchwork.libcamera.org/api/people/32/","name":"Sakari Ailus","email":"sakari.ailus@iki.fi"},"content":"Hi Jacopo,\n\nOn Wed, Dec 18, 2019 at 03:49:59PM +0100, Jacopo Mondi wrote:\n> Implement sensor specific pixel array properties initialization for the\n> OV5670 sensor driver by overriding CameraSensor::initProperties()\n> method.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/libcamera/sensor/ov5670.cpp | 19 +++++++++++++++++++\n>  src/libcamera/sensor/ov5670.h   |  3 +++\n>  2 files changed, 22 insertions(+)\n> \n> diff --git a/src/libcamera/sensor/ov5670.cpp b/src/libcamera/sensor/ov5670.cpp\n> index ca9f3c1d544f..c2d996785717 100644\n> --- a/src/libcamera/sensor/ov5670.cpp\n> +++ b/src/libcamera/sensor/ov5670.cpp\n> @@ -6,6 +6,10 @@\n>   */\n>  \n>  #include \"ov5670.h\"\n> +\n> +#include <libcamera/controls.h>\n> +#include <libcamera/property_ids.h>\n> +\n>  #include \"camera_sensor.h\"\n>  \n>  namespace libcamera {\n> @@ -15,4 +19,19 @@ OV5670CameraSensor::OV5670CameraSensor(const MediaEntity *entity)\n>  {\n>  }\n>  \n> +int OV5670CameraSensor::initProperties(const ControlInfoMap &controlMap)\n> +{\n> +\t/* Pixel Array Properties. */\n> +\tproperties_.set(properties::PixelArraySize, { 2.9f, 1.18f });\n> +\tproperties_.set(properties::PixelArrayBounds, { 2592, 1944 });\n> +\tproperties_.set(properties::PixelArrays, { 2592, 1944 });\n> +\tproperties_.set(properties::ActiveAreaSize, { 16, 6, 2560, 1920 });\n\nCould these two be obtained from the driver?\n\nAt least in principle there's the NATIVE_SIZE target. Although not all\ndrivers support modes without cropping...\n\n> +\tint32_t bayerFilter = properties::BayerFilterGRBG;\n> +\tproperties_.set(properties::BayerFilterArrangement, bayerFilter);\n\nThis one as well, perhaps?\n\n> +\tproperties_.set(properties::ISOSensitivityRange, { 50, 800 });\n> +\n> +\treturn CameraSensor::initProperties(controlMap);\n> +}\n> +\n>  }; /* namespace libcamera */\n> +\n> diff --git a/src/libcamera/sensor/ov5670.h b/src/libcamera/sensor/ov5670.h\n> index f84239c8411d..564a4546d69b 100644\n> --- a/src/libcamera/sensor/ov5670.h\n> +++ b/src/libcamera/sensor/ov5670.h\n> @@ -11,8 +11,11 @@\n>  \n>  namespace libcamera {\n>  \n> +class ControlInfoMap;\n>  class OV5670CameraSensor final : public CameraSensor\n>  {\n> +\tint initProperties(const ControlInfoMap &controlMap);\n> +\n>  private:\n>  \tOV5670CameraSensor(const MediaEntity *entity);\n>  \tfriend CameraSensorFactory;","headers":{"Return-Path":"<sakari.ailus@retiisi.org.uk>","Received":["from hillosipuli.retiisi.org.uk (hillosipuli.retiisi.org.uk\n\t[IPv6:2a01:4f9:c010:4572::81:2])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0BDA760455\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Jan 2020 22:19:09 +0100 (CET)","from valkosipuli.localdomain (valkosipuli.retiisi.org.uk\n\t[IPv6:2a01:4f9:c010:4572::80:2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id EC2D4634C86;\n\tMon, 20 Jan 2020 23:18:56 +0200 (EET)","from sailus by valkosipuli.localdomain with local (Exim 4.92)\n\t(envelope-from <sakari.ailus@retiisi.org.uk>)\n\tid 1iteRk-0000ZA-VV; Mon, 20 Jan 2020 23:18:56 +0200"],"Date":"Mon, 20 Jan 2020 23:18:56 +0200","From":"Sakari Ailus <sakari.ailus@iki.fi>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200120211856.GK856@valkosipuli.retiisi.org.uk>","References":"<20191218145001.22283-1-jacopo@jmondi.org>\n\t<20191218145001.22283-6-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20191218145001.22283-6-jacopo@jmondi.org>","User-Agent":"Mutt/1.10.1 (2018-07-13)","X-Mailman-Approved-At":"Mon, 20 Jan 2020 22:26:25 +0100","Subject":"Re: [libcamera-devel] [RFC 5/7] libcamera: sensor: ov5670: Register\n\tpixel array properties","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>","X-List-Received-Date":"Mon, 20 Jan 2020 21:19:09 -0000"}},{"id":3560,"web_url":"https://patchwork.libcamera.org/comment/3560/","msgid":"<20200121084012.plxvild7ay6quuer@uno.localdomain>","date":"2020-01-21T08:40:12","subject":"Re: [libcamera-devel] [RFC 5/7] libcamera: sensor: ov5670: Register\n\tpixel array properties","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hello Sakari,\n    happy to have you here!\n\nOn Mon, Jan 20, 2020 at 11:18:56PM +0200, Sakari Ailus wrote:\n> Hi Jacopo,\n>\n> On Wed, Dec 18, 2019 at 03:49:59PM +0100, Jacopo Mondi wrote:\n> > Implement sensor specific pixel array properties initialization for the\n> > OV5670 sensor driver by overriding CameraSensor::initProperties()\n> > method.\n> >\n> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > ---\n> >  src/libcamera/sensor/ov5670.cpp | 19 +++++++++++++++++++\n> >  src/libcamera/sensor/ov5670.h   |  3 +++\n> >  2 files changed, 22 insertions(+)\n> >\n> > diff --git a/src/libcamera/sensor/ov5670.cpp b/src/libcamera/sensor/ov5670.cpp\n> > index ca9f3c1d544f..c2d996785717 100644\n> > --- a/src/libcamera/sensor/ov5670.cpp\n> > +++ b/src/libcamera/sensor/ov5670.cpp\n> > @@ -6,6 +6,10 @@\n> >   */\n> >\n> >  #include \"ov5670.h\"\n> > +\n> > +#include <libcamera/controls.h>\n> > +#include <libcamera/property_ids.h>\n> > +\n> >  #include \"camera_sensor.h\"\n> >\n> >  namespace libcamera {\n> > @@ -15,4 +19,19 @@ OV5670CameraSensor::OV5670CameraSensor(const MediaEntity *entity)\n> >  {\n> >  }\n> >\n> > +int OV5670CameraSensor::initProperties(const ControlInfoMap &controlMap)\n> > +{\n> > +\t/* Pixel Array Properties. */\n> > +\tproperties_.set(properties::PixelArraySize, { 2.9f, 1.18f });\n> > +\tproperties_.set(properties::PixelArrayBounds, { 2592, 1944 });\n> > +\tproperties_.set(properties::PixelArrays, { 2592, 1944 });\n> > +\tproperties_.set(properties::ActiveAreaSize, { 16, 6, 2560, 1920 });\n>\n> Could these two be obtained from the driver?\n>\n> At least in principle there's the NATIVE_SIZE target. Although not all\n> drivers support modes without cropping...\n>\n\nDo you mean something like this ? Maybe adjusted to report the full\npixel array size through NATIVE_SIZE and the active area through\nCROP_BOUNDS...\n\nhttps://lore.kernel.org/linux-media/20190827092339.8858-1-jacopo@jmondi.org/T/#med4e833fddd3f1b21e2a4ea82fc2b4fceaeb4bc3\n\nI recall I decided to drop those patches from the next iterations of\nthat series as we there where controversy there, which to be honest, I\ndon't fully remember. Would you be fine seeing patches for the sensor\ndriver adding those two selection drivers ?\n\n> > +\tint32_t bayerFilter = properties::BayerFilterGRBG;\n> > +\tproperties_.set(properties::BayerFilterArrangement, bayerFilter);\n>\n> This one as well, perhaps?\n>\n\ndo we have a control for that ? I haven't seen any in the Camera and\nImage source control classes. Are you suggesting to try and add a new\none ;) ?\n\n> > +\tproperties_.set(properties::ISOSensitivityRange, { 50, 800 });\n> > +\n> > +\treturn CameraSensor::initProperties(controlMap);\n> > +}\n> > +\n> >  }; /* namespace libcamera */\n> > +\n> > diff --git a/src/libcamera/sensor/ov5670.h b/src/libcamera/sensor/ov5670.h\n> > index f84239c8411d..564a4546d69b 100644\n> > --- a/src/libcamera/sensor/ov5670.h\n> > +++ b/src/libcamera/sensor/ov5670.h\n> > @@ -11,8 +11,11 @@\n> >\n> >  namespace libcamera {\n> >\n> > +class ControlInfoMap;\n> >  class OV5670CameraSensor final : public CameraSensor\n> >  {\n> > +\tint initProperties(const ControlInfoMap &controlMap);\n> > +\n> >  private:\n> >  \tOV5670CameraSensor(const MediaEntity *entity);\n> >  \tfriend CameraSensorFactory;\n>\n> --\n> Regards,\n>\n> Sakari Ailus","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[217.70.183.200])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0A77C60451\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Jan 2020 09:37:40 +0100 (CET)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 89B3F20013;\n\tTue, 21 Jan 2020 08:37:39 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","Date":"Tue, 21 Jan 2020 09:40:12 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Sakari Ailus <sakari.ailus@iki.fi>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200121084012.plxvild7ay6quuer@uno.localdomain>","References":"<20191218145001.22283-1-jacopo@jmondi.org>\n\t<20191218145001.22283-6-jacopo@jmondi.org>\n\t<20200120211856.GK856@valkosipuli.retiisi.org.uk>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"imdh357zctfhu43f\"","Content-Disposition":"inline","In-Reply-To":"<20200120211856.GK856@valkosipuli.retiisi.org.uk>","Subject":"Re: [libcamera-devel] [RFC 5/7] libcamera: sensor: ov5670: Register\n\tpixel array properties","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>","X-List-Received-Date":"Tue, 21 Jan 2020 08:37:40 -0000"}},{"id":3593,"web_url":"https://patchwork.libcamera.org/comment/3593/","msgid":"<20200123205258.GX856@valkosipuli.retiisi.org.uk>","date":"2020-01-23T20:52:58","subject":"Re: [libcamera-devel] [RFC 5/7] libcamera: sensor: ov5670: Register\n\tpixel array properties","submitter":{"id":32,"url":"https://patchwork.libcamera.org/api/people/32/","name":"Sakari Ailus","email":"sakari.ailus@iki.fi"},"content":"Hi Jacopo,\n\nOn Tue, Jan 21, 2020 at 09:40:12AM +0100, Jacopo Mondi wrote:\n> Hello Sakari,\n>     happy to have you here!\n> \n> On Mon, Jan 20, 2020 at 11:18:56PM +0200, Sakari Ailus wrote:\n> > Hi Jacopo,\n> >\n> > On Wed, Dec 18, 2019 at 03:49:59PM +0100, Jacopo Mondi wrote:\n> > > Implement sensor specific pixel array properties initialization for the\n> > > OV5670 sensor driver by overriding CameraSensor::initProperties()\n> > > method.\n> > >\n> > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > > ---\n> > >  src/libcamera/sensor/ov5670.cpp | 19 +++++++++++++++++++\n> > >  src/libcamera/sensor/ov5670.h   |  3 +++\n> > >  2 files changed, 22 insertions(+)\n> > >\n> > > diff --git a/src/libcamera/sensor/ov5670.cpp b/src/libcamera/sensor/ov5670.cpp\n> > > index ca9f3c1d544f..c2d996785717 100644\n> > > --- a/src/libcamera/sensor/ov5670.cpp\n> > > +++ b/src/libcamera/sensor/ov5670.cpp\n> > > @@ -6,6 +6,10 @@\n> > >   */\n> > >\n> > >  #include \"ov5670.h\"\n> > > +\n> > > +#include <libcamera/controls.h>\n> > > +#include <libcamera/property_ids.h>\n> > > +\n> > >  #include \"camera_sensor.h\"\n> > >\n> > >  namespace libcamera {\n> > > @@ -15,4 +19,19 @@ OV5670CameraSensor::OV5670CameraSensor(const MediaEntity *entity)\n> > >  {\n> > >  }\n> > >\n> > > +int OV5670CameraSensor::initProperties(const ControlInfoMap &controlMap)\n> > > +{\n> > > +\t/* Pixel Array Properties. */\n> > > +\tproperties_.set(properties::PixelArraySize, { 2.9f, 1.18f });\n> > > +\tproperties_.set(properties::PixelArrayBounds, { 2592, 1944 });\n> > > +\tproperties_.set(properties::PixelArrays, { 2592, 1944 });\n> > > +\tproperties_.set(properties::ActiveAreaSize, { 16, 6, 2560, 1920 });\n> >\n> > Could these two be obtained from the driver?\n> >\n> > At least in principle there's the NATIVE_SIZE target. Although not all\n> > drivers support modes without cropping...\n> >\n> \n> Do you mean something like this ? Maybe adjusted to report the full\n> pixel array size through NATIVE_SIZE and the active area through\n> CROP_BOUNDS...\n> \n> https://lore.kernel.org/linux-media/20190827092339.8858-1-jacopo@jmondi.org/T/#med4e833fddd3f1b21e2a4ea82fc2b4fceaeb4bc3\n> \n> I recall I decided to drop those patches from the next iterations of\n> that series as we there where controversy there, which to be honest, I\n> don't fully remember. Would you be fine seeing patches for the sensor\n> driver adding those two selection drivers ?\n\nHmm. The V4L2 sub-device interface is ill suited for register list based sensors\nanyway, you can't convey all the details of the restrictions the mode\ndefinitions have.\n\nEither way, I think the native size definitely makes sense. Why not\ncropping either, but given that those modes are set by a single size\n(SUBDEV_S_FMT), there's not much use for it.\n\n> \n> > > +\tint32_t bayerFilter = properties::BayerFilterGRBG;\n> > > +\tproperties_.set(properties::BayerFilterArrangement, bayerFilter);\n> >\n> > This one as well, perhaps?\n> >\n> \n> do we have a control for that ? I haven't seen any in the Camera and\n> Image source control classes. Are you suggesting to try and add a new\n> one ;) ?\n\nHmm. I thought this information could be deducted from the format\nenumeration, couldn't it?","headers":{"Return-Path":"<sakari.ailus@retiisi.org.uk>","Received":["from hillosipuli.retiisi.org.uk (retiisi.org.uk [95.216.213.190])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EC88B607EF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 23 Jan 2020 21:53:22 +0100 (CET)","from valkosipuli.localdomain (valkosipuli.retiisi.org.uk\n\t[IPv6:2a01:4f9:c010:4572::80:2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id B3CD9634C8C;\n\tThu, 23 Jan 2020 22:52:58 +0200 (EET)","from sailus by valkosipuli.localdomain with local (Exim 4.92)\n\t(envelope-from <sakari.ailus@retiisi.org.uk>)\n\tid 1iujTG-0001KE-LN; Thu, 23 Jan 2020 22:52:58 +0200"],"Date":"Thu, 23 Jan 2020 22:52:58 +0200","From":"Sakari Ailus <sakari.ailus@iki.fi>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200123205258.GX856@valkosipuli.retiisi.org.uk>","References":"<20191218145001.22283-1-jacopo@jmondi.org>\n\t<20191218145001.22283-6-jacopo@jmondi.org>\n\t<20200120211856.GK856@valkosipuli.retiisi.org.uk>\n\t<20200121084012.plxvild7ay6quuer@uno.localdomain>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20200121084012.plxvild7ay6quuer@uno.localdomain>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [RFC 5/7] libcamera: sensor: ov5670: Register\n\tpixel array properties","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>","X-List-Received-Date":"Thu, 23 Jan 2020 20:53:23 -0000"}}]