[{"id":18068,"web_url":"https://patchwork.libcamera.org/comment/18068/","msgid":"<20210709162441.tz4a7l5ldnihc3qn@uno.localdomain>","date":"2021-07-09T16:24:41","subject":"Re: [libcamera-devel] [PATCH v6 6/8] pipeline: raspberrypi: Use\n\tpriority write for vblank when writing sensor ctrls","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"On Fri, Jul 09, 2021 at 03:58:23PM +0100, Naushir Patuck wrote:\n> When directly writing controls to the sensor device, ensure that VBLANK is\n> written ahead of and before the EXPOSURE control. This is the same priority\n> write mechanism used in DelayedControls.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  .../pipeline/raspberrypi/raspberrypi.cpp      | 41 ++++++++++++++-----\n>  1 file changed, 31 insertions(+), 10 deletions(-)\n>\n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 082eb1ee1c23..e09328ffa0bc 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -154,6 +154,7 @@ public:\n>  \tvoid embeddedComplete(uint32_t bufferId);\n>  \tvoid setIspControls(const ControlList &controls);\n>  \tvoid setDelayedControls(const ControlList &controls);\n> +\tvoid setSensorControls(ControlList &controls);\n>\n>  \t/* bufferComplete signal handlers. */\n>  \tvoid unicamBufferDequeue(FrameBuffer *buffer);\n> @@ -828,7 +829,7 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)\n>\n>  \t/* Apply any gain/exposure settings that the IPA may have passed back. */\n>  \tif (!startConfig.controls.empty())\n> -\t\tdata->unicam_[Unicam::Image].dev()->setControls(&startConfig.controls);\n> +\t\tdata->setSensorControls(startConfig.controls);\n>\n>  \t/* Configure the number of dropped frames required on startup. */\n>  \tdata->dropFrameCount_ = startConfig.dropFrameCount;\n> @@ -1294,22 +1295,20 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n>  \t\treturn -EPIPE;\n>  \t}\n>\n> -\tif (!controls.empty())\n> -\t\tunicam_[Unicam::Image].dev()->setControls(&controls);\n> -\n>  \t/*\n>  \t * Configure the H/V flip controls based on the combination of\n>  \t * the sensor and user transform.\n>  \t */\n>  \tif (supportsFlips_) {\n> -\t\tControlList ctrls(unicam_[Unicam::Image].dev()->controls());\n> -\t\tctrls.set(V4L2_CID_HFLIP,\n> -\t\t\t  static_cast<int32_t>(!!(rpiConfig->combinedTransform_ & Transform::HFlip)));\n> -\t\tctrls.set(V4L2_CID_VFLIP,\n> -\t\t\t  static_cast<int32_t>(!!(rpiConfig->combinedTransform_ & Transform::VFlip)));\n> -\t\tunicam_[Unicam::Image].dev()->setControls(&ctrls);\n> +\t\tcontrols.set(V4L2_CID_HFLIP,\n> +\t\t\t     static_cast<int32_t>(!!(rpiConfig->combinedTransform_ & Transform::HFlip)));\n> +\t\tcontrols.set(V4L2_CID_VFLIP,\n> +\t\t\t     static_cast<int32_t>(!!(rpiConfig->combinedTransform_ & Transform::VFlip)));\n>  \t}\n>\n> +\tif (!controls.empty())\n> +\t\tsetSensorControls(controls);\n> +\n>  \treturn 0;\n>  }\n>\n> @@ -1379,6 +1378,28 @@ void RPiCameraData::setDelayedControls(const ControlList &controls)\n>  \thandleState();\n>  }\n>\n> +void RPiCameraData::setSensorControls(ControlList &controls)\n> +{\n> +\t/*\n> +\t * We need to ensure that if both VBLANK and EXPOSURE are present, the\n> +\t * former must be written ahead of, and separately from EXPOSURE to avoid\n> +\t * V4L2 rejecting the latter. This is identical to what DelayedControls\n> +\t * does with the priority write flag.\n> +\t *\n> +\t * As a consequence of the below logic, VBLANK gets set twice, and we\n> +\t * rely on the v4l2 framework to not pass the second control set to the\n> +\t * driver as the actual control value has not changed.\n> +\t */\n> +\tif (controls.contains(V4L2_CID_EXPOSURE) && controls.contains(V4L2_CID_VBLANK)) {\n> +\t\tControlList vblank_ctrl;\n> +\n> +\t\tvblank_ctrl.set(V4L2_CID_VBLANK, controls.get(V4L2_CID_VBLANK));\n> +\t\tunicam_[Unicam::Image].dev()->setControls(&vblank_ctrl);\n> +\t}\n> +\n> +\tunicam_[Unicam::Image].dev()->setControls(&controls);\n> +}\n> +\n\nUff, v4l2...\n\nI see another usage of setControls() at match time, but it should not\ninvolve VBLANK, so it could be kept the way it is\n\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n  j\n\n>  void RPiCameraData::unicamBufferDequeue(FrameBuffer *buffer)\n>  {\n>  \tRPi::Stream *stream = nullptr;\n> --\n> 2.25.1\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 C2BCEC3224\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  9 Jul 2021 16:23:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 508B2684E7;\n\tFri,  9 Jul 2021 18:23:55 +0200 (CEST)","from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E2CD7605AC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  9 Jul 2021 18:23:53 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id 5DF5D200003;\n\tFri,  9 Jul 2021 16:23:53 +0000 (UTC)"],"Date":"Fri, 9 Jul 2021 18:24:41 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<20210709162441.tz4a7l5ldnihc3qn@uno.localdomain>","References":"<20210709145825.2943443-1-naush@raspberrypi.com>\n\t<20210709145825.2943443-7-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210709145825.2943443-7-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v6 6/8] pipeline: raspberrypi: Use\n\tpriority write for vblank when writing sensor ctrls","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","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":18080,"web_url":"https://patchwork.libcamera.org/comment/18080/","msgid":"<YOs/6AE6cECqUeWm@pendragon.ideasonboard.com>","date":"2021-07-11T19:00:56","subject":"Re: [libcamera-devel] [PATCH v6 6/8] pipeline: raspberrypi: Use\n\tpriority write for vblank when writing sensor ctrls","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nThank you for the patch.\n\nOn Fri, Jul 09, 2021 at 03:58:23PM +0100, Naushir Patuck wrote:\n> When directly writing controls to the sensor device, ensure that VBLANK is\n> written ahead of and before the EXPOSURE control. This is the same priority\n> write mechanism used in DelayedControls.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  .../pipeline/raspberrypi/raspberrypi.cpp      | 41 ++++++++++++++-----\n>  1 file changed, 31 insertions(+), 10 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 082eb1ee1c23..e09328ffa0bc 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -154,6 +154,7 @@ public:\n>  \tvoid embeddedComplete(uint32_t bufferId);\n>  \tvoid setIspControls(const ControlList &controls);\n>  \tvoid setDelayedControls(const ControlList &controls);\n> +\tvoid setSensorControls(ControlList &controls);\n>  \n>  \t/* bufferComplete signal handlers. */\n>  \tvoid unicamBufferDequeue(FrameBuffer *buffer);\n> @@ -828,7 +829,7 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)\n>  \n>  \t/* Apply any gain/exposure settings that the IPA may have passed back. */\n>  \tif (!startConfig.controls.empty())\n> -\t\tdata->unicam_[Unicam::Image].dev()->setControls(&startConfig.controls);\n> +\t\tdata->setSensorControls(startConfig.controls);\n>  \n>  \t/* Configure the number of dropped frames required on startup. */\n>  \tdata->dropFrameCount_ = startConfig.dropFrameCount;\n> @@ -1294,22 +1295,20 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n>  \t\treturn -EPIPE;\n>  \t}\n>  \n> -\tif (!controls.empty())\n> -\t\tunicam_[Unicam::Image].dev()->setControls(&controls);\n> -\n>  \t/*\n>  \t * Configure the H/V flip controls based on the combination of\n>  \t * the sensor and user transform.\n>  \t */\n>  \tif (supportsFlips_) {\n> -\t\tControlList ctrls(unicam_[Unicam::Image].dev()->controls());\n> -\t\tctrls.set(V4L2_CID_HFLIP,\n> -\t\t\t  static_cast<int32_t>(!!(rpiConfig->combinedTransform_ & Transform::HFlip)));\n> -\t\tctrls.set(V4L2_CID_VFLIP,\n> -\t\t\t  static_cast<int32_t>(!!(rpiConfig->combinedTransform_ & Transform::VFlip)));\n> -\t\tunicam_[Unicam::Image].dev()->setControls(&ctrls);\n> +\t\tcontrols.set(V4L2_CID_HFLIP,\n> +\t\t\t     static_cast<int32_t>(!!(rpiConfig->combinedTransform_ & Transform::HFlip)));\n> +\t\tcontrols.set(V4L2_CID_VFLIP,\n> +\t\t\t     static_cast<int32_t>(!!(rpiConfig->combinedTransform_ & Transform::VFlip)));\n>  \t}\n>  \n> +\tif (!controls.empty())\n> +\t\tsetSensorControls(controls);\n> +\n>  \treturn 0;\n>  }\n>  \n> @@ -1379,6 +1378,28 @@ void RPiCameraData::setDelayedControls(const ControlList &controls)\n>  \thandleState();\n>  }\n>  \n> +void RPiCameraData::setSensorControls(ControlList &controls)\n> +{\n> +\t/*\n> +\t * We need to ensure that if both VBLANK and EXPOSURE are present, the\n> +\t * former must be written ahead of, and separately from EXPOSURE to avoid\n> +\t * V4L2 rejecting the latter. This is identical to what DelayedControls\n> +\t * does with the priority write flag.\n> +\t *\n> +\t * As a consequence of the below logic, VBLANK gets set twice, and we\n> +\t * rely on the v4l2 framework to not pass the second control set to the\n> +\t * driver as the actual control value has not changed.\n> +\t */\n> +\tif (controls.contains(V4L2_CID_EXPOSURE) && controls.contains(V4L2_CID_VBLANK)) {\n> +\t\tControlList vblank_ctrl;\n> +\n> +\t\tvblank_ctrl.set(V4L2_CID_VBLANK, controls.get(V4L2_CID_VBLANK));\n> +\t\tunicam_[Unicam::Image].dev()->setControls(&vblank_ctrl);\n> +\t}\n> +\n> +\tunicam_[Unicam::Image].dev()->setControls(&controls);\n> +}\n> +\n>  void RPiCameraData::unicamBufferDequeue(FrameBuffer *buffer)\n>  {\n>  \tRPi::Stream *stream = nullptr;","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 84C71BD794\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 11 Jul 2021 19:01:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F24EA6851D;\n\tSun, 11 Jul 2021 21:01:43 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8EDB168519\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 11 Jul 2021 21:01:42 +0200 (CEST)","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 0A2AFCC;\n\tSun, 11 Jul 2021 21:01:41 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"bsV0ms5a\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1626030102;\n\tbh=O1XE/eX3m/ed/nH8P9sWvi0Gahfb9XDORLvbAqdmH80=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=bsV0ms5aXktP+0xIeiP5uRFv1TtcAvgheQ5/fYzbbSJgjW9++UJ18Gfiy4TVN/+zB\n\tjGZUF6RuQ/3VthI3YrrZTLmtlia+MGs9Yf+9EHEv+DDC+KdKXV58HGs0z3z2GblfBT\n\tDhQGYWeyJSegdex0c71haUsNrw+PdeQrjjQBb1Ag=","Date":"Sun, 11 Jul 2021 22:00:56 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<YOs/6AE6cECqUeWm@pendragon.ideasonboard.com>","References":"<20210709145825.2943443-1-naush@raspberrypi.com>\n\t<20210709145825.2943443-7-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210709145825.2943443-7-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v6 6/8] pipeline: raspberrypi: Use\n\tpriority write for vblank when writing sensor ctrls","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","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":18107,"web_url":"https://patchwork.libcamera.org/comment/18107/","msgid":"<CAEmqJPoo8bh-tgu==DN61AvV==pQr-r9QMV69Nf34sSZQhRVCw@mail.gmail.com>","date":"2021-07-12T09:22:20","subject":"Re: [libcamera-devel] [PATCH v6 6/8] pipeline: raspberrypi: Use\n\tpriority write for vblank when writing sensor ctrls","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Jacopo,\n\nThank you for your review feedback for all this series.\n\nOn Fri, 9 Jul 2021 at 17:23, Jacopo Mondi <jacopo@jmondi.org> wrote:\n\n> On Fri, Jul 09, 2021 at 03:58:23PM +0100, Naushir Patuck wrote:\n> > When directly writing controls to the sensor device, ensure that VBLANK\n> is\n> > written ahead of and before the EXPOSURE control. This is the same\n> priority\n> > write mechanism used in DelayedControls.\n> >\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > ---\n> >  .../pipeline/raspberrypi/raspberrypi.cpp      | 41 ++++++++++++++-----\n> >  1 file changed, 31 insertions(+), 10 deletions(-)\n> >\n> > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > index 082eb1ee1c23..e09328ffa0bc 100644\n> > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > @@ -154,6 +154,7 @@ public:\n> >       void embeddedComplete(uint32_t bufferId);\n> >       void setIspControls(const ControlList &controls);\n> >       void setDelayedControls(const ControlList &controls);\n> > +     void setSensorControls(ControlList &controls);\n> >\n> >       /* bufferComplete signal handlers. */\n> >       void unicamBufferDequeue(FrameBuffer *buffer);\n> > @@ -828,7 +829,7 @@ int PipelineHandlerRPi::start(Camera *camera, const\n> ControlList *controls)\n> >\n> >       /* Apply any gain/exposure settings that the IPA may have passed\n> back. */\n> >       if (!startConfig.controls.empty())\n> > -\n>  data->unicam_[Unicam::Image].dev()->setControls(&startConfig.controls);\n> > +             data->setSensorControls(startConfig.controls);\n> >\n> >       /* Configure the number of dropped frames required on startup. */\n> >       data->dropFrameCount_ = startConfig.dropFrameCount;\n> > @@ -1294,22 +1295,20 @@ int RPiCameraData::configureIPA(const\n> CameraConfiguration *config)\n> >               return -EPIPE;\n> >       }\n> >\n> > -     if (!controls.empty())\n> > -             unicam_[Unicam::Image].dev()->setControls(&controls);\n> > -\n> >       /*\n> >        * Configure the H/V flip controls based on the combination of\n> >        * the sensor and user transform.\n> >        */\n> >       if (supportsFlips_) {\n> > -             ControlList\n> ctrls(unicam_[Unicam::Image].dev()->controls());\n> > -             ctrls.set(V4L2_CID_HFLIP,\n> > -\n>  static_cast<int32_t>(!!(rpiConfig->combinedTransform_ &\n> Transform::HFlip)));\n> > -             ctrls.set(V4L2_CID_VFLIP,\n> > -\n>  static_cast<int32_t>(!!(rpiConfig->combinedTransform_ &\n> Transform::VFlip)));\n> > -             unicam_[Unicam::Image].dev()->setControls(&ctrls);\n> > +             controls.set(V4L2_CID_HFLIP,\n> > +\n> static_cast<int32_t>(!!(rpiConfig->combinedTransform_ & Transform::HFlip)));\n> > +             controls.set(V4L2_CID_VFLIP,\n> > +\n> static_cast<int32_t>(!!(rpiConfig->combinedTransform_ & Transform::VFlip)));\n> >       }\n> >\n> > +     if (!controls.empty())\n> > +             setSensorControls(controls);\n> > +\n> >       return 0;\n> >  }\n> >\n> > @@ -1379,6 +1378,28 @@ void RPiCameraData::setDelayedControls(const\n> ControlList &controls)\n> >       handleState();\n> >  }\n> >\n> > +void RPiCameraData::setSensorControls(ControlList &controls)\n> > +{\n> > +     /*\n> > +      * We need to ensure that if both VBLANK and EXPOSURE are present,\n> the\n> > +      * former must be written ahead of, and separately from EXPOSURE\n> to avoid\n> > +      * V4L2 rejecting the latter. This is identical to what\n> DelayedControls\n> > +      * does with the priority write flag.\n> > +      *\n> > +      * As a consequence of the below logic, VBLANK gets set twice, and\n> we\n> > +      * rely on the v4l2 framework to not pass the second control set\n> to the\n> > +      * driver as the actual control value has not changed.\n> > +      */\n> > +     if (controls.contains(V4L2_CID_EXPOSURE) &&\n> controls.contains(V4L2_CID_VBLANK)) {\n> > +             ControlList vblank_ctrl;\n> > +\n> > +             vblank_ctrl.set(V4L2_CID_VBLANK,\n> controls.get(V4L2_CID_VBLANK));\n> > +             unicam_[Unicam::Image].dev()->setControls(&vblank_ctrl);\n> > +     }\n> > +\n> > +     unicam_[Unicam::Image].dev()->setControls(&controls);\n> > +}\n> > +\n>\n> Uff, v4l2...\n>\n> I see another usage of setControls() at match time, but it should not\n> involve VBLANK, so it could be kept the way it is\n>\n\nGood spot, i'll switch to using RPiCameraData::setSensorControls for that\ncall\nin the next revision.\n\nRegards,\nNaush\n\n\n\n>\n> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n>\n> Thanks\n>   j\n>\n> >  void RPiCameraData::unicamBufferDequeue(FrameBuffer *buffer)\n> >  {\n> >       RPi::Stream *stream = nullptr;\n> > --\n> > 2.25.1\n> >\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 D6C0DC3225\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 12 Jul 2021 09:22:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4D43668526;\n\tMon, 12 Jul 2021 11:22:39 +0200 (CEST)","from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com\n\t[IPv6:2a00:1450:4864:20::12e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 25F4068506\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 12 Jul 2021 11:22:37 +0200 (CEST)","by mail-lf1-x12e.google.com with SMTP id a18so41996482lfs.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 12 Jul 2021 02:22:37 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"icI1JOWo\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=GbD+ATksYdHmoh2Awc4vZWQfcj5mBdkvXOlrCbKN68c=;\n\tb=icI1JOWoZx4r7ctU85ToJ3P9RCfw37MEzLmK1JqLsGAZ6VcDBIL4quw61SIoK3Nhah\n\t12xPGGTi/WP6IZ2+n/0PKFxUiiejSMECFZdpGLwQ/EZdrcwInUgLakuRccqhxP3UX4F4\n\t0z0eTekNiVp+vXkxQGgekx85vHRCSZxOIOm2t3sscRhSr7EPtYn5NElmuTFd1P4GSsAy\n\tQS1aeUPHfMKRGecVv55X6MC+vtSnsQ9pdz4xZp2O0bj17yymKTh/bhXF3DnG85rv5bAF\n\tja5mlJl+8/QA+zMUf4EBIMEcl4S6D2dBVOgSWakUROGwMQoslHRqRKw0M/jgOBLJwMWM\n\tYgmA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=GbD+ATksYdHmoh2Awc4vZWQfcj5mBdkvXOlrCbKN68c=;\n\tb=mHt1Gchl9BPkhR+uOOdx/sStgBOUBei0cguaxpSwmD2KivrrC6hBZ0MwOjQxxgm2ky\n\ty2Ep+r1TeHOgKlEZnv1E6vRZSr6ehLk+jAThOo10Vk1HjkNaOQWbGtfuSyiUcJuxfxxf\n\tNIbAs1z3ZyRKHzJJxcl5DmRIkTWa2kyhGWFPJylStKFcfBoO1SiEyU9j7VfyqSDBvfZG\n\tDCMz0X6H3WQ4+khuLZbGvufbzXFBlL5TU1ma/lwOgHa5e6/cwZXlCd98aUGejYIW88BT\n\tkr3KSi94V/wpq42kbd6qgLlr1Ri4Q2sscso7pbQoGT0WhOJYOmycVZlsq81g2NzIE/+u\n\tv4Hg==","X-Gm-Message-State":"AOAM530++DI2O9a2/GruArVElUthHyWt+xUD54qsdgOrBV2qfrXqP0y0\n\tpJ1+WXqnWuj46rn6ePgVBoeC9nnpS71fInxnrJ0AcwpJELg=","X-Google-Smtp-Source":"ABdhPJzfhrSmz1A16D+Z3fZPYzZaCko0kh0qLUbN7eB2Su4UfcnA/gnWr4kEnm3W3PyaaePxlxodCS5OFJrURf8LEvk=","X-Received":"by 2002:ac2:5288:: with SMTP id\n\tq8mr12678113lfm.133.1626081756444; \n\tMon, 12 Jul 2021 02:22:36 -0700 (PDT)","MIME-Version":"1.0","References":"<20210709145825.2943443-1-naush@raspberrypi.com>\n\t<20210709145825.2943443-7-naush@raspberrypi.com>\n\t<20210709162441.tz4a7l5ldnihc3qn@uno.localdomain>","In-Reply-To":"<20210709162441.tz4a7l5ldnihc3qn@uno.localdomain>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Mon, 12 Jul 2021 10:22:20 +0100","Message-ID":"<CAEmqJPoo8bh-tgu==DN61AvV==pQr-r9QMV69Nf34sSZQhRVCw@mail.gmail.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Content-Type":"multipart/alternative; boundary=\"000000000000780b5a05c6e9a989\"","Subject":"Re: [libcamera-devel] [PATCH v6 6/8] pipeline: raspberrypi: Use\n\tpriority write for vblank when writing sensor ctrls","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]