[{"id":14874,"web_url":"https://patchwork.libcamera.org/comment/14874/","msgid":"<20210201100438.qzg6f6hu2sr5ww5w@uno.localdomain>","date":"2021-02-01T10:04:38","subject":"Re: [libcamera-devel] [PATCH 3/3] libcamera: camera_sensor: Check\n\tcontrol availability from idmap","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent\n\nOn Sun, Jan 31, 2021 at 08:17:22PM +0200, Laurent Pinchart wrote:\n> The presence of mandatory and optional controls is checked in\n> CameraSensor::validateSensorDriver() by trying to retrieve them. This\n> cases an error message to be printed in the V4L2Device class if an\n\ncauses\n\n> optional control isn't present, while this isn't an error.\n>\n> To fix this, use the control idmap reported by the V4L2Device to check\n> for control availability. The function can now print the whole list of\n\ncontrols\n\n> missing controls, making debugging easier.\n\nNiiiice!\n\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/libcamera/camera_sensor.cpp | 31 +++++++++++++++++++++----------\n>  1 file changed, 21 insertions(+), 10 deletions(-)\n>\n> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> index 10713d3a0c29..85813befbf58 100644\n> --- a/src/libcamera/camera_sensor.cpp\n> +++ b/src/libcamera/camera_sensor.cpp\n> @@ -250,14 +250,18 @@ int CameraSensor::validateSensorDriver()\n>  \t * Optional controls are used to register optional sensor properties. If\n>  \t * not present, some values will be defaulted.\n>  \t */\n> -\tconst std::vector<uint32_t> optionalControls{\n> +\tstatic constexpr uint32_t optionalControls[] = {\n\nUnrelated but welcome\n\n>  \t\tV4L2_CID_CAMERA_ORIENTATION,\n>  \t\tV4L2_CID_CAMERA_SENSOR_ROTATION,\n>  \t};\n>\n> -\tControlList ctrls = subdev_->getControls(optionalControls);\n> -\tif (ctrls.empty())\n> -\t\tLOG(CameraSensor, Debug) << \"Optional V4L2 controls not supported\";\n> +\tconst ControlIdMap &controls = subdev_->controls().idmap();\n> +\tfor (uint32_t ctrl : optionalControls) {\n> +\t\tif (!controls.count(ctrl))\n\nWhy going through the idmap ? Can't you call count() on the\nControlInfoMap returned by subdev_->controls() ?\n\n> +\t\t\tLOG(CameraSensor, Debug)\n> +\t\t\t\t<< \"Optional V4L2 control \" << utils::hex(ctrl)\n> +\t\t\t\t<< \" not supported\";\n> +\t}\n\nI really hoped we could have printed the control name out.\nThe only way I can think of, as we can't create the V4L2ControlId from\nthe kernel interface that reports the control's name is going through\na macro that stringifies the V4L2_CID_... identifier.\n\nNot for this patch though\n\n>\n>  \t/*\n>  \t * Make sure the required selection targets are supported.\n> @@ -312,21 +316,28 @@ int CameraSensor::validateSensorDriver()\n>  \t * For raw sensors, make sure the sensor driver supports the controls\n>  \t * required by the CameraSensor class.\n>  \t */\n> -\tconst std::vector<uint32_t> mandatoryControls{\n> +\tstatic constexpr uint32_t mandatoryControls[] = {\n>  \t\tV4L2_CID_EXPOSURE,\n>  \t\tV4L2_CID_HBLANK,\n>  \t\tV4L2_CID_PIXEL_RATE,\n>  \t};\n>\n> -\tctrls = subdev_->getControls(mandatoryControls);\n> -\tif (ctrls.empty()) {\n> -\t\tLOG(CameraSensor, Error)\n> -\t\t\t<< \"Mandatory V4L2 controls not available\";\n> +\terr = 0;\n> +\tfor (uint32_t ctrl : mandatoryControls) {\n> +\t\tif (!controls.count(ctrl)) {\n> +\t\t\tLOG(CameraSensor, Error)\n> +\t\t\t\t<< \"Mandatory V4L2 control \" << utils::hex(ctrl)\n> +\t\t\t\t<< \" not available\";\n> +\t\t\terr = -EINVAL;\n\nShould you break here ?\n\n> +\t\t}\n> +\t}\n> +\n> +\tif (err) {\n>  \t\tLOG(CameraSensor, Error)\n>  \t\t\t<< \"The sensor kernel driver needs to be fixed\";\n>  \t\tLOG(CameraSensor, Error)\n>  \t\t\t<< \"See Documentation/sensor_driver_requirements.rst in the libcamera sources for more information\";\n> -\t\treturn -EINVAL;\n> +\t\treturn err;\n>  \t}\n>\n>  \treturn 0;\n> --\n> Regards,\n>\n> Laurent Pinchart\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 1171EC33BB\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Feb 2021 10:04:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 91288683FB;\n\tMon,  1 Feb 2021 11:04:18 +0100 (CET)","from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n\t[217.70.183.194])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6CDF860307\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Feb 2021 11:04:17 +0100 (CET)","from uno.localdomain (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay2-d.mail.gandi.net (Postfix) with ESMTPSA id DE3144000F;\n\tMon,  1 Feb 2021 10:04:16 +0000 (UTC)"],"X-Originating-IP":"93.61.96.190","Date":"Mon, 1 Feb 2021 11:04:38 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20210201100438.qzg6f6hu2sr5ww5w@uno.localdomain>","References":"<20210131181722.5410-1-laurent.pinchart@ideasonboard.com>\n\t<20210131181722.5410-4-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210131181722.5410-4-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 3/3] libcamera: camera_sensor: Check\n\tcontrol availability from idmap","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":14890,"web_url":"https://patchwork.libcamera.org/comment/14890/","msgid":"<YBhoTrscPiDswEFv@pendragon.ideasonboard.com>","date":"2021-02-01T20:45:02","subject":"Re: [libcamera-devel] [PATCH 3/3] libcamera: camera_sensor: Check\n\tcontrol availability from idmap","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn Mon, Feb 01, 2021 at 11:04:38AM +0100, Jacopo Mondi wrote:\n> On Sun, Jan 31, 2021 at 08:17:22PM +0200, Laurent Pinchart wrote:\n> > The presence of mandatory and optional controls is checked in\n> > CameraSensor::validateSensorDriver() by trying to retrieve them. This\n> > cases an error message to be printed in the V4L2Device class if an\n> \n> causes\n> \n> > optional control isn't present, while this isn't an error.\n> >\n> > To fix this, use the control idmap reported by the V4L2Device to check\n> > for control availability. The function can now print the whole list of\n> \n> controls\n> \n> > missing controls, making debugging easier.\n> \n> Niiiice!\n> \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  src/libcamera/camera_sensor.cpp | 31 +++++++++++++++++++++----------\n> >  1 file changed, 21 insertions(+), 10 deletions(-)\n> >\n> > diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> > index 10713d3a0c29..85813befbf58 100644\n> > --- a/src/libcamera/camera_sensor.cpp\n> > +++ b/src/libcamera/camera_sensor.cpp\n> > @@ -250,14 +250,18 @@ int CameraSensor::validateSensorDriver()\n> >  \t * Optional controls are used to register optional sensor properties. If\n> >  \t * not present, some values will be defaulted.\n> >  \t */\n> > -\tconst std::vector<uint32_t> optionalControls{\n> > +\tstatic constexpr uint32_t optionalControls[] = {\n> \n> Unrelated but welcome\n> \n> >  \t\tV4L2_CID_CAMERA_ORIENTATION,\n> >  \t\tV4L2_CID_CAMERA_SENSOR_ROTATION,\n> >  \t};\n> >\n> > -\tControlList ctrls = subdev_->getControls(optionalControls);\n> > -\tif (ctrls.empty())\n> > -\t\tLOG(CameraSensor, Debug) << \"Optional V4L2 controls not supported\";\n> > +\tconst ControlIdMap &controls = subdev_->controls().idmap();\n> > +\tfor (uint32_t ctrl : optionalControls) {\n> > +\t\tif (!controls.count(ctrl))\n> \n> Why going through the idmap ? Can't you call count() on the\n> ControlInfoMap returned by subdev_->controls() ?\n\nControlInfoMap is indexed by a ControlId *, while we have unsigned int\nIDs here.\n\n> > +\t\t\tLOG(CameraSensor, Debug)\n> > +\t\t\t\t<< \"Optional V4L2 control \" << utils::hex(ctrl)\n> > +\t\t\t\t<< \" not supported\";\n> > +\t}\n> \n> I really hoped we could have printed the control name out.\n> The only way I can think of, as we can't create the V4L2ControlId from\n> the kernel interface that reports the control's name is going through\n> a macro that stringifies the V4L2_CID_... identifier.\n> \n> Not for this patch though\n\nI agree it would be useful. We could generate a list of Control<> for\nall V4L2 controls, like we do for libcamera controls ;-) It's an idea\nI've been toying with, but I'm still not sure if it's worth it.\n\n> >\n> >  \t/*\n> >  \t * Make sure the required selection targets are supported.\n> > @@ -312,21 +316,28 @@ int CameraSensor::validateSensorDriver()\n> >  \t * For raw sensors, make sure the sensor driver supports the controls\n> >  \t * required by the CameraSensor class.\n> >  \t */\n> > -\tconst std::vector<uint32_t> mandatoryControls{\n> > +\tstatic constexpr uint32_t mandatoryControls[] = {\n> >  \t\tV4L2_CID_EXPOSURE,\n> >  \t\tV4L2_CID_HBLANK,\n> >  \t\tV4L2_CID_PIXEL_RATE,\n> >  \t};\n> >\n> > -\tctrls = subdev_->getControls(mandatoryControls);\n> > -\tif (ctrls.empty()) {\n> > -\t\tLOG(CameraSensor, Error)\n> > -\t\t\t<< \"Mandatory V4L2 controls not available\";\n> > +\terr = 0;\n> > +\tfor (uint32_t ctrl : mandatoryControls) {\n> > +\t\tif (!controls.count(ctrl)) {\n> > +\t\t\tLOG(CameraSensor, Error)\n> > +\t\t\t\t<< \"Mandatory V4L2 control \" << utils::hex(ctrl)\n> > +\t\t\t\t<< \" not available\";\n> > +\t\t\terr = -EINVAL;\n> \n> Should you break here ?\n\nI could, but I think printing all the missing controls is useful,\ninstead of only printing the first one. Otherwise you'd go to the kernel\ndriver, implement the missing control, try again, and only notice the\nnext one. OK, you could also read the documentation and get a full list\n:-) But it's pretty much free to print them all.\n\n> > +\t\t}\n> > +\t}\n> > +\n> > +\tif (err) {\n> >  \t\tLOG(CameraSensor, Error)\n> >  \t\t\t<< \"The sensor kernel driver needs to be fixed\";\n> >  \t\tLOG(CameraSensor, Error)\n> >  \t\t\t<< \"See Documentation/sensor_driver_requirements.rst in the libcamera sources for more information\";\n> > -\t\treturn -EINVAL;\n> > +\t\treturn err;\n> >  \t}\n> >\n> >  \treturn 0;","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 A189EBD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Feb 2021 20:45:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 381BB68413;\n\tMon,  1 Feb 2021 21:45:25 +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 CFAC3683FF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Feb 2021 21:45:23 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 48346556;\n\tMon,  1 Feb 2021 21:45:23 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"P34QWtVJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1612212323;\n\tbh=VnzCHogfvvEZSvosC2UxPDfZpMFhslsdcCLSPzqCS+k=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=P34QWtVJ4lqOZpJE6sxqLPr2/RU9G3uhYDiesmXS+T7BPOoyKbNR7EUnsg5gMX9N+\n\t5CRHVQq3gWMbTct6Qngm9g9dmlccHWpQEpYEybyRNcyRzz1GWGYVHgEw7xbXQN1tr5\n\tZ50nzmy+Kzow8xsEHmQzBHG5XzX9MZeUgYxFLEoY=","Date":"Mon, 1 Feb 2021 22:45:02 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YBhoTrscPiDswEFv@pendragon.ideasonboard.com>","References":"<20210131181722.5410-1-laurent.pinchart@ideasonboard.com>\n\t<20210131181722.5410-4-laurent.pinchart@ideasonboard.com>\n\t<20210201100438.qzg6f6hu2sr5ww5w@uno.localdomain>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210201100438.qzg6f6hu2sr5ww5w@uno.localdomain>","Subject":"Re: [libcamera-devel] [PATCH 3/3] libcamera: camera_sensor: Check\n\tcontrol availability from idmap","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":14962,"web_url":"https://patchwork.libcamera.org/comment/14962/","msgid":"<20210204120518.4ukh5exb235cmhhw@uno.localdomain>","date":"2021-02-04T12:05:18","subject":"Re: [libcamera-devel] [PATCH 3/3] libcamera: camera_sensor: Check\n\tcontrol availability from idmap","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Mon, Feb 01, 2021 at 10:45:02PM +0200, Laurent Pinchart wrote:\n> Hi Jacopo,\n>\n> On Mon, Feb 01, 2021 at 11:04:38AM +0100, Jacopo Mondi wrote:\n> > On Sun, Jan 31, 2021 at 08:17:22PM +0200, Laurent Pinchart wrote:\n> > > The presence of mandatory and optional controls is checked in\n> > > CameraSensor::validateSensorDriver() by trying to retrieve them. This\n> > > cases an error message to be printed in the V4L2Device class if an\n> >\n> > causes\n> >\n> > > optional control isn't present, while this isn't an error.\n> > >\n> > > To fix this, use the control idmap reported by the V4L2Device to check\n> > > for control availability. The function can now print the whole list of\n> >\n> > controls\n> >\n> > > missing controls, making debugging easier.\n> >\n> > Niiiice!\n> >\n> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > ---\n> > >  src/libcamera/camera_sensor.cpp | 31 +++++++++++++++++++++----------\n> > >  1 file changed, 21 insertions(+), 10 deletions(-)\n> > >\n> > > diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> > > index 10713d3a0c29..85813befbf58 100644\n> > > --- a/src/libcamera/camera_sensor.cpp\n> > > +++ b/src/libcamera/camera_sensor.cpp\n> > > @@ -250,14 +250,18 @@ int CameraSensor::validateSensorDriver()\n> > >  \t * Optional controls are used to register optional sensor properties. If\n> > >  \t * not present, some values will be defaulted.\n> > >  \t */\n> > > -\tconst std::vector<uint32_t> optionalControls{\n> > > +\tstatic constexpr uint32_t optionalControls[] = {\n> >\n> > Unrelated but welcome\n> >\n> > >  \t\tV4L2_CID_CAMERA_ORIENTATION,\n> > >  \t\tV4L2_CID_CAMERA_SENSOR_ROTATION,\n> > >  \t};\n> > >\n> > > -\tControlList ctrls = subdev_->getControls(optionalControls);\n> > > -\tif (ctrls.empty())\n> > > -\t\tLOG(CameraSensor, Debug) << \"Optional V4L2 controls not supported\";\n> > > +\tconst ControlIdMap &controls = subdev_->controls().idmap();\n> > > +\tfor (uint32_t ctrl : optionalControls) {\n> > > +\t\tif (!controls.count(ctrl))\n> >\n> > Why going through the idmap ? Can't you call count() on the\n> > ControlInfoMap returned by subdev_->controls() ?\n>\n> ControlInfoMap is indexed by a ControlId *, while we have unsigned int\n> IDs here.\n>\n\nRight, sorry, I've overlooked this\n\n> > > +\t\t\tLOG(CameraSensor, Debug)\n> > > +\t\t\t\t<< \"Optional V4L2 control \" << utils::hex(ctrl)\n> > > +\t\t\t\t<< \" not supported\";\n> > > +\t}\n> >\n> > I really hoped we could have printed the control name out.\n> > The only way I can think of, as we can't create the V4L2ControlId from\n> > the kernel interface that reports the control's name is going through\n> > a macro that stringifies the V4L2_CID_... identifier.\n> >\n> > Not for this patch though\n>\n> I agree it would be useful. We could generate a list of Control<> for\n> all V4L2 controls, like we do for libcamera controls ;-) It's an idea\n> I've been toying with, but I'm still not sure if it's worth it.\n>\n\nThat would be very nice and would make the controls framework get past\nthe <ControlId> <unsigned int> duality.\n\n> > >\n> > >  \t/*\n> > >  \t * Make sure the required selection targets are supported.\n> > > @@ -312,21 +316,28 @@ int CameraSensor::validateSensorDriver()\n> > >  \t * For raw sensors, make sure the sensor driver supports the controls\n> > >  \t * required by the CameraSensor class.\n> > >  \t */\n> > > -\tconst std::vector<uint32_t> mandatoryControls{\n> > > +\tstatic constexpr uint32_t mandatoryControls[] = {\n> > >  \t\tV4L2_CID_EXPOSURE,\n> > >  \t\tV4L2_CID_HBLANK,\n> > >  \t\tV4L2_CID_PIXEL_RATE,\n> > >  \t};\n> > >\n> > > -\tctrls = subdev_->getControls(mandatoryControls);\n> > > -\tif (ctrls.empty()) {\n> > > -\t\tLOG(CameraSensor, Error)\n> > > -\t\t\t<< \"Mandatory V4L2 controls not available\";\n> > > +\terr = 0;\n> > > +\tfor (uint32_t ctrl : mandatoryControls) {\n> > > +\t\tif (!controls.count(ctrl)) {\n> > > +\t\t\tLOG(CameraSensor, Error)\n> > > +\t\t\t\t<< \"Mandatory V4L2 control \" << utils::hex(ctrl)\n> > > +\t\t\t\t<< \" not available\";\n> > > +\t\t\terr = -EINVAL;\n> >\n> > Should you break here ?\n>\n> I could, but I think printing all the missing controls is useful,\n> instead of only printing the first one. Otherwise you'd go to the kernel\n> driver, implement the missing control, try again, and only notice the\n> next one. OK, you could also read the documentation and get a full list\n> :-) But it's pretty much free to print them all.\n>\n\nCorrect\n\nPlease add\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n  j\n\n> > > +\t\t}\n> > > +\t}\n> > > +\n> > > +\tif (err) {\n> > >  \t\tLOG(CameraSensor, Error)\n> > >  \t\t\t<< \"The sensor kernel driver needs to be fixed\";\n> > >  \t\tLOG(CameraSensor, Error)\n> > >  \t\t\t<< \"See Documentation/sensor_driver_requirements.rst in the libcamera sources for more information\";\n> > > -\t\treturn -EINVAL;\n> > > +\t\treturn err;\n> > >  \t}\n> > >\n> > >  \treturn 0;\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","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 C1EE0BD162\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  4 Feb 2021 12:04:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 593A96141E;\n\tThu,  4 Feb 2021 13:04:58 +0100 (CET)","from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n\t[217.70.183.194])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 61ACE61403\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  4 Feb 2021 13:04:57 +0100 (CET)","from uno.localdomain (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay2-d.mail.gandi.net (Postfix) with ESMTPSA id BF9154000B;\n\tThu,  4 Feb 2021 12:04:56 +0000 (UTC)"],"X-Originating-IP":"93.61.96.190","Date":"Thu, 4 Feb 2021 13:05:18 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20210204120518.4ukh5exb235cmhhw@uno.localdomain>","References":"<20210131181722.5410-1-laurent.pinchart@ideasonboard.com>\n\t<20210131181722.5410-4-laurent.pinchart@ideasonboard.com>\n\t<20210201100438.qzg6f6hu2sr5ww5w@uno.localdomain>\n\t<YBhoTrscPiDswEFv@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<YBhoTrscPiDswEFv@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 3/3] libcamera: camera_sensor: Check\n\tcontrol availability from idmap","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]