[{"id":14260,"web_url":"https://patchwork.libcamera.org/comment/14260/","msgid":"<20201217141216.xxxlpzvklkadzw4y@uno.localdomain>","date":"2020-12-17T14:12:16","subject":"Re: [libcamera-devel] [PATCH v4 5/8] libcamera: camera_sensor:\n\tExpose the camera device","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"On Tue, Dec 15, 2020 at 01:48:08AM +0100, Niklas Söderlund wrote:\n> Expose the device backing the CameraSensor instance.\n>\n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> ---\n> * Changes since v3\n> - New, needed to be able to move the DelayedControls handling out of\n>   CameraSensor.\n> ---\n>  include/libcamera/internal/camera_sensor.h | 2 ++\n>  src/libcamera/camera_sensor.cpp            | 6 ++++++\n>  2 files changed, 8 insertions(+)\n>\n> diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\n> index f80d836161a564e7..a70e024aa327f69b 100644\n> --- a/include/libcamera/internal/camera_sensor.h\n> +++ b/include/libcamera/internal/camera_sensor.h\n> @@ -61,6 +61,8 @@ public:\n>  \tControlList getControls(const std::vector<uint32_t> &ids);\n>  \tint setControls(ControlList *ctrls);\n>\n> +\tV4L2Subdevice *device() { return subdev_.get(); }\n> +\n>  \tconst ControlList &properties() const { return properties_; }\n>  \tint sensorInfo(CameraSensorInfo *info) const;\n>\n> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> index 1628ba9c892b0eaf..df45b2b803617bfd 100644\n> --- a/src/libcamera/camera_sensor.cpp\n> +++ b/src/libcamera/camera_sensor.cpp\n> @@ -486,6 +486,12 @@ ControlList CameraSensor::getControls(const std::vector<uint32_t> &ids)\n>  \treturn subdev_->getControls(ids);\n>  }\n>\n> +/**\n> + * \\fn CameraSensor::device()\n> + * \\brief Retrieve the camera sensor device\n> + * \\return The camera sensor device\n> + */\n> +\n\nI wonder if subdevice() would be better.\nA minor though\n\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n  j\n\n>  /**\n>   * \\fn CameraSensor::properties()\n>   * \\brief Retrieve the camera sensor properties\n> --\n> 2.29.2\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 6DADBBD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 17 Dec 2020 14:12:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DBF7161597;\n\tThu, 17 Dec 2020 15:12:08 +0100 (CET)","from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9F64161591\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 17 Dec 2020 15:12:07 +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 relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 954E7E0002;\n\tThu, 17 Dec 2020 14:12:06 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","Date":"Thu, 17 Dec 2020 15:12:16 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<20201217141216.xxxlpzvklkadzw4y@uno.localdomain>","References":"<20201215004811.602429-1-niklas.soderlund@ragnatech.se>\n\t<20201215004811.602429-6-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20201215004811.602429-6-niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH v4 5/8] libcamera: camera_sensor:\n\tExpose the camera device","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=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":14478,"web_url":"https://patchwork.libcamera.org/comment/14478/","msgid":"<X/h6NqCC39CZSv+9@oden.dyn.berto.se>","date":"2021-01-08T15:28:54","subject":"Re: [libcamera-devel] [PATCH v4 5/8] libcamera: camera_sensor:\n\tExpose the camera device","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 feedback.\n\nOn 2020-12-17 15:12:16 +0100, Jacopo Mondi wrote:\n> On Tue, Dec 15, 2020 at 01:48:08AM +0100, Niklas Söderlund wrote:\n> > Expose the device backing the CameraSensor instance.\n> >\n> > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > ---\n> > * Changes since v3\n> > - New, needed to be able to move the DelayedControls handling out of\n> >   CameraSensor.\n> > ---\n> >  include/libcamera/internal/camera_sensor.h | 2 ++\n> >  src/libcamera/camera_sensor.cpp            | 6 ++++++\n> >  2 files changed, 8 insertions(+)\n> >\n> > diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\n> > index f80d836161a564e7..a70e024aa327f69b 100644\n> > --- a/include/libcamera/internal/camera_sensor.h\n> > +++ b/include/libcamera/internal/camera_sensor.h\n> > @@ -61,6 +61,8 @@ public:\n> >  \tControlList getControls(const std::vector<uint32_t> &ids);\n> >  \tint setControls(ControlList *ctrls);\n> >\n> > +\tV4L2Subdevice *device() { return subdev_.get(); }\n> > +\n> >  \tconst ControlList &properties() const { return properties_; }\n> >  \tint sensorInfo(CameraSensorInfo *info) const;\n> >\n> > diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> > index 1628ba9c892b0eaf..df45b2b803617bfd 100644\n> > --- a/src/libcamera/camera_sensor.cpp\n> > +++ b/src/libcamera/camera_sensor.cpp\n> > @@ -486,6 +486,12 @@ ControlList CameraSensor::getControls(const std::vector<uint32_t> &ids)\n> >  \treturn subdev_->getControls(ids);\n> >  }\n> >\n> > +/**\n> > + * \\fn CameraSensor::device()\n> > + * \\brief Retrieve the camera sensor device\n> > + * \\return The camera sensor device\n> > + */\n> > +\n> \n> I wonder if subdevice() would be better.\n> A minor though\n\nI thin device is 'nicer' as what it does is retrieve the device which \nrepresents the sensor. That being said I don't feel strongly about it.  \nAnd hopefully we can remove this method in the future and not expose it \noutside CameraSensor. This is only needed until we decide how to best \nintegrate DelayedControls inside CameraSensro.\n\n> \n> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks.\n\n> \n> Thanks\n>   j\n> \n> >  /**\n> >   * \\fn CameraSensor::properties()\n> >   * \\brief Retrieve the camera sensor properties\n> > --\n> > 2.29.2\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 08808C0F1A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  8 Jan 2021 15:28:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 854E867E10;\n\tFri,  8 Jan 2021 16:28:57 +0100 (CET)","from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com\n\t[IPv6:2a00:1450:4864:20::12d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1DB39635A0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  8 Jan 2021 16:28:56 +0100 (CET)","by mail-lf1-x12d.google.com with SMTP id s26so23760032lfc.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 08 Jan 2021 07:28:56 -0800 (PST)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\t26sm2071368lfr.60.2021.01.08.07.28.54\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 08 Jan 2021 07:28:54 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"L5nDodef\"; dkim-atps=neutral","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=wbRDQnYemc7k5P/uT95rMdJsacmCoh5TrJi1YybL7lE=;\n\tb=L5nDodefAKH/hQCfi8Z2g5A3ekUhST/ApPS6bXYytM1p6cLpiZ4IxGvNFaBPozydsS\n\t65PwYum0Glutto+aUxaKP6Nb0d8zsUJQAvvxF4+c0t9LKXVNah1EHUKtjU/ApPPC8D0a\n\tOMfXMUzThulyFauxv9mbYtlmA8FUpK93K7/HWCqRP+SQvn02G2MabMVWs5ccHFDJsHpA\n\tlSBZSu5/HugyIYx1t2EEJG7JbwVY4LVD76Fjiz1UZ0c7c8kUQlGAfs/lnYVSUIf7WZHp\n\th/y0FHB7EAOcYGE04HRvD0+hoFcm5FXF605ZkXariuRUXN0f1sVtOyMJA6PhT0RBnKz3\n\tyKkw==","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=wbRDQnYemc7k5P/uT95rMdJsacmCoh5TrJi1YybL7lE=;\n\tb=DzCcnk7WFb5SAYIup9eDRHyNGkT/N2jewcDfCCed14O00LaTQPerL4hfbevwDoOCvS\n\tnXO9bRN17Bk/X+toTKEGMVvr6Rp3mj+3TheXgFOP0kXiLgwhaFNk1zJBs6hWEpnddp9h\n\tPSe40K/IDnFZLyLMEId0NCvf/Tg+r7ueVkZFO/d8vRPXc4RjB8S/J3YrKXsvXCvr7gho\n\tBjwQp2ZzHCyvSEgv4w6aeMpCU7wQhqaHX94gdcrM9plT3lsyUyp1IdjtwMGSTkufBNmu\n\taP/lT4Cx48d0F3QI8xwYcOgYBipCZJUY87rRVcYqhS3sN/AtNApZjQ3yd4IkDwcm6YxZ\n\tenzg==","X-Gm-Message-State":"AOAM530VrBeMF4JvapKn9yumVqtsu4m5Mi8CQXBeLYzLWj5SvHEkpGxA\n\tJI/dqzGtUiPJn37esp6580TxWw==","X-Google-Smtp-Source":"ABdhPJxOzIi28Ij6GZnSfslMYG7jUHL5C7/jsUEqJQD2wbeI5Ex4zVgBoKRCM5725ycy+ht2DAM97g==","X-Received":"by 2002:a19:c356:: with SMTP id\n\tt83mr1783591lff.386.1610119735534; \n\tFri, 08 Jan 2021 07:28:55 -0800 (PST)","Date":"Fri, 8 Jan 2021 16:28:54 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<X/h6NqCC39CZSv+9@oden.dyn.berto.se>","References":"<20201215004811.602429-1-niklas.soderlund@ragnatech.se>\n\t<20201215004811.602429-6-niklas.soderlund@ragnatech.se>\n\t<20201217141216.xxxlpzvklkadzw4y@uno.localdomain>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20201217141216.xxxlpzvklkadzw4y@uno.localdomain>","Subject":"Re: [libcamera-devel] [PATCH v4 5/8] libcamera: camera_sensor:\n\tExpose the camera device","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=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":14490,"web_url":"https://patchwork.libcamera.org/comment/14490/","msgid":"<X/sJP743cRKVxl60@pendragon.ideasonboard.com>","date":"2021-01-10T14:03:43","subject":"Re: [libcamera-devel] [PATCH v4 5/8] libcamera: camera_sensor:\n\tExpose the camera device","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nThank you for the patch.\n\nOn Fri, Jan 08, 2021 at 04:28:54PM +0100, Niklas Söderlund wrote:\n> On 2020-12-17 15:12:16 +0100, Jacopo Mondi wrote:\n> > On Tue, Dec 15, 2020 at 01:48:08AM +0100, Niklas Söderlund wrote:\n> > > Expose the device backing the CameraSensor instance.\n> > >\n> > > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > > ---\n> > > * Changes since v3\n> > > - New, needed to be able to move the DelayedControls handling out of\n> > >   CameraSensor.\n> > > ---\n> > >  include/libcamera/internal/camera_sensor.h | 2 ++\n> > >  src/libcamera/camera_sensor.cpp            | 6 ++++++\n> > >  2 files changed, 8 insertions(+)\n> > >\n> > > diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\n> > > index f80d836161a564e7..a70e024aa327f69b 100644\n> > > --- a/include/libcamera/internal/camera_sensor.h\n> > > +++ b/include/libcamera/internal/camera_sensor.h\n> > > @@ -61,6 +61,8 @@ public:\n> > >  \tControlList getControls(const std::vector<uint32_t> &ids);\n> > >  \tint setControls(ControlList *ctrls);\n> > >\n> > > +\tV4L2Subdevice *device() { return subdev_.get(); }\n> > > +\n> > >  \tconst ControlList &properties() const { return properties_; }\n> > >  \tint sensorInfo(CameraSensorInfo *info) const;\n> > >\n> > > diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> > > index 1628ba9c892b0eaf..df45b2b803617bfd 100644\n> > > --- a/src/libcamera/camera_sensor.cpp\n> > > +++ b/src/libcamera/camera_sensor.cpp\n> > > @@ -486,6 +486,12 @@ ControlList CameraSensor::getControls(const std::vector<uint32_t> &ids)\n> > >  \treturn subdev_->getControls(ids);\n> > >  }\n> > >\n> > > +/**\n> > > + * \\fn CameraSensor::device()\n> > > + * \\brief Retrieve the camera sensor device\n> > > + * \\return The camera sensor device\n> > > + */\n> > > +\n> > \n> > I wonder if subdevice() would be better.\n> > A minor though\n> \n> I thin device is 'nicer' as what it does is retrieve the device which \n> represents the sensor. That being said I don't feel strongly about it.  \n> And hopefully we can remove this method in the future and not expose it \n> outside CameraSensor. This is only needed until we decide how to best \n> integrate DelayedControls inside CameraSensro.\n\nCould you add a\n\n\t\\todo Remove this function by integrating DelayedControl with\n\tCameraSensor\n\n? With that,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nDo you have plans to address this integration ?\n\n> > Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n> \n> Thanks.\n> \n> > >  /**\n> > >   * \\fn CameraSensor::properties()\n> > >   * \\brief Retrieve the camera sensor properties","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 04504BD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 10 Jan 2021 14:04:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7D6B568063;\n\tSun, 10 Jan 2021 15:03:59 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DF84D60523\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 10 Jan 2021 15:03:57 +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 60FB23E;\n\tSun, 10 Jan 2021 15:03:57 +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=\"u1CyZ7s5\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1610287437;\n\tbh=r48e34fPa/LGStHK+8EKun4Z/xntLXFwAZfPHiWCjM8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=u1CyZ7s5RvUf3tFced4FUkorVVcexYRelDbBVP57w5C9u692qoCIuRRHEtcDUPCGR\n\tm4eY8dHyT3KucHsx4RnUKUnG/26txKy6Wn07FzWJjVHbrXbU0jSN00Rf5UovKi276S\n\tush6Bokbc9x/YgsjHpbitT4u67LMuESNVfSqflY4=","Date":"Sun, 10 Jan 2021 16:03:43 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<X/sJP743cRKVxl60@pendragon.ideasonboard.com>","References":"<20201215004811.602429-1-niklas.soderlund@ragnatech.se>\n\t<20201215004811.602429-6-niklas.soderlund@ragnatech.se>\n\t<20201217141216.xxxlpzvklkadzw4y@uno.localdomain>\n\t<X/h6NqCC39CZSv+9@oden.dyn.berto.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<X/h6NqCC39CZSv+9@oden.dyn.berto.se>","Subject":"Re: [libcamera-devel] [PATCH v4 5/8] libcamera: camera_sensor:\n\tExpose the camera device","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=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":14560,"web_url":"https://patchwork.libcamera.org/comment/14560/","msgid":"<YAK9MtLLiec3lprp@oden.dyn.berto.se>","date":"2021-01-16T10:17:22","subject":"Re: [libcamera-devel] [PATCH v4 5/8] libcamera: camera_sensor:\n\tExpose the camera device","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nThanks for your comment.\n\nOn 2021-01-10 16:03:43 +0200, Laurent Pinchart wrote:\n> Hi Niklas,\n> \n> Thank you for the patch.\n> \n> On Fri, Jan 08, 2021 at 04:28:54PM +0100, Niklas Söderlund wrote:\n> > On 2020-12-17 15:12:16 +0100, Jacopo Mondi wrote:\n> > > On Tue, Dec 15, 2020 at 01:48:08AM +0100, Niklas Söderlund wrote:\n> > > > Expose the device backing the CameraSensor instance.\n> > > >\n> > > > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > > > ---\n> > > > * Changes since v3\n> > > > - New, needed to be able to move the DelayedControls handling out of\n> > > >   CameraSensor.\n> > > > ---\n> > > >  include/libcamera/internal/camera_sensor.h | 2 ++\n> > > >  src/libcamera/camera_sensor.cpp            | 6 ++++++\n> > > >  2 files changed, 8 insertions(+)\n> > > >\n> > > > diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\n> > > > index f80d836161a564e7..a70e024aa327f69b 100644\n> > > > --- a/include/libcamera/internal/camera_sensor.h\n> > > > +++ b/include/libcamera/internal/camera_sensor.h\n> > > > @@ -61,6 +61,8 @@ public:\n> > > >  \tControlList getControls(const std::vector<uint32_t> &ids);\n> > > >  \tint setControls(ControlList *ctrls);\n> > > >\n> > > > +\tV4L2Subdevice *device() { return subdev_.get(); }\n> > > > +\n> > > >  \tconst ControlList &properties() const { return properties_; }\n> > > >  \tint sensorInfo(CameraSensorInfo *info) const;\n> > > >\n> > > > diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> > > > index 1628ba9c892b0eaf..df45b2b803617bfd 100644\n> > > > --- a/src/libcamera/camera_sensor.cpp\n> > > > +++ b/src/libcamera/camera_sensor.cpp\n> > > > @@ -486,6 +486,12 @@ ControlList CameraSensor::getControls(const std::vector<uint32_t> &ids)\n> > > >  \treturn subdev_->getControls(ids);\n> > > >  }\n> > > >\n> > > > +/**\n> > > > + * \\fn CameraSensor::device()\n> > > > + * \\brief Retrieve the camera sensor device\n> > > > + * \\return The camera sensor device\n> > > > + */\n> > > > +\n> > > \n> > > I wonder if subdevice() would be better.\n> > > A minor though\n> > \n> > I thin device is 'nicer' as what it does is retrieve the device which \n> > represents the sensor. That being said I don't feel strongly about it.  \n> > And hopefully we can remove this method in the future and not expose it \n> > outside CameraSensor. This is only needed until we decide how to best \n> > integrate DelayedControls inside CameraSensro.\n> \n> Could you add a\n> \n> \t\\todo Remove this function by integrating DelayedControl with\n> \tCameraSensor\n> \n> ? With that,\n\nGood idea.\n\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nThanks.\n\n> \n> Do you have plans to address this integration ?\n\nYes, I had a go at the integration in v1 and v2 but was pushed back to \nmake this series less controversial. I hope to find a way to integrate \nthis ASAP as I think some of the things this series introduce in \npipeline handlers are quiet ugly :-) I think the killer combo for the \nfirst integration step will be the addition of the camera \ndatabase/configuration files.\n\n> \n> > > Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n> > \n> > Thanks.\n> > \n> > > >  /**\n> > > >   * \\fn CameraSensor::properties()\n> > > >   * \\brief Retrieve the camera sensor properties\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 3C731BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 16 Jan 2021 10:17:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A0979680F9;\n\tSat, 16 Jan 2021 11:17:26 +0100 (CET)","from mail-lf1-x133.google.com (mail-lf1-x133.google.com\n\t[IPv6:2a00:1450:4864:20::133])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0B76E60108\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 16 Jan 2021 11:17:25 +0100 (CET)","by mail-lf1-x133.google.com with SMTP id a12so16947984lfl.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 16 Jan 2021 02:17:24 -0800 (PST)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tm16sm897220lfu.220.2021.01.16.02.17.23\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSat, 16 Jan 2021 02:17:23 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"RM1T0Ik2\"; dkim-atps=neutral","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=Z+xANAAtc7ZIX7KT4f84hd+ysihlpC4Hx2c+Ni9mWjQ=;\n\tb=RM1T0Ik2vwiG6orqJwLwvlGCClR2x0GDFUl74cCg9QfYddOPrAu02n+ep8mIrV+mqx\n\tsBilzhKZ3w9MEEpMMLJCW2eVHfVFJiXB2pEjNkog7r7hKohi/kcTbwdAItVKIWjEUgJg\n\t+8rbTyWTgUICMlangYhJCWyna0oeGeWPxADl9uKQuiXONNSsicUuzEw04XUiCSCqiy/Z\n\tbHyUoqyLNGkzIwXTVoQofnfc6J0Getu95b8Ybunn097rT9puzaQaEbSno4vZRfswN6Tl\n\tQk8Fj6zb3Q9Gsh+aorQi62gSawreHNdRbgkY0lGzUa+LI96j80wpnFXueO+ogNT5WJC9\n\tQr/g==","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=Z+xANAAtc7ZIX7KT4f84hd+ysihlpC4Hx2c+Ni9mWjQ=;\n\tb=VIIdtQXsi2T0JCZW9Rp/FEhSF2Q6FHuFDQFxrHmtNZELMNh8V9XCvqDYwT9O7GFDJ5\n\tu2tJaNlCATyeXYiAFOWcwP5lbe8YoWgFwivDzK92z3qpZElBlNof+1UVMLF+ESr2haa3\n\t+p3JC7VtTnILYz1YLV0pFzp55NEvzreUa2KpVO9v4Je7YCzNse/v6Foz9879jpnG8+vm\n\tRHpmokbn7HWpgeG2DJNyvsg2rSJ97dYE+Dap+KxXEOZUUcbibBm7wNcMDnf5MrCJ2CY9\n\twcfPhdHtZrwnKhG2IoI87CzrUhPjBGYNzCAHRJ9NszdtqZWlcEGftUTxGw5+5AkjeHV/\n\tkzDQ==","X-Gm-Message-State":"AOAM533gLR1iMUenxHHsknFNYCK5D9HSnlLJ0Oj7vSC2bUGZC5WgcYFv\n\tni2c+LyZPihI6YZlfmBdOSdM2vJL0GFXhrwP","X-Google-Smtp-Source":"ABdhPJxJgiZhSH3X2A6tgOuoc2DsPyLV51WfHO5EJhl2eP+iPgN+kqSvPfOOtH8JFbHvLsB/sogXxw==","X-Received":"by 2002:a19:675d:: with SMTP id\n\te29mr6967076lfj.491.1610792244470; \n\tSat, 16 Jan 2021 02:17:24 -0800 (PST)","Date":"Sat, 16 Jan 2021 11:17:22 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<YAK9MtLLiec3lprp@oden.dyn.berto.se>","References":"<20201215004811.602429-1-niklas.soderlund@ragnatech.se>\n\t<20201215004811.602429-6-niklas.soderlund@ragnatech.se>\n\t<20201217141216.xxxlpzvklkadzw4y@uno.localdomain>\n\t<X/h6NqCC39CZSv+9@oden.dyn.berto.se>\n\t<X/sJP743cRKVxl60@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<X/sJP743cRKVxl60@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v4 5/8] libcamera: camera_sensor:\n\tExpose the camera device","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=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]