[{"id":13855,"web_url":"https://patchwork.libcamera.org/comment/13855/","msgid":"<849c1d1d-2de6-f1d9-606a-af3729617038@ideasonboard.com>","date":"2020-11-24T19:16:12","subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Fix erroneous\n\tbayer buffer requeue on buffer matching","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Naush,\n\nOn 24/11/2020 17:59, Naushir Patuck wrote:\n> With the recent change in the bayer/embedded buffer matching code,\n> a condition would make the bayer buffer be requeued back to the device,\n> even though it could potentially be queued for matching. This would\n> cause unnecessary frame drops as sync would be lost.\n> \n> The fix is to ensure the bayer buffer only gets requeued if the embedded\n> data buffer queue is not empty, i.e. the buffer truly is orphaned.\n> Additionally, we do this test before deciding to flush any of the two\n> queues of all their buffers.\n> \n> Fixes: 909882b (pipeline: raspberrypi: Rework bayer/embedded data buffer matching)\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n\nThanks for the quick turn around on this fix ;-)\n\nTested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  .../pipeline/raspberrypi/raspberrypi.cpp      | 38 +++++++++++--------\n>  1 file changed, 23 insertions(+), 15 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 7271573a..fd306066 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -1679,8 +1679,23 @@ bool RPiCameraData::findMatchingBuffers(FrameBuffer *&bayerBuffer, FrameBuffer *\n>  \t\t}\n>  \n>  \t\tif (!embeddedBuffer) {\n> +\t\t\tbool flushedBuffers = false;\n> +\n>  \t\t\tLOG(RPI, Debug) << \"Could not find matching embedded buffer\";\n>  \n> +\t\t\tif (!embeddedQueue_.empty()) {\n> +\t\t\t\t/*\n> +\t\t\t\t * Not found a matching embedded buffer for the bayer buffer in\n> +\t\t\t\t * the front of the queue. This buffer is now orphaned, so requeue\n> +\t\t\t\t * it back to the device.\n> +\t\t\t\t */\n> +\t\t\t\tunicam_[Unicam::Image].queueBuffer(bayerQueue_.front());\n> +\t\t\t\tbayerQueue_.pop();\n> +\t\t\t\tbayerRequeueCount++;\n> +\t\t\t\tLOG(RPI, Warning) << \"Dropping unmatched input frame in stream \"\n> +\t\t\t\t\t\t  << unicam_[Unicam::Image].name();\n> +\t\t\t}\n> +\n>  \t\t\t/*\n>  \t\t\t * If we have requeued all available embedded data buffers in this loop,\n>  \t\t\t * then we are fully out of sync, so might as well requeue all the pending\n> @@ -1695,20 +1710,9 @@ bool RPiCameraData::findMatchingBuffers(FrameBuffer *&bayerBuffer, FrameBuffer *\n>  \t\t\t\t\tunicam_[Unicam::Image].queueBuffer(bayerQueue_.front());\n>  \t\t\t\t\tbayerQueue_.pop();\n>  \t\t\t\t}\n> -\t\t\t\treturn false;\n> +\t\t\t\tflushedBuffers = true;\n>  \t\t\t}\n>  \n> -\t\t\t/*\n> -\t\t\t * Not found a matching embedded buffer for the bayer buffer in\n> -\t\t\t * the front of the queue. This buffer is now orphaned, so requeue\n> -\t\t\t * it back to the device.\n> -\t\t\t */\n> -\t\t\tunicam_[Unicam::Image].queueBuffer(bayerQueue_.front());\n> -\t\t\tbayerQueue_.pop();\n> -\t\t\tbayerRequeueCount++;\n> -\t\t\tLOG(RPI, Warning) << \"Dropping unmatched input frame in stream \"\n> -\t\t\t\t\t  << unicam_[Unicam::Image].name();\n> -\n>  \t\t\t/*\n>  \t\t\t * Similar to the above, if we have requeued all available bayer buffers in\n\nIs this statement now outdated? ('similar to \"above\"') or is it ok?\n\n>  \t\t\t * the loop, then we are fully out of sync, so might as well requeue all the\n> @@ -1723,11 +1727,15 @@ bool RPiCameraData::findMatchingBuffers(FrameBuffer *&bayerBuffer, FrameBuffer *\n>  \t\t\t\t\tunicam_[Unicam::Embedded].queueBuffer(embeddedQueue_.front());\n>  \t\t\t\t\tembeddedQueue_.pop();\n>  \t\t\t\t}\n> -\t\t\t\treturn false;\n> +\t\t\t\tflushedBuffers = true;\n>  \t\t\t}\n>  \n> -\t\t\t/* If the embedded queue has become empty, we cannot do any more. */\n> -\t\t\tif (embeddedQueue_.empty())\n> +\t\t\t/*\n> +\t\t\t * If the embedded queue has become empty, we cannot do any more.\n> +\t\t\t * Similarly, if we have flushed any one of our queues, we cannot do\n> +\t\t\t * any more. Return from here without a buffer pair.\n> +\t\t\t */\n> +\t\t\tif (embeddedQueue_.empty() || flushedBuffers)\n>  \t\t\t\treturn false;\n>  \t\t} else {\n>  \t\t\t/*\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 DFA9EBE08A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 24 Nov 2020 19:16:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 60DAF63404;\n\tTue, 24 Nov 2020 20:16:17 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 40D9E615AC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 24 Nov 2020 20:16:16 +0100 (CET)","from [192.168.0.20]\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 AF60F183D;\n\tTue, 24 Nov 2020 20:16:15 +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=\"k1yGXO11\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1606245375;\n\tbh=mXuDCCFrfSRiPqRYWtwQ8UNKFHKE4D+Z0Wc6beK2FVU=;\n\th=Reply-To:Subject:To:References:From:Date:In-Reply-To:From;\n\tb=k1yGXO11gxK9HpdEVpDz6wNEQGbt8LP0MBHYV4w/rIXkvNrHk01J6GAp2U5ki3z5i\n\tHpF+HGlKCJbiFFL4YZXfubHBqSwR86x60W3QRhQfHPWDQDMY9MEEVpNDjepw4o01Ah\n\tMYRUqHNCVs8HRS7o/GIFeRRmBP1pcuB8xAtA8FgM=","To":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20201124175934.238358-1-naush@raspberrypi.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko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Fhk4WQaKRshCB7cSl+RIng5S/ThOBlwNlcKG7j7W2MC06BlTbdEkUp\n\tECzuuRBv8wX4OQl+hbWbB/VKIx5HKlLu1eypen/5lNVzSqMMIYkkZcjV2SWQyUGxSwq0O/sx\n\tS0A8/atCHUXOboUsn54qdxrVDaK+6jIAuo8JiRWctP16KjzUM7MO0/+4zllM8EY57rXrj48j\n\tsbEYX0YQnzaj+jO6kJtoZsIaYR7rMMq9aUAjyiaEZpmP1qF/2sYenDx0Fg2BSlLvLvXM0vU8\n\tpQk3kgDu7kb/7PRYrZvBsr21EIQoIjXbZxDz/o7z95frkP71EaICttZ6k9q5oxxA5WC6sTXc\n\tMW8zs8avFNuA9VpXt0YupJd2ijtZy2mpZNG02fFVXhIn4G807G7+9mhuC4XG5rKlBBUXTvPU\n\tAfYnB4JBDLmLzBFavQfvonSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<849c1d1d-2de6-f1d9-606a-af3729617038@ideasonboard.com>","Date":"Tue, 24 Nov 2020 19:16:12 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.10.0","MIME-Version":"1.0","In-Reply-To":"<20201124175934.238358-1-naush@raspberrypi.com>","Content-Language":"en-GB","Subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Fix erroneous\n\tbayer buffer requeue on buffer matching","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>","Reply-To":"kieran.bingham@ideasonboard.com","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":13871,"web_url":"https://patchwork.libcamera.org/comment/13871/","msgid":"<CAEmqJPpH5BWyWPmRJD-0C+fcMZ5M=MsPr=b8HUCVJ3WURkEnNw@mail.gmail.com>","date":"2020-11-25T09:46:25","subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Fix erroneous\n\tbayer buffer requeue on buffer matching","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Kieran,\n\nOn Tue, 24 Nov 2020 at 19:16, Kieran Bingham <\nkieran.bingham@ideasonboard.com> wrote:\n\n> Hi Naush,\n>\n> On 24/11/2020 17:59, Naushir Patuck wrote:\n> > With the recent change in the bayer/embedded buffer matching code,\n> > a condition would make the bayer buffer be requeued back to the device,\n> > even though it could potentially be queued for matching. This would\n> > cause unnecessary frame drops as sync would be lost.\n> >\n> > The fix is to ensure the bayer buffer only gets requeued if the embedded\n> > data buffer queue is not empty, i.e. the buffer truly is orphaned.\n> > Additionally, we do this test before deciding to flush any of the two\n> > queues of all their buffers.\n> >\n> > Fixes: 909882b (pipeline: raspberrypi: Rework bayer/embedded data buffer\n> matching)\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n>\n> Thanks for the quick turn around on this fix ;-)\n>\n> Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>\n> > ---\n> >  .../pipeline/raspberrypi/raspberrypi.cpp      | 38 +++++++++++--------\n> >  1 file changed, 23 insertions(+), 15 deletions(-)\n> >\n> > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > index 7271573a..fd306066 100644\n> > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > @@ -1679,8 +1679,23 @@ bool\n> RPiCameraData::findMatchingBuffers(FrameBuffer *&bayerBuffer, FrameBuffer *\n> >               }\n> >\n> >               if (!embeddedBuffer) {\n> > +                     bool flushedBuffers = false;\n> > +\n> >                       LOG(RPI, Debug) << \"Could not find matching\n> embedded buffer\";\n> >\n> > +                     if (!embeddedQueue_.empty()) {\n> > +                             /*\n> > +                              * Not found a matching embedded buffer\n> for the bayer buffer in\n> > +                              * the front of the queue. This buffer is\n> now orphaned, so requeue\n> > +                              * it back to the device.\n> > +                              */\n> > +\n>  unicam_[Unicam::Image].queueBuffer(bayerQueue_.front());\n> > +                             bayerQueue_.pop();\n> > +                             bayerRequeueCount++;\n> > +                             LOG(RPI, Warning) << \"Dropping unmatched\n> input frame in stream \"\n> > +                                               <<\n> unicam_[Unicam::Image].name();\n> > +                     }\n> > +\n> >                       /*\n> >                        * If we have requeued all available embedded data\n> buffers in this loop,\n> >                        * then we are fully out of sync, so might as well\n> requeue all the pending\n> > @@ -1695,20 +1710,9 @@ bool\n> RPiCameraData::findMatchingBuffers(FrameBuffer *&bayerBuffer, FrameBuffer *\n> >\n>  unicam_[Unicam::Image].queueBuffer(bayerQueue_.front());\n> >                                       bayerQueue_.pop();\n> >                               }\n> > -                             return false;\n> > +                             flushedBuffers = true;\n> >                       }\n> >\n> > -                     /*\n> > -                      * Not found a matching embedded buffer for the\n> bayer buffer in\n> > -                      * the front of the queue. This buffer is now\n> orphaned, so requeue\n> > -                      * it back to the device.\n> > -                      */\n> > -\n>  unicam_[Unicam::Image].queueBuffer(bayerQueue_.front());\n> > -                     bayerQueue_.pop();\n> > -                     bayerRequeueCount++;\n> > -                     LOG(RPI, Warning) << \"Dropping unmatched input\n> frame in stream \"\n> > -                                       << unicam_[Unicam::Image].name();\n> > -\n> >                       /*\n> >                        * Similar to the above, if we have requeued all\n> available bayer buffers in\n>\n> Is this statement now outdated? ('similar to \"above\"') or is it ok?\n>\n\nThis statement is still valid, we are flushing the embedded data queue with\nsimilar conditions to the bayer queue flush above.\n\nRegards,\nNaush\n\n\n\n>\n> >                        * the loop, then we are fully out of sync, so\n> might as well requeue all the\n> > @@ -1723,11 +1727,15 @@ bool\n> RPiCameraData::findMatchingBuffers(FrameBuffer *&bayerBuffer, FrameBuffer *\n> >\n>  unicam_[Unicam::Embedded].queueBuffer(embeddedQueue_.front());\n> >                                       embeddedQueue_.pop();\n> >                               }\n> > -                             return false;\n> > +                             flushedBuffers = true;\n> >                       }\n> >\n> > -                     /* If the embedded queue has become empty, we\n> cannot do any more. */\n> > -                     if (embeddedQueue_.empty())\n> > +                     /*\n> > +                      * If the embedded queue has become empty, we\n> cannot do any more.\n> > +                      * Similarly, if we have flushed any one of our\n> queues, we cannot do\n> > +                      * any more. Return from here without a buffer\n> pair.\n> > +                      */\n> > +                     if (embeddedQueue_.empty() || flushedBuffers)\n> >                               return false;\n> >               } else {\n> >                       /*\n> >\n>\n> --\n> Regards\n> --\n> Kieran\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 72520BE176\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 25 Nov 2020 09:46:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E4F9D632EE;\n\tWed, 25 Nov 2020 10:46:45 +0100 (CET)","from mail-lj1-x243.google.com (mail-lj1-x243.google.com\n\t[IPv6:2a00:1450:4864:20::243])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0E43D632EE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 25 Nov 2020 10:46:44 +0100 (CET)","by mail-lj1-x243.google.com with SMTP id t22so1631915ljk.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 25 Nov 2020 01:46:44 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"WC1jVye/\"; 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=Ilpr+UhFlrzU4SYNYmd/Zt4ujIscX30s1Vqsv5B487c=;\n\tb=WC1jVye/20YrRjarEQ15ZrcqUFBorIaVQHFR+5kk7TYMWb2GbTE6W1pvzwOElFUKWS\n\tslBRpS9vSoJ6w/9hLwO/3zdocJqWKZW3MeHIEImcyQrBgeavpv8ycXDDVwXZCCHNeJi4\n\tXA4h6fOPyyJrxoj1ZGOHtS0o5nLUru2KaSmvOUXUchjOPWcXmlvNQ9J8I0AUUYfngJdX\n\tkFBl2p6gb1/CaW5SnlA5cYU0Yb4qSW6XmqxkbV6IcjEkKDz4L2WwHcNqEIke8p9SCmD3\n\toBWw+mOQSfkGg6nP2JTyJX67ci9xGnaBurCWOIYd8et46PA7hNRhwkZOvcCb+J1W/Chb\n\tiBjg==","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=Ilpr+UhFlrzU4SYNYmd/Zt4ujIscX30s1Vqsv5B487c=;\n\tb=ikIRedvOLj2CcXKAIpuIHdiuZF0gdqoFYduF/I+zRzk0KvvjLrNSM1hk+zXwRHZiAh\n\tOXwUxokjYzVJTbEk4J69eH3trRzrg4X3uQOfj1Lr3By8aL0lWMa9oMFdM/O1FowkGAvQ\n\tVlzHUznStIE+TzV0wlq3bVMvm7h3vTywSj0LQxr1T6EObTUqvIHJFV7GVEu817jUVZm6\n\tmCUhPCPw/ZmLiM/Fh07rFNjLsrXVLK6WmEmW2bbpKWIIUtQ7B67BVLVMr3ynzSbC22F7\n\tkMKLl8qepIWBMvsMK5xu3+CfqIU93e5oqMA1EOJjaKwIKAufd4NPp6w2qlnm0ukCCVSL\n\tawVg==","X-Gm-Message-State":"AOAM53117bYsk8q0Jo0UAtoldowV8uRyHx/jWQLdSBt+adcogcDOeUJD\n\tDdWqUaFzNcVX6c69va6Ai6MDIoIQYg5ElBWzm1RqmgRk6Tg=","X-Google-Smtp-Source":"ABdhPJxkRodNoe/PxzanLBHO8X4C0sKONHZSevHB6bz4jqlTk99GEDt/OmsjrGpNHXX2Uwcp/yVWU4LU1T4DXVedzaQ=","X-Received":"by 2002:a2e:9a02:: with SMTP id o2mr988542lji.1.1606297603324;\n\tWed, 25 Nov 2020 01:46:43 -0800 (PST)","MIME-Version":"1.0","References":"<20201124175934.238358-1-naush@raspberrypi.com>\n\t<849c1d1d-2de6-f1d9-606a-af3729617038@ideasonboard.com>","In-Reply-To":"<849c1d1d-2de6-f1d9-606a-af3729617038@ideasonboard.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Wed, 25 Nov 2020 09:46:25 +0000","Message-ID":"<CAEmqJPpH5BWyWPmRJD-0C+fcMZ5M=MsPr=b8HUCVJ3WURkEnNw@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Fix erroneous\n\tbayer buffer requeue on buffer matching","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>","Content-Type":"multipart/mixed;\n\tboundary=\"===============3139218601670489988==\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":13872,"web_url":"https://patchwork.libcamera.org/comment/13872/","msgid":"<131f0a0a-27a7-c3cc-3ed6-492b69026e8a@ideasonboard.com>","date":"2020-11-25T10:03:18","subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Fix erroneous\n\tbayer buffer requeue on buffer matching","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Naush,\n\nOn 25/11/2020 09:46, Naushir Patuck wrote:\n> Hi Kieran,\n> \n> On Tue, 24 Nov 2020 at 19:16, Kieran Bingham\n> <kieran.bingham@ideasonboard.com\n> <mailto:kieran.bingham@ideasonboard.com>> wrote:\n> \n>     Hi Naush,\n> \n>     On 24/11/2020 17:59, Naushir Patuck wrote:\n>     > With the recent change in the bayer/embedded buffer matching code,\n>     > a condition would make the bayer buffer be requeued back to the\n>     device,\n>     > even though it could potentially be queued for matching. This would\n>     > cause unnecessary frame drops as sync would be lost.\n>     >\n>     > The fix is to ensure the bayer buffer only gets requeued if the\n>     embedded\n>     > data buffer queue is not empty, i.e. the buffer truly is orphaned.\n>     > Additionally, we do this test before deciding to flush any of the two\n>     > queues of all their buffers.\n>     >\n>     > Fixes: 909882b (pipeline: raspberrypi: Rework bayer/embedded data\n>     buffer matching)\n>     > Signed-off-by: Naushir Patuck <naush@raspberrypi.com\n>     <mailto:naush@raspberrypi.com>>\n> \n>     Thanks for the quick turn around on this fix ;-)\n> \n>     Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com\n>     <mailto:kieran.bingham@ideasonboard.com>>\n> \n>     > ---\n>     >  .../pipeline/raspberrypi/raspberrypi.cpp      | 38\n>     +++++++++++--------\n>     >  1 file changed, 23 insertions(+), 15 deletions(-)\n>     >\n>     > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n>     b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n>     > index 7271573a..fd306066 100644\n>     > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n>     > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n>     > @@ -1679,8 +1679,23 @@ bool\n>     RPiCameraData::findMatchingBuffers(FrameBuffer *&bayerBuffer,\n>     FrameBuffer *\n>     >               }\n>     > \n>     >               if (!embeddedBuffer) {\n>     > +                     bool flushedBuffers = false;\n>     > +\n>     >                       LOG(RPI, Debug) << \"Could not find matching\n>     embedded buffer\";\n>     > \n>     > +                     if (!embeddedQueue_.empty()) {\n>     > +                             /*\n>     > +                              * Not found a matching embedded\n>     buffer for the bayer buffer in\n>     > +                              * the front of the queue. This\n>     buffer is now orphaned, so requeue\n>     > +                              * it back to the device.\n>     > +                              */\n>     > +                           \n>      unicam_[Unicam::Image].queueBuffer(bayerQueue_.front());\n>     > +                             bayerQueue_.pop();\n>     > +                             bayerRequeueCount++;\n>     > +                             LOG(RPI, Warning) << \"Dropping\n>     unmatched input frame in stream \"\n>     > +                                               <<\n>     unicam_[Unicam::Image].name();\n>     > +                     }\n>     > +\n>     >                       /*\n>     >                        * If we have requeued all available\n>     embedded data buffers in this loop,\n>     >                        * then we are fully out of sync, so might\n>     as well requeue all the pending\n>     > @@ -1695,20 +1710,9 @@ bool\n>     RPiCameraData::findMatchingBuffers(FrameBuffer *&bayerBuffer,\n>     FrameBuffer *\n>     >                                     \n>      unicam_[Unicam::Image].queueBuffer(bayerQueue_.front());\n>     >                                       bayerQueue_.pop();\n>     >                               }\n>     > -                             return false;\n>     > +                             flushedBuffers = true;\n>     >                       }\n>     > \n>     > -                     /*\n>     > -                      * Not found a matching embedded buffer for\n>     the bayer buffer in\n>     > -                      * the front of the queue. This buffer is\n>     now orphaned, so requeue\n>     > -                      * it back to the device.\n>     > -                      */\n>     > -                   \n>      unicam_[Unicam::Image].queueBuffer(bayerQueue_.front());\n>     > -                     bayerQueue_.pop();\n>     > -                     bayerRequeueCount++;\n>     > -                     LOG(RPI, Warning) << \"Dropping unmatched\n>     input frame in stream \"\n>     > -                                       <<\n>     unicam_[Unicam::Image].name();\n>     > -\n>     >                       /*\n>     >                        * Similar to the above, if we have requeued\n>     all available bayer buffers in\n> \n>     Is this statement now outdated? ('similar to \"above\"') or is it ok?\n> \n> \n> This statement is still valid, we are flushing the embedded data queue\n> with similar conditions to the bayer queue flush above.\n> \n\nOk - great. I was worried that the code move might have affected it.\n\nWell then,\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> Regards,\n> Naush\n> \n>  \n> \n> \n>     >                        * the loop, then we are fully out of sync,\n>     so might as well requeue all the\n>     > @@ -1723,11 +1727,15 @@ bool\n>     RPiCameraData::findMatchingBuffers(FrameBuffer *&bayerBuffer,\n>     FrameBuffer *\n>     >                                     \n>      unicam_[Unicam::Embedded].queueBuffer(embeddedQueue_.front());\n>     >                                       embeddedQueue_.pop();\n>     >                               }\n>     > -                             return false;\n>     > +                             flushedBuffers = true;\n>     >                       }\n>     > \n>     > -                     /* If the embedded queue has become empty,\n>     we cannot do any more. */\n>     > -                     if (embeddedQueue_.empty())\n>     > +                     /*\n>     > +                      * If the embedded queue has become empty,\n>     we cannot do any more.\n>     > +                      * Similarly, if we have flushed any one of\n>     our queues, we cannot do\n>     > +                      * any more. Return from here without a\n>     buffer pair.\n>     > +                      */\n>     > +                     if (embeddedQueue_.empty() || flushedBuffers)\n>     >                               return false;\n>     >               } else {\n>     >                       /*\n>     >\n> \n>     -- \n>     Regards\n>     --\n>     Kieran\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 0C601BE08A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 25 Nov 2020 10:03:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 918E66340B;\n\tWed, 25 Nov 2020 11:03:21 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D77AE632EE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 25 Nov 2020 11:03:20 +0100 (CET)","from [192.168.0.20]\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 43707292;\n\tWed, 25 Nov 2020 11:03:20 +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=\"lrlY4mba\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1606298600;\n\tbh=kESkRhgwjwn+lFTFF9USUiYYJYrBOlrNUaEWCt6ygPg=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=lrlY4mbaLJ1C2I9huMXaVDf7FSa2anAs4nUqQIWimrI3/u0wdLPb53iTEJENIy6lJ\n\t6ucRSijtBvF+P9spdi9Qq0QjLT/qZY/jz3Dvd1PVPfsQzCsi0HLGoXXN05UAMJDQKE\n\tU18aClxoSaIzZXEfDrOcaYVylXIRsb5QOmxXp26A=","To":"Naushir Patuck <naush@raspberrypi.com>","References":"<20201124175934.238358-1-naush@raspberrypi.com>\n\t<849c1d1d-2de6-f1d9-606a-af3729617038@ideasonboard.com>\n\t<CAEmqJPpH5BWyWPmRJD-0C+fcMZ5M=MsPr=b8HUCVJ3WURkEnNw@mail.gmail.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq\n\t8K8FieAjgjMSxngo/HST8TpFeqI5nVeq0/lqtBRQKumuIqDg+Bkr4L1V/PSB6XgQcOdhtd36\n\tOe9X9dXB8YSNt7VjOcO7BTmFn/Z8r92mSAfHXpb07YJWJosQOQARAQABtDB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zaj+jO6kJtoZsIaYR7rMMq9aUAjyiaEZpmP1qF/2sYenDx0Fg2BSlLvLvXM0vU8\n\tpQk3kgDu7kb/7PRYrZvBsr21EIQoIjXbZxDz/o7z95frkP71EaICttZ6k9q5oxxA5WC6sTXc\n\tMW8zs8avFNuA9VpXt0YupJd2ijtZy2mpZNG02fFVXhIn4G807G7+9mhuC4XG5rKlBBUXTvPU\n\tAfYnB4JBDLmLzBFavQfvonSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<131f0a0a-27a7-c3cc-3ed6-492b69026e8a@ideasonboard.com>","Date":"Wed, 25 Nov 2020 10:03:18 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.10.0","MIME-Version":"1.0","In-Reply-To":"<CAEmqJPpH5BWyWPmRJD-0C+fcMZ5M=MsPr=b8HUCVJ3WURkEnNw@mail.gmail.com>","Content-Language":"en-GB","Subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Fix erroneous\n\tbayer buffer requeue on buffer matching","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>","Reply-To":"kieran.bingham@ideasonboard.com","Cc":"libcamera devel <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":13892,"web_url":"https://patchwork.libcamera.org/comment/13892/","msgid":"<CAEmqJPqiT1U_tKcZ8N2g_wb_fseh2Suyt=W5iJNQek8-6EcqPg@mail.gmail.com>","date":"2020-11-26T09:25:08","subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Fix erroneous\n\tbayer buffer requeue on buffer matching","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Kieran,\n\nThank you for the review.  David, would you be able to tag this as tested\nby you?  Once that is done, I think it should be good to go.\n\nRegards,\nNaush\n\n\nOn Wed, 25 Nov 2020 at 10:03, Kieran Bingham <\nkieran.bingham@ideasonboard.com> wrote:\n\n> Hi Naush,\n>\n> On 25/11/2020 09:46, Naushir Patuck wrote:\n> > Hi Kieran,\n> >\n> > On Tue, 24 Nov 2020 at 19:16, Kieran Bingham\n> > <kieran.bingham@ideasonboard.com\n> > <mailto:kieran.bingham@ideasonboard.com>> wrote:\n> >\n> >     Hi Naush,\n> >\n> >     On 24/11/2020 17:59, Naushir Patuck wrote:\n> >     > With the recent change in the bayer/embedded buffer matching code,\n> >     > a condition would make the bayer buffer be requeued back to the\n> >     device,\n> >     > even though it could potentially be queued for matching. This would\n> >     > cause unnecessary frame drops as sync would be lost.\n> >     >\n> >     > The fix is to ensure the bayer buffer only gets requeued if the\n> >     embedded\n> >     > data buffer queue is not empty, i.e. the buffer truly is orphaned.\n> >     > Additionally, we do this test before deciding to flush any of the\n> two\n> >     > queues of all their buffers.\n> >     >\n> >     > Fixes: 909882b (pipeline: raspberrypi: Rework bayer/embedded data\n> >     buffer matching)\n> >     > Signed-off-by: Naushir Patuck <naush@raspberrypi.com\n> >     <mailto:naush@raspberrypi.com>>\n> >\n> >     Thanks for the quick turn around on this fix ;-)\n> >\n> >     Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com\n> >     <mailto:kieran.bingham@ideasonboard.com>>\n> >\n> >     > ---\n> >     >  .../pipeline/raspberrypi/raspberrypi.cpp      | 38\n> >     +++++++++++--------\n> >     >  1 file changed, 23 insertions(+), 15 deletions(-)\n> >     >\n> >     > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> >     b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> >     > index 7271573a..fd306066 100644\n> >     > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> >     > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> >     > @@ -1679,8 +1679,23 @@ bool\n> >     RPiCameraData::findMatchingBuffers(FrameBuffer *&bayerBuffer,\n> >     FrameBuffer *\n> >     >               }\n> >     >\n> >     >               if (!embeddedBuffer) {\n> >     > +                     bool flushedBuffers = false;\n> >     > +\n> >     >                       LOG(RPI, Debug) << \"Could not find matching\n> >     embedded buffer\";\n> >     >\n> >     > +                     if (!embeddedQueue_.empty()) {\n> >     > +                             /*\n> >     > +                              * Not found a matching embedded\n> >     buffer for the bayer buffer in\n> >     > +                              * the front of the queue. This\n> >     buffer is now orphaned, so requeue\n> >     > +                              * it back to the device.\n> >     > +                              */\n> >     > +\n> >      unicam_[Unicam::Image].queueBuffer(bayerQueue_.front());\n> >     > +                             bayerQueue_.pop();\n> >     > +                             bayerRequeueCount++;\n> >     > +                             LOG(RPI, Warning) << \"Dropping\n> >     unmatched input frame in stream \"\n> >     > +                                               <<\n> >     unicam_[Unicam::Image].name();\n> >     > +                     }\n> >     > +\n> >     >                       /*\n> >     >                        * If we have requeued all available\n> >     embedded data buffers in this loop,\n> >     >                        * then we are fully out of sync, so might\n> >     as well requeue all the pending\n> >     > @@ -1695,20 +1710,9 @@ bool\n> >     RPiCameraData::findMatchingBuffers(FrameBuffer *&bayerBuffer,\n> >     FrameBuffer *\n> >     >\n> >      unicam_[Unicam::Image].queueBuffer(bayerQueue_.front());\n> >     >                                       bayerQueue_.pop();\n> >     >                               }\n> >     > -                             return false;\n> >     > +                             flushedBuffers = true;\n> >     >                       }\n> >     >\n> >     > -                     /*\n> >     > -                      * Not found a matching embedded buffer for\n> >     the bayer buffer in\n> >     > -                      * the front of the queue. This buffer is\n> >     now orphaned, so requeue\n> >     > -                      * it back to the device.\n> >     > -                      */\n> >     > -\n> >      unicam_[Unicam::Image].queueBuffer(bayerQueue_.front());\n> >     > -                     bayerQueue_.pop();\n> >     > -                     bayerRequeueCount++;\n> >     > -                     LOG(RPI, Warning) << \"Dropping unmatched\n> >     input frame in stream \"\n> >     > -                                       <<\n> >     unicam_[Unicam::Image].name();\n> >     > -\n> >     >                       /*\n> >     >                        * Similar to the above, if we have requeued\n> >     all available bayer buffers in\n> >\n> >     Is this statement now outdated? ('similar to \"above\"') or is it ok?\n> >\n> >\n> > This statement is still valid, we are flushing the embedded data queue\n> > with similar conditions to the bayer queue flush above.\n> >\n>\n> Ok - great. I was worried that the code move might have affected it.\n>\n> Well then,\n>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>\n\n> > Regards,\n> > Naush\n> >\n> >\n> >\n> >\n> >     >                        * the loop, then we are fully out of sync,\n> >     so might as well requeue all the\n> >     > @@ -1723,11 +1727,15 @@ bool\n> >     RPiCameraData::findMatchingBuffers(FrameBuffer *&bayerBuffer,\n> >     FrameBuffer *\n> >     >\n> >      unicam_[Unicam::Embedded].queueBuffer(embeddedQueue_.front());\n> >     >                                       embeddedQueue_.pop();\n> >     >                               }\n> >     > -                             return false;\n> >     > +                             flushedBuffers = true;\n> >     >                       }\n> >     >\n> >     > -                     /* If the embedded queue has become empty,\n> >     we cannot do any more. */\n> >     > -                     if (embeddedQueue_.empty())\n> >     > +                     /*\n> >     > +                      * If the embedded queue has become empty,\n> >     we cannot do any more.\n> >     > +                      * Similarly, if we have flushed any one of\n> >     our queues, we cannot do\n> >     > +                      * any more. Return from here without a\n> >     buffer pair.\n> >     > +                      */\n> >     > +                     if (embeddedQueue_.empty() || flushedBuffers)\n> >     >                               return false;\n> >     >               } else {\n> >     >                       /*\n> >     >\n> >\n> >     --\n> >     Regards\n> >     --\n> >     Kieran\n> >\n>\n> --\n> Regards\n> --\n> Kieran\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 30CD5BE176\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Nov 2020 09:25:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 92D096343F;\n\tThu, 26 Nov 2020 10:25:26 +0100 (CET)","from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com\n\t[IPv6:2a00:1450:4864:20::12f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 80C8A60331\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Nov 2020 10:25:25 +0100 (CET)","by mail-lf1-x12f.google.com with SMTP id d8so1545671lfa.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Nov 2020 01:25:25 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"krYTVcys\"; 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=t/s3byHprBdDMBSVttg+E7exJTYmpKiXB6vCplzCYn4=;\n\tb=krYTVcysc4KJj+GBwaKFaqZclRz8TGxJK1XsIbnqQYE8AQ4hlfUOPrTQagvu6eXEdI\n\tZbVjT9k7AxbIXMAFg3kA1ZuFULgJCVq1YLfCA9l3ex9D24ofQLhnRX/e+nFcT/FQGA7z\n\tEkbgaQcyvcQZGR347WF7WbpYAEgmWTCQ43DP008MB82R/gcU6rWDBeuY6JOfd0K451hd\n\tbYob+KE5VRXfV5YadJo5yErgV9ZiK9fzH/5JBwVU5/W6iIQ9RD3UOApl6fehUnS8tlbA\n\t7hLnKLTerE6H00umZs/k1Ogo1xC0DX+ImkxDGktvV3w/1YUd3G0IJZAdYM5+FtxUsUAG\n\t7qWg==","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=t/s3byHprBdDMBSVttg+E7exJTYmpKiXB6vCplzCYn4=;\n\tb=PFr+DyLN+XYa//t8fW8g039XfLE0ljqb0oEDzsR39+YxoKA52xRb8gnV+mrsXy+Il4\n\tF2gcdKruTmxfSqHaRW0oN2eqh5i9e5DMbbwctKiq/vp9s+VOC+gmYHbpNX7NHaHJcx8r\n\tuoP85pOmhYgPPgde/RoCic3MHCk6voHK2tZsB9Ne0bHRs7hTxUrel/sRXSkfyFJJ+JIK\n\t/Iz640h292VLZk9h8ldN4lHsxirszo9prxW4nu1nVpg30YF55TqSYnXqesELxNRyshZ/\n\t7pKdnz+jdDBknO3R1847MBxqwNAhD4OEJT2Nlo6/nJvtN2rW1VqcjP9FWTQ2p/yOdBlh\n\t5HRw==","X-Gm-Message-State":"AOAM5336LXkZJBB32/nBpqIfoSVlcfo9LgFeuEr9CxkSXZYcKjFF6aGr\n\tIygaPs1B6NK7sJ/D8YFtfxdi/OIOicQJ4P9rRj4Zxg==","X-Google-Smtp-Source":"ABdhPJypAInlEtRQmuUeAEXebSGjbF7O/OELiuDajk42JvJGex/nPHd6dPTWVmUARQDUavYc6edKYVGVLLOWo4wwWqI=","X-Received":"by 2002:a05:6512:3e6:: with SMTP id\n\tn6mr987727lfq.413.1606382724514; \n\tThu, 26 Nov 2020 01:25:24 -0800 (PST)","MIME-Version":"1.0","References":"<20201124175934.238358-1-naush@raspberrypi.com>\n\t<849c1d1d-2de6-f1d9-606a-af3729617038@ideasonboard.com>\n\t<CAEmqJPpH5BWyWPmRJD-0C+fcMZ5M=MsPr=b8HUCVJ3WURkEnNw@mail.gmail.com>\n\t<131f0a0a-27a7-c3cc-3ed6-492b69026e8a@ideasonboard.com>","In-Reply-To":"<131f0a0a-27a7-c3cc-3ed6-492b69026e8a@ideasonboard.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Thu, 26 Nov 2020 09:25:08 +0000","Message-ID":"<CAEmqJPqiT1U_tKcZ8N2g_wb_fseh2Suyt=W5iJNQek8-6EcqPg@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>, \n\tDavid Plowman <david.plowman@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Fix erroneous\n\tbayer buffer requeue on buffer matching","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>","Content-Type":"multipart/mixed;\n\tboundary=\"===============1301592297997432721==\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":13898,"web_url":"https://patchwork.libcamera.org/comment/13898/","msgid":"<CAHW6GYJHW0FTiSp=ijsATRZDxSCSL+Cnou8be9dktTN1Zzmsyw@mail.gmail.com>","date":"2020-11-26T09:51:27","subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Fix erroneous\n\tbayer buffer requeue on buffer matching","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Naush\n\nYes, indeed. It's been working for me.\n\nOn Thu, 26 Nov 2020 at 09:25, Naushir Patuck <naush@raspberrypi.com> wrote:\n>\n> Hi Kieran,\n>\n> Thank you for the review.  David, would you be able to tag this as tested by you?  Once that is done, I think it should be good to go.\n>\n> Regards,\n> Naush\n>\n>\n> On Wed, 25 Nov 2020 at 10:03, Kieran Bingham <kieran.bingham@ideasonboard.com> wrote:\n>>\n>> Hi Naush,\n>>\n>> On 25/11/2020 09:46, Naushir Patuck wrote:\n>> > Hi Kieran,\n>> >\n>> > On Tue, 24 Nov 2020 at 19:16, Kieran Bingham\n>> > <kieran.bingham@ideasonboard.com\n>> > <mailto:kieran.bingham@ideasonboard.com>> wrote:\n>> >\n>> >     Hi Naush,\n>> >\n>> >     On 24/11/2020 17:59, Naushir Patuck wrote:\n>> >     > With the recent change in the bayer/embedded buffer matching code,\n>> >     > a condition would make the bayer buffer be requeued back to the\n>> >     device,\n>> >     > even though it could potentially be queued for matching. This would\n>> >     > cause unnecessary frame drops as sync would be lost.\n>> >     >\n>> >     > The fix is to ensure the bayer buffer only gets requeued if the\n>> >     embedded\n>> >     > data buffer queue is not empty, i.e. the buffer truly is orphaned.\n>> >     > Additionally, we do this test before deciding to flush any of the two\n>> >     > queues of all their buffers.\n>> >     >\n>> >     > Fixes: 909882b (pipeline: raspberrypi: Rework bayer/embedded data\n>> >     buffer matching)\n>> >     > Signed-off-by: Naushir Patuck <naush@raspberrypi.com\n>> >     <mailto:naush@raspberrypi.com>>\n>> >\n>> >     Thanks for the quick turn around on this fix ;-)\n>> >\n>> >     Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com\n>> >     <mailto:kieran.bingham@ideasonboard.com>>\n>> >\n>> >     > ---\n>> >     >  .../pipeline/raspberrypi/raspberrypi.cpp      | 38\n>> >     +++++++++++--------\n>> >     >  1 file changed, 23 insertions(+), 15 deletions(-)\n>> >     >\n>> >     > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n>> >     b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n>> >     > index 7271573a..fd306066 100644\n>> >     > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n>> >     > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n>> >     > @@ -1679,8 +1679,23 @@ bool\n>> >     RPiCameraData::findMatchingBuffers(FrameBuffer *&bayerBuffer,\n>> >     FrameBuffer *\n>> >     >               }\n>> >     >\n>> >     >               if (!embeddedBuffer) {\n>> >     > +                     bool flushedBuffers = false;\n>> >     > +\n>> >     >                       LOG(RPI, Debug) << \"Could not find matching\n>> >     embedded buffer\";\n>> >     >\n>> >     > +                     if (!embeddedQueue_.empty()) {\n>> >     > +                             /*\n>> >     > +                              * Not found a matching embedded\n>> >     buffer for the bayer buffer in\n>> >     > +                              * the front of the queue. This\n>> >     buffer is now orphaned, so requeue\n>> >     > +                              * it back to the device.\n>> >     > +                              */\n>> >     > +\n>> >      unicam_[Unicam::Image].queueBuffer(bayerQueue_.front());\n>> >     > +                             bayerQueue_.pop();\n>> >     > +                             bayerRequeueCount++;\n>> >     > +                             LOG(RPI, Warning) << \"Dropping\n>> >     unmatched input frame in stream \"\n>> >     > +                                               <<\n>> >     unicam_[Unicam::Image].name();\n>> >     > +                     }\n>> >     > +\n>> >     >                       /*\n>> >     >                        * If we have requeued all available\n>> >     embedded data buffers in this loop,\n>> >     >                        * then we are fully out of sync, so might\n>> >     as well requeue all the pending\n>> >     > @@ -1695,20 +1710,9 @@ bool\n>> >     RPiCameraData::findMatchingBuffers(FrameBuffer *&bayerBuffer,\n>> >     FrameBuffer *\n>> >     >\n>> >      unicam_[Unicam::Image].queueBuffer(bayerQueue_.front());\n>> >     >                                       bayerQueue_.pop();\n>> >     >                               }\n>> >     > -                             return false;\n>> >     > +                             flushedBuffers = true;\n>> >     >                       }\n>> >     >\n>> >     > -                     /*\n>> >     > -                      * Not found a matching embedded buffer for\n>> >     the bayer buffer in\n>> >     > -                      * the front of the queue. This buffer is\n>> >     now orphaned, so requeue\n>> >     > -                      * it back to the device.\n>> >     > -                      */\n>> >     > -\n>> >      unicam_[Unicam::Image].queueBuffer(bayerQueue_.front());\n>> >     > -                     bayerQueue_.pop();\n>> >     > -                     bayerRequeueCount++;\n>> >     > -                     LOG(RPI, Warning) << \"Dropping unmatched\n>> >     input frame in stream \"\n>> >     > -                                       <<\n>> >     unicam_[Unicam::Image].name();\n>> >     > -\n>> >     >                       /*\n>> >     >                        * Similar to the above, if we have requeued\n>> >     all available bayer buffers in\n>> >\n>> >     Is this statement now outdated? ('similar to \"above\"') or is it ok?\n>> >\n>> >\n>> > This statement is still valid, we are flushing the embedded data queue\n>> > with similar conditions to the bayer queue flush above.\n>> >\n>>\n>> Ok - great. I was worried that the code move might have affected it.\n>>\n>> Well then,\n>>\n>> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>>\n>>\n\nTested-by: David Plowman <david.plowman@raspberrypi.com>\n\nBest regards\nDavid\n\n>> > Regards,\n>> > Naush\n>> >\n>> >\n>> >\n>> >\n>> >     >                        * the loop, then we are fully out of sync,\n>> >     so might as well requeue all the\n>> >     > @@ -1723,11 +1727,15 @@ bool\n>> >     RPiCameraData::findMatchingBuffers(FrameBuffer *&bayerBuffer,\n>> >     FrameBuffer *\n>> >     >\n>> >      unicam_[Unicam::Embedded].queueBuffer(embeddedQueue_.front());\n>> >     >                                       embeddedQueue_.pop();\n>> >     >                               }\n>> >     > -                             return false;\n>> >     > +                             flushedBuffers = true;\n>> >     >                       }\n>> >     >\n>> >     > -                     /* If the embedded queue has become empty,\n>> >     we cannot do any more. */\n>> >     > -                     if (embeddedQueue_.empty())\n>> >     > +                     /*\n>> >     > +                      * If the embedded queue has become empty,\n>> >     we cannot do any more.\n>> >     > +                      * Similarly, if we have flushed any one of\n>> >     our queues, we cannot do\n>> >     > +                      * any more. Return from here without a\n>> >     buffer pair.\n>> >     > +                      */\n>> >     > +                     if (embeddedQueue_.empty() || flushedBuffers)\n>> >     >                               return false;\n>> >     >               } else {\n>> >     >                       /*\n>> >     >\n>> >\n>> >     --\n>> >     Regards\n>> >     --\n>> >     Kieran\n>> >\n>>\n>> --\n>> Regards\n>> --\n>> Kieran","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 74F60BE08A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Nov 2020 09:51:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3A9196343E;\n\tThu, 26 Nov 2020 10:51:41 +0100 (CET)","from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com\n\t[IPv6:2607:f8b0:4864:20::22b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3D21C6343D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Nov 2020 10:51:39 +0100 (CET)","by mail-oi1-x22b.google.com with SMTP id t143so1646036oif.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Nov 2020 01:51:39 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"EFFfbUJx\"; 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=r1dhxYR6uR4cnriqAtMKAm3grY1pcCU8hLF0jDZFJcI=;\n\tb=EFFfbUJx0s7o1xeaOUiUlGrQwD9O8a6Q1WMrDhfYN730mLULPPMojbafQmeDlnEJfP\n\tAb7H//qyIOnPguNowwoVrOsfuljcGLYbtanllq3P5Si9Z0kQPjN2v1KMSqXSM/QMi1hv\n\tMKzSK45KiGatH5WlvGeFGwmcXIx2EHTrKaMDTnZr7s4yTRcb4N3qXZl5HKQ4bL4PBXP3\n\trb+n3lsNcbPxOtXIunPm1HMm8egluCgWFxqQHpmvPIzieQSeOWl3Gu9Z3jNRZvCXGQvJ\n\tPbf1IMiWElxGj2K61yXzqqcZ3f2M0lT82IsVhobAj+QVHrnJQGTonCwwgyVYQcpX8lXk\n\tEN8g==","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=r1dhxYR6uR4cnriqAtMKAm3grY1pcCU8hLF0jDZFJcI=;\n\tb=sC+PPzq42JFOeysxsaM5BgTZTKECLxZYs3jp8jDiz/7ap2T9o8h9cx33Tu6rbc+EMP\n\tpkOAH4PpWF3JHEMmf5eWH/KtkRLtATFq6O7pAyDI+98MYOWTfvRtlFhCFoY+NtJliv9B\n\t0TJ61m2kpwuK/ZHZsuMzJu/HnOsjpZx5Q31mvKKhKxOx1Y0TKkFj4ZcPLx15/M8ipK9j\n\tKhuMt3cFfK/QVAfG6PwpXYt3RFtdqfs1ZfcwBRXEZo6PPjykLsytCqsGxKJ8r7o8bGSM\n\twW04AhBb0XCTDICwQpzhTrstcAoJSGV9hN/C8WLifMOcJYcq3pgDFoeT6HNIBJZ5Y414\n\tIJXg==","X-Gm-Message-State":"AOAM532B5C5zXRYSK7Cq64KYIjgTIHTBHfeUODx17y8NKcj6W6Uhn6NL\n\tDyA8bW8GtLF1bQiPB9DP1SneHvuU+xZt7t7VrnfuSQ==","X-Google-Smtp-Source":"ABdhPJx7KNFiPRM7Fc0H95Bvz4IRSLa24m9B4sJiUsVghd8X9f5il8f+rMzelDjbcW+7citKQEgP1rbKDi++BDZIPqU=","X-Received":"by 2002:aca:3c3:: with SMTP id 186mr1558658oid.22.1606384298058; \n\tThu, 26 Nov 2020 01:51:38 -0800 (PST)","MIME-Version":"1.0","References":"<20201124175934.238358-1-naush@raspberrypi.com>\n\t<849c1d1d-2de6-f1d9-606a-af3729617038@ideasonboard.com>\n\t<CAEmqJPpH5BWyWPmRJD-0C+fcMZ5M=MsPr=b8HUCVJ3WURkEnNw@mail.gmail.com>\n\t<131f0a0a-27a7-c3cc-3ed6-492b69026e8a@ideasonboard.com>\n\t<CAEmqJPqiT1U_tKcZ8N2g_wb_fseh2Suyt=W5iJNQek8-6EcqPg@mail.gmail.com>","In-Reply-To":"<CAEmqJPqiT1U_tKcZ8N2g_wb_fseh2Suyt=W5iJNQek8-6EcqPg@mail.gmail.com>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Thu, 26 Nov 2020 09:51:27 +0000","Message-ID":"<CAHW6GYJHW0FTiSp=ijsATRZDxSCSL+Cnou8be9dktTN1Zzmsyw@mail.gmail.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Fix erroneous\n\tbayer buffer requeue on buffer matching","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>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":13903,"web_url":"https://patchwork.libcamera.org/comment/13903/","msgid":"<463ae720-19dc-7726-7611-1848ceab559a@ideasonboard.com>","date":"2020-11-26T10:36:51","subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Fix erroneous\n\tbayer buffer requeue on buffer matching","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi David, Naush,\n\nOn 26/11/2020 09:51, David Plowman wrote:\n> Hi Naush\n> \n> Yes, indeed. It's been working for me.\n\nThanks, I've added:\n\nTested-by: David Plowman <david.plowman@raspberrypi.com>\n\nand pushed.\n--\nKieran\n\n\n> \n> On Thu, 26 Nov 2020 at 09:25, Naushir Patuck <naush@raspberrypi.com> wrote:\n>>\n>> Hi Kieran,\n>>\n>> Thank you for the review.  David, would you be able to tag this as tested by you?  Once that is done, I think it should be good to go.\n>>\n>> Regards,\n>> Naush\n>>\n>>\n>> On Wed, 25 Nov 2020 at 10:03, Kieran Bingham <kieran.bingham@ideasonboard.com> wrote:\n>>>\n>>> Hi Naush,\n>>>\n>>> On 25/11/2020 09:46, Naushir Patuck wrote:\n>>>> Hi Kieran,\n>>>>\n>>>> On Tue, 24 Nov 2020 at 19:16, Kieran Bingham\n>>>> <kieran.bingham@ideasonboard.com\n>>>> <mailto:kieran.bingham@ideasonboard.com>> wrote:\n>>>>\n>>>>     Hi Naush,\n>>>>\n>>>>     On 24/11/2020 17:59, Naushir Patuck wrote:\n>>>>     > With the recent change in the bayer/embedded buffer matching code,\n>>>>     > a condition would make the bayer buffer be requeued back to the\n>>>>     device,\n>>>>     > even though it could potentially be queued for matching. This would\n>>>>     > cause unnecessary frame drops as sync would be lost.\n>>>>     >\n>>>>     > The fix is to ensure the bayer buffer only gets requeued if the\n>>>>     embedded\n>>>>     > data buffer queue is not empty, i.e. the buffer truly is orphaned.\n>>>>     > Additionally, we do this test before deciding to flush any of the two\n>>>>     > queues of all their buffers.\n>>>>     >\n>>>>     > Fixes: 909882b (pipeline: raspberrypi: Rework bayer/embedded data\n>>>>     buffer matching)\n>>>>     > Signed-off-by: Naushir Patuck <naush@raspberrypi.com\n>>>>     <mailto:naush@raspberrypi.com>>\n>>>>\n>>>>     Thanks for the quick turn around on this fix ;-)\n>>>>\n>>>>     Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com\n>>>>     <mailto:kieran.bingham@ideasonboard.com>>\n>>>>\n>>>>     > ---\n>>>>     >  .../pipeline/raspberrypi/raspberrypi.cpp      | 38\n>>>>     +++++++++++--------\n>>>>     >  1 file changed, 23 insertions(+), 15 deletions(-)\n>>>>     >\n>>>>     > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n>>>>     b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n>>>>     > index 7271573a..fd306066 100644\n>>>>     > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n>>>>     > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n>>>>     > @@ -1679,8 +1679,23 @@ bool\n>>>>     RPiCameraData::findMatchingBuffers(FrameBuffer *&bayerBuffer,\n>>>>     FrameBuffer *\n>>>>     >               }\n>>>>     >\n>>>>     >               if (!embeddedBuffer) {\n>>>>     > +                     bool flushedBuffers = false;\n>>>>     > +\n>>>>     >                       LOG(RPI, Debug) << \"Could not find matching\n>>>>     embedded buffer\";\n>>>>     >\n>>>>     > +                     if (!embeddedQueue_.empty()) {\n>>>>     > +                             /*\n>>>>     > +                              * Not found a matching embedded\n>>>>     buffer for the bayer buffer in\n>>>>     > +                              * the front of the queue. This\n>>>>     buffer is now orphaned, so requeue\n>>>>     > +                              * it back to the device.\n>>>>     > +                              */\n>>>>     > +\n>>>>      unicam_[Unicam::Image].queueBuffer(bayerQueue_.front());\n>>>>     > +                             bayerQueue_.pop();\n>>>>     > +                             bayerRequeueCount++;\n>>>>     > +                             LOG(RPI, Warning) << \"Dropping\n>>>>     unmatched input frame in stream \"\n>>>>     > +                                               <<\n>>>>     unicam_[Unicam::Image].name();\n>>>>     > +                     }\n>>>>     > +\n>>>>     >                       /*\n>>>>     >                        * If we have requeued all available\n>>>>     embedded data buffers in this loop,\n>>>>     >                        * then we are fully out of sync, so might\n>>>>     as well requeue all the pending\n>>>>     > @@ -1695,20 +1710,9 @@ bool\n>>>>     RPiCameraData::findMatchingBuffers(FrameBuffer *&bayerBuffer,\n>>>>     FrameBuffer *\n>>>>     >\n>>>>      unicam_[Unicam::Image].queueBuffer(bayerQueue_.front());\n>>>>     >                                       bayerQueue_.pop();\n>>>>     >                               }\n>>>>     > -                             return false;\n>>>>     > +                             flushedBuffers = true;\n>>>>     >                       }\n>>>>     >\n>>>>     > -                     /*\n>>>>     > -                      * Not found a matching embedded buffer for\n>>>>     the bayer buffer in\n>>>>     > -                      * the front of the queue. This buffer is\n>>>>     now orphaned, so requeue\n>>>>     > -                      * it back to the device.\n>>>>     > -                      */\n>>>>     > -\n>>>>      unicam_[Unicam::Image].queueBuffer(bayerQueue_.front());\n>>>>     > -                     bayerQueue_.pop();\n>>>>     > -                     bayerRequeueCount++;\n>>>>     > -                     LOG(RPI, Warning) << \"Dropping unmatched\n>>>>     input frame in stream \"\n>>>>     > -                                       <<\n>>>>     unicam_[Unicam::Image].name();\n>>>>     > -\n>>>>     >                       /*\n>>>>     >                        * Similar to the above, if we have requeued\n>>>>     all available bayer buffers in\n>>>>\n>>>>     Is this statement now outdated? ('similar to \"above\"') or is it ok?\n>>>>\n>>>>\n>>>> This statement is still valid, we are flushing the embedded data queue\n>>>> with similar conditions to the bayer queue flush above.\n>>>>\n>>>\n>>> Ok - great. I was worried that the code move might have affected it.\n>>>\n>>> Well then,\n>>>\n>>> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>>>\n>>>\n> \n> Tested-by: David Plowman <david.plowman@raspberrypi.com>\n> \n> Best regards\n> David\n> \n>>>> Regards,\n>>>> Naush\n>>>>\n>>>>\n>>>>\n>>>>\n>>>>     >                        * the loop, then we are fully out of sync,\n>>>>     so might as well requeue all the\n>>>>     > @@ -1723,11 +1727,15 @@ bool\n>>>>     RPiCameraData::findMatchingBuffers(FrameBuffer *&bayerBuffer,\n>>>>     FrameBuffer *\n>>>>     >\n>>>>      unicam_[Unicam::Embedded].queueBuffer(embeddedQueue_.front());\n>>>>     >                                       embeddedQueue_.pop();\n>>>>     >                               }\n>>>>     > -                             return false;\n>>>>     > +                             flushedBuffers = true;\n>>>>     >                       }\n>>>>     >\n>>>>     > -                     /* If the embedded queue has become empty,\n>>>>     we cannot do any more. */\n>>>>     > -                     if (embeddedQueue_.empty())\n>>>>     > +                     /*\n>>>>     > +                      * If the embedded queue has become empty,\n>>>>     we cannot do any more.\n>>>>     > +                      * Similarly, if we have flushed any one of\n>>>>     our queues, we cannot do\n>>>>     > +                      * any more. Return from here without a\n>>>>     buffer pair.\n>>>>     > +                      */\n>>>>     > +                     if (embeddedQueue_.empty() || flushedBuffers)\n>>>>     >                               return false;\n>>>>     >               } else {\n>>>>     >                       /*\n>>>>     >\n>>>>\n>>>>     --\n>>>>     Regards\n>>>>     --\n>>>>     Kieran\n>>>>\n>>>\n>>> --\n>>> Regards\n>>> --\n>>> Kieran","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 DDA62BE176\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Nov 2020 10:36:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4A6BE6345C;\n\tThu, 26 Nov 2020 11:36:55 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5EC88633EF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Nov 2020 11:36:54 +0100 (CET)","from [192.168.0.20]\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 CA8BEA1B;\n\tThu, 26 Nov 2020 11:36:53 +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=\"d840HuZ8\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1606387014;\n\tbh=sM6VrRhYckMAKqUm+QPI5XhVOpXjtcSsElxv6/sQcW4=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=d840HuZ8S/C8rGlHAwUnelGXOT4w4/wD5EJwvFjKjvnDFw6vbsf+jfs9jKvsL9TgY\n\t0ttilmvs4MUfz0O6tyAms9SReCSYmfiFwplSwIJHsQhoJn9YwfK1VSwqKrN1jeRbsz\n\t0D+ggzneqUBsJX1GxHE3DF9+gH7UNr76g+1ennTA=","To":"David Plowman <david.plowman@raspberrypi.com>,\n\tNaushir Patuck <naush@raspberrypi.com>","References":"<20201124175934.238358-1-naush@raspberrypi.com>\n\t<849c1d1d-2de6-f1d9-606a-af3729617038@ideasonboard.com>\n\t<CAEmqJPpH5BWyWPmRJD-0C+fcMZ5M=MsPr=b8HUCVJ3WURkEnNw@mail.gmail.com>\n\t<131f0a0a-27a7-c3cc-3ed6-492b69026e8a@ideasonboard.com>\n\t<CAEmqJPqiT1U_tKcZ8N2g_wb_fseh2Suyt=W5iJNQek8-6EcqPg@mail.gmail.com>\n\t<CAHW6GYJHW0FTiSp=ijsATRZDxSCSL+Cnou8be9dktTN1Zzmsyw@mail.gmail.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq\n\t8K8FieAjgjMSxngo/HST8TpFeqI5nVeq0/lqtBRQKumuIqDg+Bkr4L1V/PSB6XgQcOdhtd36\n\tOe9X9dXB8YSNt7VjOcO7BTmFn/Z8r92mSAfHXpb07YJWJosQOQARAQAB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YQnzaj+jO6kJtoZsIaYR7rMMq9aUAjyiaEZpmP1qF/2sYenDx0Fg2BSlLvLvXM0vU8\n\tpQk3kgDu7kb/7PRYrZvBsr21EIQoIjXbZxDz/o7z95frkP71EaICttZ6k9q5oxxA5WC6sTXc\n\tMW8zs8avFNuA9VpXt0YupJd2ijtZy2mpZNG02fFVXhIn4G807G7+9mhuC4XG5rKlBBUXTvPU\n\tAfYnB4JBDLmLzBFavQfvonSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<463ae720-19dc-7726-7611-1848ceab559a@ideasonboard.com>","Date":"Thu, 26 Nov 2020 10:36:51 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.10.0","MIME-Version":"1.0","In-Reply-To":"<CAHW6GYJHW0FTiSp=ijsATRZDxSCSL+Cnou8be9dktTN1Zzmsyw@mail.gmail.com>","Content-Language":"en-GB","Subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Fix erroneous\n\tbayer buffer requeue on buffer matching","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>","Reply-To":"kieran.bingham@ideasonboard.com","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]