[{"id":22615,"web_url":"https://patchwork.libcamera.org/comment/22615/","msgid":"<Yk14pjxeQZKwCzPB@pendragon.ideasonboard.com>","date":"2022-04-06T11:25:26","subject":"Re: [libcamera-devel] [PATCH v4 2/3] pipeline: raspberrypi: Add a\n\tUnicam dequeue timeout","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 Wed, Apr 06, 2022 at 08:58:58AM +0100, Naushir Patuck wrote:\n> From: Naushir Patuck via libcamera-devel <libcamera-devel@lists.libcamera.org>\n\nHere too.\n\n> Enable the V4L2VideoDevice dequeue timeout for the Unicam Image node, and\n> connect the timeout signal to a slot in the pipeline handler. This slot will\n> log an error message informing the user of a possible hardware stall.\n> \n> The timeout is calculated as 2x the maximum frame length possible for a given\n> mode, returned by the IPA.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  include/libcamera/ipa/raspberrypi.mojom           |  1 +\n>  src/ipa/raspberrypi/raspberrypi.cpp               |  2 ++\n>  .../pipeline/raspberrypi/raspberrypi.cpp          | 15 +++++++++++++++\n>  3 files changed, 18 insertions(+)\n> \n> diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\n> index acd3cafe6c91..5a228b75cd2f 100644\n> --- a/include/libcamera/ipa/raspberrypi.mojom\n> +++ b/include/libcamera/ipa/raspberrypi.mojom\n> @@ -41,6 +41,7 @@ struct IPAConfig {\n>  struct StartConfig {\n>  \tlibcamera.ControlList controls;\n>  \tint32 dropFrameCount;\n> +\tuint32 maxSensorFrameLengthMs;\n>  };\n>  \n>  interface IPARPiInterface {\n> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> index 1bf4e270b062..89767a9db471 100644\n> --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> @@ -280,6 +280,8 @@ void IPARPi::start(const ControlList &controls, ipa::RPi::StartConfig *startConf\n>  \t}\n>  \n>  \tstartConfig->dropFrameCount = dropFrameCount_;\n> +\tconst Duration maxSensorFrameDuration = mode_.max_frame_length * mode_.line_length;\n> +\tstartConfig->maxSensorFrameLengthMs = maxSensorFrameDuration.get<std::milli>();\n>  \n>  \tfirstStart_ = false;\n>  \tlastRunTimestamp_ = 0;\n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 8fd79be67988..98c463e39548 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -45,6 +45,8 @@\n>  #include \"dma_heaps.h\"\n>  #include \"rpi_stream.h\"\n>  \n> +using namespace std::chrono_literals;\n> +\n>  namespace libcamera {\n>  \n>  LOG_DEFINE_CATEGORY(RPI)\n> @@ -208,6 +210,7 @@ public:\n>  \tvoid setIspControls(const ControlList &controls);\n>  \tvoid setDelayedControls(const ControlList &controls);\n>  \tvoid setSensorControls(ControlList &controls);\n> +\tvoid unicamTimeout();\n>  \n>  \t/* bufferComplete signal handlers. */\n>  \tvoid unicamBufferDequeue(FrameBuffer *buffer);\n> @@ -1050,6 +1053,10 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)\n>  \t\t}\n>  \t}\n>  \n> +\t/* Set the dequeue timeout to 2x the maximum possible frame duration. */\n> +\tutils::duration timeout(2 * startConfig.maxSensorFrameLengthMs * 1ms);\n\nThis is a utils::duration, but setDequeueTimeout takes a\nutils::Duration (what have we done... ?). It will compile and I think do\nthe right thing thanks to implicit conversion, but it would be better to\nuse utils::Duration.\n\nI could fix this locally too, but I'd feel better if you could test it,\nwould you mind sending a v5 that would also take the comments on 1/3\ninto account ?\n\n> +\tdata->unicam_[Unicam::Image].dev()->setDequeueTimeout(timeout);\n> +\n>  \treturn 0;\n>  }\n>  \n> @@ -1192,6 +1199,7 @@ int PipelineHandlerRPi::registerCamera(MediaDevice *unicam, MediaDevice *isp, Me\n>  \tdata->isp_[Isp::Stats] = RPi::Stream(\"ISP Stats\", ispCapture3);\n>  \n>  \t/* Wire up all the buffer connections. */\n> +\tdata->unicam_[Unicam::Image].dev()->dequeueTimeout.connect(data.get(), &RPiCameraData::unicamTimeout);\n>  \tdata->unicam_[Unicam::Image].dev()->frameStart.connect(data.get(), &RPiCameraData::frameStarted);\n>  \tdata->unicam_[Unicam::Image].dev()->bufferReady.connect(data.get(), &RPiCameraData::unicamBufferDequeue);\n>  \tdata->isp_[Isp::Input].dev()->bufferReady.connect(data.get(), &RPiCameraData::ispInputDequeue);\n> @@ -1773,6 +1781,13 @@ void RPiCameraData::setSensorControls(ControlList &controls)\n>  \tsensor_->setControls(&controls);\n>  }\n>  \n> +void RPiCameraData::unicamTimeout()\n> +{\n> +\tLOG(RPI, Error) << \"Unicam has timed out!\";\n> +\tLOG(RPI, Error) << \"Please check that your camera sensor connector is attached securely.\";\n> +\tLOG(RPI, Error) << \"Alternatively, try another cable and/or sensor.\";\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 CBF39C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  6 Apr 2022 11:25:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3464265643;\n\tWed,  6 Apr 2022 13:25:32 +0200 (CEST)","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 F2392604B8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Apr 2022 13:25:30 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(117.145-247-81.adsl-dyn.isp.belgacom.be [81.247.145.117])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6DEA1482;\n\tWed,  6 Apr 2022 13:25:30 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1649244332;\n\tbh=OkodtWBvOkiSy7AvgZ8UEIKclLkD8+I4mfP3eMzmSN4=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=crsAGDmb7ZqpC2tlxebI23wkcAdwUD01Zrgjd0JC0KKGd+24bF7osWDEvNyHLIfE6\n\t4gDAXvztzOZbcNeGhVcegGLpQB8hD9j5eNBI+z4AL522K7odyVOyvQ9wtPXedwLFhk\n\ts4PxOvwYrLQk8Yi8AAzIjE+Rfq5VYrHIgrwkuWMp+JCjKBKutx5y8jvSCAWL25X3GD\n\tat3wnn+PMq4evsIUswd6QGDIuWt5w1Rz6iByEJhzIQM2wSA64K+coM51UrCrp6okbK\n\t0a0y7XmCchFEOLQD7oZZ+0r5Kg6NJ9dG6htFm4L4IjpXX9s0c3Jkhftt9hFipid9Tw\n\tiVGvK+eI4SvJg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1649244330;\n\tbh=OkodtWBvOkiSy7AvgZ8UEIKclLkD8+I4mfP3eMzmSN4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=IEBV3+Glxd4iAJKspXf/Ego5rpXWNxkh8Y+MWmQv0mcKR/Dgkqo91sZTNpKPyPqb8\n\tB/BDcCfu+aVhiIUOlTZI+FCeoGSU/hN9/McRnsAly4uvOQNQinPM6xerz5rLINBk68\n\tnKIaSgn9bNFlIafYGa69cODMnXpyGxsQQrdfXRDQ="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"IEBV3+Gl\"; dkim-atps=neutral","Date":"Wed, 6 Apr 2022 14:25:26 +0300","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<Yk14pjxeQZKwCzPB@pendragon.ideasonboard.com>","References":"<20220406075859.3857121-1-naush@raspberrypi.com>\n\t<20220406075859.3857121-3-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220406075859.3857121-3-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v4 2/3] pipeline: raspberrypi: Add a\n\tUnicam dequeue timeout","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":22616,"web_url":"https://patchwork.libcamera.org/comment/22616/","msgid":"<CAEmqJPrQtKjNsYMrpVw35WKPD5KkMjeDg1AMKoYnD2ruVTTCeQ@mail.gmail.com>","date":"2022-04-06T11:35:58","subject":"Re: [libcamera-devel] [PATCH v4 2/3] pipeline: raspberrypi: Add a\n\tUnicam dequeue timeout","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Laurent,\n\nOn Wed, 6 Apr 2022 at 12:25, Laurent Pinchart <\nlaurent.pinchart@ideasonboard.com> wrote:\n\n> Hi Naush,\n>\n> Thank you for the patch.\n>\n> On Wed, Apr 06, 2022 at 08:58:58AM +0100, Naushir Patuck wrote:\n> > From: Naushir Patuck via libcamera-devel <\n> libcamera-devel@lists.libcamera.org>\n>\n> Here too.\n>\n\nI don't really know what went wrong with this. I use my normal git-pw\nworkflow to pull\nthe tagged patches from patchworks onto my tree, and normally it does the\nright thing.\n\nOh well.... I'll fix it up.\n\n\n>\n> > Enable the V4L2VideoDevice dequeue timeout for the Unicam Image node, and\n> > connect the timeout signal to a slot in the pipeline handler. This slot\n> will\n> > log an error message informing the user of a possible hardware stall.\n> >\n> > The timeout is calculated as 2x the maximum frame length possible for a\n> given\n> > mode, returned by the IPA.\n> >\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  include/libcamera/ipa/raspberrypi.mojom           |  1 +\n> >  src/ipa/raspberrypi/raspberrypi.cpp               |  2 ++\n> >  .../pipeline/raspberrypi/raspberrypi.cpp          | 15 +++++++++++++++\n> >  3 files changed, 18 insertions(+)\n> >\n> > diff --git a/include/libcamera/ipa/raspberrypi.mojom\n> b/include/libcamera/ipa/raspberrypi.mojom\n> > index acd3cafe6c91..5a228b75cd2f 100644\n> > --- a/include/libcamera/ipa/raspberrypi.mojom\n> > +++ b/include/libcamera/ipa/raspberrypi.mojom\n> > @@ -41,6 +41,7 @@ struct IPAConfig {\n> >  struct StartConfig {\n> >       libcamera.ControlList controls;\n> >       int32 dropFrameCount;\n> > +     uint32 maxSensorFrameLengthMs;\n> >  };\n> >\n> >  interface IPARPiInterface {\n> > diff --git a/src/ipa/raspberrypi/raspberrypi.cpp\n> b/src/ipa/raspberrypi/raspberrypi.cpp\n> > index 1bf4e270b062..89767a9db471 100644\n> > --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> > +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> > @@ -280,6 +280,8 @@ void IPARPi::start(const ControlList &controls,\n> ipa::RPi::StartConfig *startConf\n> >       }\n> >\n> >       startConfig->dropFrameCount = dropFrameCount_;\n> > +     const Duration maxSensorFrameDuration = mode_.max_frame_length *\n> mode_.line_length;\n> > +     startConfig->maxSensorFrameLengthMs =\n> maxSensorFrameDuration.get<std::milli>();\n> >\n> >       firstStart_ = false;\n> >       lastRunTimestamp_ = 0;\n> > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > index 8fd79be67988..98c463e39548 100644\n> > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > @@ -45,6 +45,8 @@\n> >  #include \"dma_heaps.h\"\n> >  #include \"rpi_stream.h\"\n> >\n> > +using namespace std::chrono_literals;\n> > +\n> >  namespace libcamera {\n> >\n> >  LOG_DEFINE_CATEGORY(RPI)\n> > @@ -208,6 +210,7 @@ public:\n> >       void setIspControls(const ControlList &controls);\n> >       void setDelayedControls(const ControlList &controls);\n> >       void setSensorControls(ControlList &controls);\n> > +     void unicamTimeout();\n> >\n> >       /* bufferComplete signal handlers. */\n> >       void unicamBufferDequeue(FrameBuffer *buffer);\n> > @@ -1050,6 +1053,10 @@ int PipelineHandlerRPi::start(Camera *camera,\n> const ControlList *controls)\n> >               }\n> >       }\n> >\n> > +     /* Set the dequeue timeout to 2x the maximum possible frame\n> duration. */\n> > +     utils::duration timeout(2 * startConfig.maxSensorFrameLengthMs *\n> 1ms);\n>\n> This is a utils::duration, but setDequeueTimeout takes a\n> utils::Duration (what have we done... ?). It will compile and I think do\n> the right thing thanks to implicit conversion, but it would be better to\n> use utils::Duration.\n>\n\nOuch good catch!\n\n\n>\n> I could fix this locally too, but I'd feel better if you could test it,\n> would you mind sending a v5 that would also take the comments on 1/3\n> into account ?\n>\n\nNo problem.  I'll fix this and test before pushing another version.\n\nRegards,\nNaush\n\n\n>\n> > +     data->unicam_[Unicam::Image].dev()->setDequeueTimeout(timeout);\n> > +\n> >       return 0;\n> >  }\n> >\n> > @@ -1192,6 +1199,7 @@ int PipelineHandlerRPi::registerCamera(MediaDevice\n> *unicam, MediaDevice *isp, Me\n> >       data->isp_[Isp::Stats] = RPi::Stream(\"ISP Stats\", ispCapture3);\n> >\n> >       /* Wire up all the buffer connections. */\n> > +\n>  data->unicam_[Unicam::Image].dev()->dequeueTimeout.connect(data.get(),\n> &RPiCameraData::unicamTimeout);\n> >       data->unicam_[Unicam::Image].dev()->frameStart.connect(data.get(),\n> &RPiCameraData::frameStarted);\n> >\n>  data->unicam_[Unicam::Image].dev()->bufferReady.connect(data.get(),\n> &RPiCameraData::unicamBufferDequeue);\n> >       data->isp_[Isp::Input].dev()->bufferReady.connect(data.get(),\n> &RPiCameraData::ispInputDequeue);\n> > @@ -1773,6 +1781,13 @@ void RPiCameraData::setSensorControls(ControlList\n> &controls)\n> >       sensor_->setControls(&controls);\n> >  }\n> >\n> > +void RPiCameraData::unicamTimeout()\n> > +{\n> > +     LOG(RPI, Error) << \"Unicam has timed out!\";\n> > +     LOG(RPI, Error) << \"Please check that your camera sensor connector\n> is attached securely.\";\n> > +     LOG(RPI, Error) << \"Alternatively, try another cable and/or\n> sensor.\";\n> > +}\n> > +\n> >  void RPiCameraData::unicamBufferDequeue(FrameBuffer *buffer)\n> >  {\n> >       RPi::Stream *stream = nullptr;\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\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 5296BC0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  6 Apr 2022 11:36:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7884265646;\n\tWed,  6 Apr 2022 13:36:17 +0200 (CEST)","from mail-lf1-x130.google.com (mail-lf1-x130.google.com\n\t[IPv6:2a00:1450:4864:20::130])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7D8D3604B8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Apr 2022 13:36:15 +0200 (CEST)","by mail-lf1-x130.google.com with SMTP id d5so3549070lfj.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 06 Apr 2022 04:36:15 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1649244977;\n\tbh=4ai1qymIvt7jT5XYaqL+SVH/8OVLcwEQSxBZMuqUSvM=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=e91bduejJceAQ4zLtWufrVWhamRGcbZJklu/D71h6aIh5T8s+EOjAkAFfvZBwmv9U\n\trHX6UsL0U5reAMsjvBEav2LOWf7tQqnI4/HjblIt8isz/rT3peOoiPkSJSlUagPwC8\n\tp2xEgR3ASgfn0XJNH/yD7eUy4bPXUMQM2DMRNaWeGzn9jeZhkViMPoRqiqZStO1srT\n\tgMCXQ8956pLnQYl/HYhgFEPLjMCD0UgzRNNwYInYU72MWLd+NNd6qwT38YfOjqC5dB\n\tDjQUhCo2W2xHrrnWhZZP2/N02JJZ+mgPxVUuUkMV1nZ5jJmEmKP/i4ELQhmVgocUrc\n\tNPDcKaHnxVwXQ==","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=05uXknwEoezwxqo7Akp7AfKlKp977s1vNDi4pWhc8fA=;\n\tb=KLB/FzKJIwUrv97PktlKAuG0jbC5NEtUPxkProaldyh92uOQAzlij13lZo6l8ukqHn\n\t3gXZXdMPuWzT1uvV2dV/6pO9zgIQBOAlg0me76b9P8D6lBUIBmYuz5DcIkHe4+c4PU18\n\t7EiDsBeH6OmaaUcW9p1VFX/ezgw3e8PXW5Z23O6sB+RysMv9QOX7bpM/IG2c7Fj2+QN4\n\tFbXNxUiZXbr3ecsJLgPYf+4KdIxuu78bygDxztFhqCaQV8g/+NUEAjuL6HdZYagCwTP6\n\tjQqVfOJFiAwAqHl4Qck9EZPtObWfe1gMslVBC4boHcVWpVhusG8kMAaV3M9cELlL2wTr\n\tmbSg=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"KLB/FzKJ\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=05uXknwEoezwxqo7Akp7AfKlKp977s1vNDi4pWhc8fA=;\n\tb=EwuUdhOnO1+88IsFUzA6/9DDyhyAW4S9illdiZK4AqCUYR4ARH3h0DQwHyyfLETxH2\n\tl39aJNjqDh7q5YKFO2EKnnPcSVVkZa+Lnr4IwdM3qGPbsc9u7rQ5woQhMEem1aiwPWs3\n\tffVUpRhUp1EPU5rIF4G9NVYU9Mzw0V4F5sL1//6loFQl/1xyE2i8mcMSSSvJzsq2eHKT\n\tBTYcR+ziDg90VuLLPqMS4Ibh/bqIEbR4Zx3xvNVjwCyK912o1e6E3auW02B1gtMFs3tt\n\toox03C+GF/k2IEvnneJGeaaHeat5OdEcOzg9AgwBX/6BzzpMRLCAYgcaL7I9VkQNSpMp\n\tb9Gw==","X-Gm-Message-State":"AOAM5335ier4Zs4g3bCX0X8GlpRaDbmB5d9VK53kHpYPZDvtrWBbQmcq\n\tWLH3mhZlyxpOsonFCacNleQYSDru2/EgXh5zqxk21xUlAyo=","X-Google-Smtp-Source":"ABdhPJyuDyxn7cLq6YNUbvupDb30vVikUhVyXNLAn4D+yO2dzdPYfcJO6oUSRah5C0pxK+d0NYhmbmEf6yt2fIdL0qI=","X-Received":"by 2002:a05:6512:12c6:b0:44a:650f:3b86 with SMTP id\n\tp6-20020a05651212c600b0044a650f3b86mr5939916lfg.79.1649244974692;\n\tWed, 06 Apr 2022 04:36:14 -0700 (PDT)","MIME-Version":"1.0","References":"<20220406075859.3857121-1-naush@raspberrypi.com>\n\t<20220406075859.3857121-3-naush@raspberrypi.com>\n\t<Yk14pjxeQZKwCzPB@pendragon.ideasonboard.com>","In-Reply-To":"<Yk14pjxeQZKwCzPB@pendragon.ideasonboard.com>","Date":"Wed, 6 Apr 2022 12:35:58 +0100","Message-ID":"<CAEmqJPrQtKjNsYMrpVw35WKPD5KkMjeDg1AMKoYnD2ruVTTCeQ@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"000000000000dd517505dbfac487\"","Subject":"Re: [libcamera-devel] [PATCH v4 2/3] pipeline: raspberrypi: Add a\n\tUnicam dequeue timeout","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>","From":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","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>"}},{"id":22617,"web_url":"https://patchwork.libcamera.org/comment/22617/","msgid":"<Yk1+mZGXXu9ZJSvV@pendragon.ideasonboard.com>","date":"2022-04-06T11:50:49","subject":"Re: [libcamera-devel] [PATCH v4 2/3] pipeline: raspberrypi: Add a\n\tUnicam dequeue timeout","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nOn Wed, Apr 06, 2022 at 12:35:58PM +0100, Naushir Patuck wrote:\n> On Wed, 6 Apr 2022 at 12:25, Laurent Pinchart wrote:\n> > On Wed, Apr 06, 2022 at 08:58:58AM +0100, Naushir Patuck wrote:\n> > > From: Naushir Patuck via libcamera-devel <libcamera-devel@lists.libcamera.org>\n> >\n> > Here too.\n> \n> I don't really know what went wrong with this. I use my normal git-pw workflow to pull\n> the tagged patches from patchworks onto my tree, and normally it does the right thing.\n\nKieran, it looks like patchwork correctly records the author in the\ndatabase, but the contents of the patches themselves still have the\nwrong From: header.\n\n> Oh well.... I'll fix it up.\n> \n> > > Enable the V4L2VideoDevice dequeue timeout for the Unicam Image node, and\n> > > connect the timeout signal to a slot in the pipeline handler. This slot will\n> > > log an error message informing the user of a possible hardware stall.\n> > >\n> > > The timeout is calculated as 2x the maximum frame length possible for a given\n> > > mode, returned by the IPA.\n> > >\n> > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > ---\n> > >  include/libcamera/ipa/raspberrypi.mojom           |  1 +\n> > >  src/ipa/raspberrypi/raspberrypi.cpp               |  2 ++\n> > >  .../pipeline/raspberrypi/raspberrypi.cpp          | 15 +++++++++++++++\n> > >  3 files changed, 18 insertions(+)\n> > >\n> > > diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\n> > > index acd3cafe6c91..5a228b75cd2f 100644\n> > > --- a/include/libcamera/ipa/raspberrypi.mojom\n> > > +++ b/include/libcamera/ipa/raspberrypi.mojom\n> > > @@ -41,6 +41,7 @@ struct IPAConfig {\n> > >  struct StartConfig {\n> > >       libcamera.ControlList controls;\n> > >       int32 dropFrameCount;\n> > > +     uint32 maxSensorFrameLengthMs;\n> > >  };\n> > >\n> > >  interface IPARPiInterface {\n> > > diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> > > index 1bf4e270b062..89767a9db471 100644\n> > > --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> > > +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> > > @@ -280,6 +280,8 @@ void IPARPi::start(const ControlList &controls, ipa::RPi::StartConfig *startConf\n> > >       }\n> > >\n> > >       startConfig->dropFrameCount = dropFrameCount_;\n> > > +     const Duration maxSensorFrameDuration = mode_.max_frame_length * mode_.line_length;\n> > > +     startConfig->maxSensorFrameLengthMs = maxSensorFrameDuration.get<std::milli>();\n> > >\n> > >       firstStart_ = false;\n> > >       lastRunTimestamp_ = 0;\n> > > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > index 8fd79be67988..98c463e39548 100644\n> > > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > @@ -45,6 +45,8 @@\n> > >  #include \"dma_heaps.h\"\n> > >  #include \"rpi_stream.h\"\n> > >\n> > > +using namespace std::chrono_literals;\n> > > +\n> > >  namespace libcamera {\n> > >\n> > >  LOG_DEFINE_CATEGORY(RPI)\n> > > @@ -208,6 +210,7 @@ public:\n> > >       void setIspControls(const ControlList &controls);\n> > >       void setDelayedControls(const ControlList &controls);\n> > >       void setSensorControls(ControlList &controls);\n> > > +     void unicamTimeout();\n> > >\n> > >       /* bufferComplete signal handlers. */\n> > >       void unicamBufferDequeue(FrameBuffer *buffer);\n> > > @@ -1050,6 +1053,10 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)\n> > >               }\n> > >       }\n> > >\n> > > +     /* Set the dequeue timeout to 2x the maximum possible frame duration. */\n> > > +     utils::duration timeout(2 * startConfig.maxSensorFrameLengthMs * 1ms);\n> >\n> > This is a utils::duration, but setDequeueTimeout takes a\n> > utils::Duration (what have we done... ?). It will compile and I think do\n> > the right thing thanks to implicit conversion, but it would be better to\n> > use utils::Duration.\n> \n> Ouch good catch!\n> \n> > I could fix this locally too, but I'd feel better if you could test it,\n> > would you mind sending a v5 that would also take the comments on 1/3\n> > into account ?\n> \n> No problem.  I'll fix this and test before pushing another version.\n> \n> > > +     data->unicam_[Unicam::Image].dev()->setDequeueTimeout(timeout);\n> > > +\n> > >       return 0;\n> > >  }\n> > >\n> > > @@ -1192,6 +1199,7 @@ int PipelineHandlerRPi::registerCamera(MediaDevice *unicam, MediaDevice *isp, Me\n> > >       data->isp_[Isp::Stats] = RPi::Stream(\"ISP Stats\", ispCapture3);\n> > >\n> > >       /* Wire up all the buffer connections. */\n> > > +  >  data->unicam_[Unicam::Image].dev()->dequeueTimeout.connect(data.get(), &RPiCameraData::unicamTimeout);\n> > >       data->unicam_[Unicam::Image].dev()->frameStart.connect(data.get(), &RPiCameraData::frameStarted);\n> > >       data->unicam_[Unicam::Image].dev()->bufferReady.connect(data.get(), &RPiCameraData::unicamBufferDequeue);\n> > >       data->isp_[Isp::Input].dev()->bufferReady.connect(data.get(), &RPiCameraData::ispInputDequeue);\n> > > @@ -1773,6 +1781,13 @@ void RPiCameraData::setSensorControls(ControlList &controls)\n> > >       sensor_->setControls(&controls);\n> > >  }\n> > >\n> > > +void RPiCameraData::unicamTimeout()\n> > > +{\n> > > +     LOG(RPI, Error) << \"Unicam has timed out!\";\n> > > +     LOG(RPI, Error) << \"Please check that your camera sensor connector is attached securely.\";\n> > > +     LOG(RPI, Error) << \"Alternatively, try another cable and/or sensor.\";\n> > > +}\n> > > +\n> > >  void RPiCameraData::unicamBufferDequeue(FrameBuffer *buffer)\n> > >  {\n> > >       RPi::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 3D462C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  6 Apr 2022 11:50:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8788B65642;\n\tWed,  6 Apr 2022 13:50:56 +0200 (CEST)","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 815106563F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Apr 2022 13:50:54 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(117.145-247-81.adsl-dyn.isp.belgacom.be [81.247.145.117])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 04F20482;\n\tWed,  6 Apr 2022 13:50:53 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1649245856;\n\tbh=7F2IYSSTj9NT8qvA7p2dtKmK9WsIWQOcH0OkaSrxLWE=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=EdgLt5YLqYbj6KuNJmfm8jnUyrAvmmWnecbIj4V97G1ue5j7NYnT6A67Ll+qsn9YG\n\tRxuAtNg8x8p6gJvgIJYI6DasocuS3RCEh4Bx0sllmUwK/4Wx/+O44e+aIVhiquTCm/\n\tFX8CrCyb9Cnzqr0ffvXWp1xoON+yfb9l0qZLhGb4zK+sL8kUgYjtsElfZtEJeWqv8L\n\tiNT4KxzJ8n6QK8GMAa0q842r7EG4G11vEYPzua1k7AXZjsp09pjFAUVMRYr5mhS3sn\n\tlN5zTsBHuHhaVmlDPFkCkSfBcm65QxLHNVnZob3yfxOKwQMmgl1t4P9abl5idf3lZ+\n\t+dYVWpPyWSXdQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1649245854;\n\tbh=7F2IYSSTj9NT8qvA7p2dtKmK9WsIWQOcH0OkaSrxLWE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=BKZA6CJjRxmt8E4YQz5PZZ+p232emmlNMvj3WzkpqliyxL91hEu8UVx1iUJHuYBEz\n\t1gbyz5XkDVL6o38PzXHGtsTRwRwgyxcLs8S2V6CE+VvehqfgMLnu4/1GCTgjks8Gby\n\tnbtx36T0OzJRD3fTW+r5HUqPGAZNpAN7MTrQa7v0="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"BKZA6CJj\"; dkim-atps=neutral","Date":"Wed, 6 Apr 2022 14:50:49 +0300","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<Yk1+mZGXXu9ZJSvV@pendragon.ideasonboard.com>","References":"<20220406075859.3857121-1-naush@raspberrypi.com>\n\t<20220406075859.3857121-3-naush@raspberrypi.com>\n\t<Yk14pjxeQZKwCzPB@pendragon.ideasonboard.com>\n\t<CAEmqJPrQtKjNsYMrpVw35WKPD5KkMjeDg1AMKoYnD2ruVTTCeQ@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPrQtKjNsYMrpVw35WKPD5KkMjeDg1AMKoYnD2ruVTTCeQ@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH v4 2/3] pipeline: raspberrypi: Add a\n\tUnicam dequeue timeout","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","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>"}},{"id":22634,"web_url":"https://patchwork.libcamera.org/comment/22634/","msgid":"<164927128882.4051137.10475204746157628458@Monstersaurus>","date":"2022-04-06T18:54:48","subject":"Re: [libcamera-devel] [PATCH v4 2/3] pipeline: raspberrypi: Add a\n\tUnicam dequeue timeout","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2022-04-06 12:50:49)\n> Hi Naush,\n> \n> On Wed, Apr 06, 2022 at 12:35:58PM +0100, Naushir Patuck wrote:\n> > On Wed, 6 Apr 2022 at 12:25, Laurent Pinchart wrote:\n> > > On Wed, Apr 06, 2022 at 08:58:58AM +0100, Naushir Patuck wrote:\n> > > > From: Naushir Patuck via libcamera-devel <libcamera-devel@lists.libcamera.org>\n> > >\n> > > Here too.\n> > \n> > I don't really know what went wrong with this. I use my normal git-pw workflow to pull\n> > the tagged patches from patchworks onto my tree, and normally it does the right thing.\n> \n> Kieran, it looks like patchwork correctly records the author in the\n> database, but the contents of the patches themselves still have the\n> wrong From: header.\n> \n> > Oh well.... I'll fix it up.\n\nArgh, I wondered if this was an issue in git-pw ... but I've just\nupgraded to git-pw 2.3.0 which is the latest so it's definitely still\nsomething happening server side.\n\nI'll investigate ...\n\n\n\n> > \n> > > > Enable the V4L2VideoDevice dequeue timeout for the Unicam Image node, and\n> > > > connect the timeout signal to a slot in the pipeline handler. This slot will\n> > > > log an error message informing the user of a possible hardware stall.\n> > > >\n> > > > The timeout is calculated as 2x the maximum frame length possible for a given\n> > > > mode, returned by the IPA.\n> > > >\n> > > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > > ---\n> > > >  include/libcamera/ipa/raspberrypi.mojom           |  1 +\n> > > >  src/ipa/raspberrypi/raspberrypi.cpp               |  2 ++\n> > > >  .../pipeline/raspberrypi/raspberrypi.cpp          | 15 +++++++++++++++\n> > > >  3 files changed, 18 insertions(+)\n> > > >\n> > > > diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\n> > > > index acd3cafe6c91..5a228b75cd2f 100644\n> > > > --- a/include/libcamera/ipa/raspberrypi.mojom\n> > > > +++ b/include/libcamera/ipa/raspberrypi.mojom\n> > > > @@ -41,6 +41,7 @@ struct IPAConfig {\n> > > >  struct StartConfig {\n> > > >       libcamera.ControlList controls;\n> > > >       int32 dropFrameCount;\n> > > > +     uint32 maxSensorFrameLengthMs;\n> > > >  };\n> > > >\n> > > >  interface IPARPiInterface {\n> > > > diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> > > > index 1bf4e270b062..89767a9db471 100644\n> > > > --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> > > > +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> > > > @@ -280,6 +280,8 @@ void IPARPi::start(const ControlList &controls, ipa::RPi::StartConfig *startConf\n> > > >       }\n> > > >\n> > > >       startConfig->dropFrameCount = dropFrameCount_;\n> > > > +     const Duration maxSensorFrameDuration = mode_.max_frame_length * mode_.line_length;\n> > > > +     startConfig->maxSensorFrameLengthMs = maxSensorFrameDuration.get<std::milli>();\n> > > >\n> > > >       firstStart_ = false;\n> > > >       lastRunTimestamp_ = 0;\n> > > > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > > index 8fd79be67988..98c463e39548 100644\n> > > > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > > @@ -45,6 +45,8 @@\n> > > >  #include \"dma_heaps.h\"\n> > > >  #include \"rpi_stream.h\"\n> > > >\n> > > > +using namespace std::chrono_literals;\n> > > > +\n> > > >  namespace libcamera {\n> > > >\n> > > >  LOG_DEFINE_CATEGORY(RPI)\n> > > > @@ -208,6 +210,7 @@ public:\n> > > >       void setIspControls(const ControlList &controls);\n> > > >       void setDelayedControls(const ControlList &controls);\n> > > >       void setSensorControls(ControlList &controls);\n> > > > +     void unicamTimeout();\n> > > >\n> > > >       /* bufferComplete signal handlers. */\n> > > >       void unicamBufferDequeue(FrameBuffer *buffer);\n> > > > @@ -1050,6 +1053,10 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)\n> > > >               }\n> > > >       }\n> > > >\n> > > > +     /* Set the dequeue timeout to 2x the maximum possible frame duration. */\n> > > > +     utils::duration timeout(2 * startConfig.maxSensorFrameLengthMs * 1ms);\n> > >\n> > > This is a utils::duration, but setDequeueTimeout takes a\n> > > utils::Duration (what have we done... ?). It will compile and I think do\n> > > the right thing thanks to implicit conversion, but it would be better to\n> > > use utils::Duration.\n> > \n> > Ouch good catch!\n> > \n> > > I could fix this locally too, but I'd feel better if you could test it,\n> > > would you mind sending a v5 that would also take the comments on 1/3\n> > > into account ?\n> > \n> > No problem.  I'll fix this and test before pushing another version.\n> > \n> > > > +     data->unicam_[Unicam::Image].dev()->setDequeueTimeout(timeout);\n> > > > +\n> > > >       return 0;\n> > > >  }\n> > > >\n> > > > @@ -1192,6 +1199,7 @@ int PipelineHandlerRPi::registerCamera(MediaDevice *unicam, MediaDevice *isp, Me\n> > > >       data->isp_[Isp::Stats] = RPi::Stream(\"ISP Stats\", ispCapture3);\n> > > >\n> > > >       /* Wire up all the buffer connections. */\n> > > > +  >  data->unicam_[Unicam::Image].dev()->dequeueTimeout.connect(data.get(), &RPiCameraData::unicamTimeout);\n> > > >       data->unicam_[Unicam::Image].dev()->frameStart.connect(data.get(), &RPiCameraData::frameStarted);\n> > > >       data->unicam_[Unicam::Image].dev()->bufferReady.connect(data.get(), &RPiCameraData::unicamBufferDequeue);\n> > > >       data->isp_[Isp::Input].dev()->bufferReady.connect(data.get(), &RPiCameraData::ispInputDequeue);\n> > > > @@ -1773,6 +1781,13 @@ void RPiCameraData::setSensorControls(ControlList &controls)\n> > > >       sensor_->setControls(&controls);\n> > > >  }\n> > > >\n> > > > +void RPiCameraData::unicamTimeout()\n> > > > +{\n> > > > +     LOG(RPI, Error) << \"Unicam has timed out!\";\n> > > > +     LOG(RPI, Error) << \"Please check that your camera sensor connector is attached securely.\";\n> > > > +     LOG(RPI, Error) << \"Alternatively, try another cable and/or sensor.\";\n> > > > +}\n> > > > +\n> > > >  void RPiCameraData::unicamBufferDequeue(FrameBuffer *buffer)\n> > > >  {\n> > > >       RPi::Stream *stream = nullptr;\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 2EEE0C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  6 Apr 2022 18:54:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8F5B465642;\n\tWed,  6 Apr 2022 20:54:52 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 91E92604B8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Apr 2022 20:54:51 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1FD78482;\n\tWed,  6 Apr 2022 20:54:51 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1649271292;\n\tbh=El8zl2GRp/L06l9VWdakWfs0R4TWb/FPSXJaF/Q6Zx4=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=gLzyi7bM6ulYbA1z/59Oa9T6DiKT3YENSGFYsmAmldj5OXNIfjPpMlEXERCuO5JU1\n\tUk7ykg5XCAkeCRVUve3MPhx7pdbLRml3GF8kU/YOgM6+vchDs4C3VcHSjL/4/mFdac\n\tlIgIr2mmqHaH7vyTHm8fRNBbaDnAXTMKRmC4W4fAcbxtqrNi+0ts1Diu7Mm607tbQl\n\tpc7M0Mu1iF3stkzqOFSZGJaHkYGf0P4otWgJyTRoDRJwgBhG1X9qqukRIBGtGJmwbH\n\tVElI8AyPkZxGznc3DjWnIyYA/Q0l/oVaTKZ621ga3rdV65KiQmq6f5z2liU0/V77Aa\n\tqmSR8cXim/ogw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1649271291;\n\tbh=El8zl2GRp/L06l9VWdakWfs0R4TWb/FPSXJaF/Q6Zx4=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=fsIDfYPHs5/rrQVHnRs5dnKGiAQeK4/4bWyCKbMCqHv2+7cC+FRLaKuJ/5K4Ps0ML\n\t7MZetxqa36SON67vWZW/hfrQIBcXDGGgk07wc0uzaTR14mNipVUsEtnIC7SzQSMo1l\n\tXzZ/SwNJnl95YVfUF2Jno9bq1RtZY9woks8CCWn4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"fsIDfYPH\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<Yk1+mZGXXu9ZJSvV@pendragon.ideasonboard.com>","References":"<20220406075859.3857121-1-naush@raspberrypi.com>\n\t<20220406075859.3857121-3-naush@raspberrypi.com>\n\t<Yk14pjxeQZKwCzPB@pendragon.ideasonboard.com>\n\t<CAEmqJPrQtKjNsYMrpVw35WKPD5KkMjeDg1AMKoYnD2ruVTTCeQ@mail.gmail.com>\n\t<Yk1+mZGXXu9ZJSvV@pendragon.ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tNaushir Patuck <naush@raspberrypi.com>","Date":"Wed, 06 Apr 2022 19:54:48 +0100","Message-ID":"<164927128882.4051137.10475204746157628458@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v4 2/3] pipeline: raspberrypi: Add a\n\tUnicam dequeue timeout","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>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","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>"}}]