[{"id":15638,"web_url":"https://patchwork.libcamera.org/comment/15638/","msgid":"<YEv5zWHoUUALhdxK@oden.dyn.berto.se>","date":"2021-03-12T23:31:25","subject":"Re: [libcamera-devel] [PATCH 4/8] libcamera: pipeline: ipu3:\n\tframes: Use the request sequence","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Kieran,\n\nOn 2021-03-12 06:11:27 +0000, Kieran Bingham wrote:\n> For all frame indexes, use the same sequence number as generated\n> by the Request object.\n> \n> This allows clear matching of what operations occured to which request.\n\nnit-pick: This will not be true if we need to queue buffers internally \n(without a request) to feed the 3A right? I think this change may be a \nstep in the right direction just wanted to bring up why an internal id \nwas used.\n\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  src/libcamera/pipeline/ipu3/frames.cpp | 4 +---\n>  src/libcamera/pipeline/ipu3/frames.h   | 1 -\n>  2 files changed, 1 insertion(+), 4 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/ipu3/frames.cpp b/src/libcamera/pipeline/ipu3/frames.cpp\n> index 151ebfe7ca5f..4198e2019f3f 100644\n> --- a/src/libcamera/pipeline/ipu3/frames.cpp\n> +++ b/src/libcamera/pipeline/ipu3/frames.cpp\n> @@ -18,7 +18,6 @@ namespace libcamera {\n>  LOG_DECLARE_CATEGORY(IPU3)\n>  \n>  IPU3Frames::IPU3Frames()\n> -\t: nextId_(0)\n>  {\n>  }\n>  \n> @@ -31,7 +30,6 @@ void IPU3Frames::init(const std::vector<std::unique_ptr<FrameBuffer>> &paramBuff\n>  \tfor (const std::unique_ptr<FrameBuffer> &buffer : statBuffers)\n>  \t\tavailableStatBuffers_.push(buffer.get());\n>  \n> -\tnextId_ = 0;\n>  \tframeInfo_.clear();\n>  }\n>  \n> @@ -43,7 +41,7 @@ void IPU3Frames::clear()\n>  \n>  IPU3Frames::Info *IPU3Frames::create(Request *request)\n>  {\n> -\tunsigned int id = nextId_++;\n> +\tunsigned int id = request->sequence();\n>  \n>  \tif (availableParamBuffers_.empty()) {\n>  \t\tLOG(IPU3, Error) << \"Parameters buffer underrun\";\n> diff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h\n> index 106e5c15cc7a..4acdf48eca9d 100644\n> --- a/src/libcamera/pipeline/ipu3/frames.h\n> +++ b/src/libcamera/pipeline/ipu3/frames.h\n> @@ -53,7 +53,6 @@ private:\n>  \tstd::queue<FrameBuffer *> availableParamBuffers_;\n>  \tstd::queue<FrameBuffer *> availableStatBuffers_;\n>  \n> -\tunsigned int nextId_;\n>  \tstd::map<unsigned int, std::unique_ptr<Info>> frameInfo_;\n>  };\n>  \n> -- \n> 2.25.1\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 1D4F7BD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Mar 2021 23:31:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8D0CB68C68;\n\tSat, 13 Mar 2021 00:31:28 +0100 (CET)","from mail-lj1-x235.google.com (mail-lj1-x235.google.com\n\t[IPv6:2a00:1450:4864:20::235])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DA53C602E8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 13 Mar 2021 00:31:27 +0100 (CET)","by mail-lj1-x235.google.com with SMTP id 15so9357761ljj.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Mar 2021 15:31:27 -0800 (PST)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tt23sm1861686lfl.130.2021.03.12.15.31.26\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 12 Mar 2021 15:31:26 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"UfWGUOyK\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=tEGjzmGhsgDuXLx2d5ndp2C+rBamvPppihuadQtmuqc=;\n\tb=UfWGUOyKanLfiPdz4JGbu2hOZMUP1PwXN/OBR3bJn7pcOvsgAy3AiQLIjmqZkidPoh\n\tlICHk2DuqQXSRk9TBbZgI3rE6bcO2Fzzk/xpknDSCYhgpg1hKyt3zmO5zBEz4OOV560a\n\t29BC6Dug32K8xMsZpoF3vw7Xd/E8MOp2IJF9/vz9iCBLCgWV5KLteQxE2NiZBXODOmfQ\n\tzWVv9V63OQEaoyM0nxDK4R4ohc9FGbGK+g/WhyKfM/RjTdEmhSyOSDO0sskw7mXbZcd/\n\tl8/L/cDb/BpT4O4MSe+PCwW/Zq4gVld6ShbEbNPJF84Uj+cswTCENYJpj1MjsZidYq1X\n\thENA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=tEGjzmGhsgDuXLx2d5ndp2C+rBamvPppihuadQtmuqc=;\n\tb=IdY0JMS9zo8iB7+3qw1ozWPOHEQQermWGHITTQjWDiqgh1CqXnQcA9ziyc5S7JHtuX\n\tZ5rwsJgj3smB8zvWjvdaM0aEoofNZAyjZAvaGtB2pk3425hDUB/jmDjxBb62gZZ1W1Au\n\tTtZpfjdfBQuQR8BMQijRZvHNq1dJZBEWTJ4uKkzA0zf5atBHZi7uDVVZwtPn/cgOndPr\n\to2ogXWZ0arRUvOijBc3DBY2OHxNo0YXVhUZhvkbNHJtxSQUoX4XurLOTBgM/OnID8XCw\n\t12vN4wMo8vkSc5pQqMBL5YLPRm/fJPtEg8gw18beSUXwQbUupO8fft4ofm5jFOn0oB6s\n\tzNmQ==","X-Gm-Message-State":"AOAM532yE+YFTOSOCzzTfL4R52d1MpJ+ttjGHXFGgXAehRqNDn7PulJz\n\tXqIZgDZGCh2IFBCO4e4MqiuS0w==","X-Google-Smtp-Source":"ABdhPJxNegD8CSsv6zQN8k6/Kc/9rU3sL1Xffijdv3NPejJCesve3sNoNXX6w7yHTwLhaa3PCFV5tQ==","X-Received":"by 2002:a2e:3808:: with SMTP id f8mr3572597lja.137.1615591886978;\n\tFri, 12 Mar 2021 15:31:26 -0800 (PST)","Date":"Sat, 13 Mar 2021 00:31:25 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YEv5zWHoUUALhdxK@oden.dyn.berto.se>","References":"<20210312061131.854849-1-kieran.bingham@ideasonboard.com>\n\t<20210312061131.854849-5-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210312061131.854849-5-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 4/8] libcamera: pipeline: ipu3:\n\tframes: Use the request sequence","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=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15667,"web_url":"https://patchwork.libcamera.org/comment/15667/","msgid":"<YE1shf2IHvW8rm98@pendragon.ideasonboard.com>","date":"2021-03-14T01:53:09","subject":"Re: [libcamera-devel] [PATCH 4/8] libcamera: pipeline: ipu3:\n\tframes: Use the request sequence","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran and Niklas,\n\nOn Sat, Mar 13, 2021 at 12:31:25AM +0100, Niklas Söderlund wrote:\n> On 2021-03-12 06:11:27 +0000, Kieran Bingham wrote:\n> > For all frame indexes, use the same sequence number as generated\n> > by the Request object.\n> > \n> > This allows clear matching of what operations occured to which request.\n> \n> nit-pick: This will not be true if we need to queue buffers internally \n> (without a request) to feed the 3A right? I think this change may be a \n> step in the right direction just wanted to bring up why an internal id \n> was used.\n\nWouldn't we still have a request, even if it has only a raw buffer ?\n\n> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> > ---\n> >  src/libcamera/pipeline/ipu3/frames.cpp | 4 +---\n> >  src/libcamera/pipeline/ipu3/frames.h   | 1 -\n> >  2 files changed, 1 insertion(+), 4 deletions(-)\n> > \n> > diff --git a/src/libcamera/pipeline/ipu3/frames.cpp b/src/libcamera/pipeline/ipu3/frames.cpp\n> > index 151ebfe7ca5f..4198e2019f3f 100644\n> > --- a/src/libcamera/pipeline/ipu3/frames.cpp\n> > +++ b/src/libcamera/pipeline/ipu3/frames.cpp\n> > @@ -18,7 +18,6 @@ namespace libcamera {\n> >  LOG_DECLARE_CATEGORY(IPU3)\n> >  \n> >  IPU3Frames::IPU3Frames()\n> > -\t: nextId_(0)\n> >  {\n> >  }\n> >  \n> > @@ -31,7 +30,6 @@ void IPU3Frames::init(const std::vector<std::unique_ptr<FrameBuffer>> &paramBuff\n> >  \tfor (const std::unique_ptr<FrameBuffer> &buffer : statBuffers)\n> >  \t\tavailableStatBuffers_.push(buffer.get());\n> >  \n> > -\tnextId_ = 0;\n> >  \tframeInfo_.clear();\n> >  }\n> >  \n> > @@ -43,7 +41,7 @@ void IPU3Frames::clear()\n> >  \n> >  IPU3Frames::Info *IPU3Frames::create(Request *request)\n> >  {\n> > -\tunsigned int id = nextId_++;\n> > +\tunsigned int id = request->sequence();\n> >  \n> >  \tif (availableParamBuffers_.empty()) {\n> >  \t\tLOG(IPU3, Error) << \"Parameters buffer underrun\";\n> > diff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h\n> > index 106e5c15cc7a..4acdf48eca9d 100644\n> > --- a/src/libcamera/pipeline/ipu3/frames.h\n> > +++ b/src/libcamera/pipeline/ipu3/frames.h\n> > @@ -53,7 +53,6 @@ private:\n> >  \tstd::queue<FrameBuffer *> availableParamBuffers_;\n> >  \tstd::queue<FrameBuffer *> availableStatBuffers_;\n> >  \n> > -\tunsigned int nextId_;\n> >  \tstd::map<unsigned int, std::unique_ptr<Info>> frameInfo_;\n> >  };\n> >","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id C9D1EBD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 14 Mar 2021 01:53:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 266D160850;\n\tSun, 14 Mar 2021 02:53:47 +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 8354D6084D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 14 Mar 2021 02:53:45 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id F05E655C;\n\tSun, 14 Mar 2021 02:53:44 +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=\"RqRSLgsz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1615686825;\n\tbh=+0T1vON1CA1FOLXcCMixei0j/7RTpIu5e3Vps6OWhNI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=RqRSLgszqoFBXF2QpHXMawBZFknFqVOXuO1XdO5cuObwy0EB9n57GCtDYOb2+FFLX\n\tjDVvBxjshw3570r2Sy/YcJ7P8JvSZIBvG5nfWLWkDWKA6KLhwwKDk0qhSsNzd1cV/6\n\tQQldjH8SPGQ1AdNHa5uPHwowUBnY+/Xb4xNq6WwM=","Date":"Sun, 14 Mar 2021 03:53:09 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<YE1shf2IHvW8rm98@pendragon.ideasonboard.com>","References":"<20210312061131.854849-1-kieran.bingham@ideasonboard.com>\n\t<20210312061131.854849-5-kieran.bingham@ideasonboard.com>\n\t<YEv5zWHoUUALhdxK@oden.dyn.berto.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<YEv5zWHoUUALhdxK@oden.dyn.berto.se>","Subject":"Re: [libcamera-devel] [PATCH 4/8] libcamera: pipeline: ipu3:\n\tframes: Use the request sequence","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=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15675,"web_url":"https://patchwork.libcamera.org/comment/15675/","msgid":"<YE3YLJfPOVjwYsek@oden.dyn.berto.se>","date":"2021-03-14T09:32:28","subject":"Re: [libcamera-devel] [PATCH 4/8] libcamera: pipeline: ipu3:\n\tframes: Use the request sequence","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nOn 2021-03-14 03:53:09 +0200, Laurent Pinchart wrote:\n> Hi Kieran and Niklas,\n> \n> On Sat, Mar 13, 2021 at 12:31:25AM +0100, Niklas Söderlund wrote:\n> > On 2021-03-12 06:11:27 +0000, Kieran Bingham wrote:\n> > > For all frame indexes, use the same sequence number as generated\n> > > by the Request object.\n> > > \n> > > This allows clear matching of what operations occured to which request.\n> > \n> > nit-pick: This will not be true if we need to queue buffers internally \n> > (without a request) to feed the 3A right? I think this change may be a \n> > step in the right direction just wanted to bring up why an internal id \n> > was used.\n> \n> Wouldn't we still have a request, even if it has only a raw buffer ?\n\nNot if it's on the pipelines behalf we run buffers to meet 3A \nrequirements. In such cases the application would not be involved at all \nand using Requests infernally would then be confusing as the seq numbers \ndomain available to applications would then have holes in it.\n\n> \n> > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> > > ---\n> > >  src/libcamera/pipeline/ipu3/frames.cpp | 4 +---\n> > >  src/libcamera/pipeline/ipu3/frames.h   | 1 -\n> > >  2 files changed, 1 insertion(+), 4 deletions(-)\n> > > \n> > > diff --git a/src/libcamera/pipeline/ipu3/frames.cpp b/src/libcamera/pipeline/ipu3/frames.cpp\n> > > index 151ebfe7ca5f..4198e2019f3f 100644\n> > > --- a/src/libcamera/pipeline/ipu3/frames.cpp\n> > > +++ b/src/libcamera/pipeline/ipu3/frames.cpp\n> > > @@ -18,7 +18,6 @@ namespace libcamera {\n> > >  LOG_DECLARE_CATEGORY(IPU3)\n> > >  \n> > >  IPU3Frames::IPU3Frames()\n> > > -\t: nextId_(0)\n> > >  {\n> > >  }\n> > >  \n> > > @@ -31,7 +30,6 @@ void IPU3Frames::init(const std::vector<std::unique_ptr<FrameBuffer>> &paramBuff\n> > >  \tfor (const std::unique_ptr<FrameBuffer> &buffer : statBuffers)\n> > >  \t\tavailableStatBuffers_.push(buffer.get());\n> > >  \n> > > -\tnextId_ = 0;\n> > >  \tframeInfo_.clear();\n> > >  }\n> > >  \n> > > @@ -43,7 +41,7 @@ void IPU3Frames::clear()\n> > >  \n> > >  IPU3Frames::Info *IPU3Frames::create(Request *request)\n> > >  {\n> > > -\tunsigned int id = nextId_++;\n> > > +\tunsigned int id = request->sequence();\n> > >  \n> > >  \tif (availableParamBuffers_.empty()) {\n> > >  \t\tLOG(IPU3, Error) << \"Parameters buffer underrun\";\n> > > diff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h\n> > > index 106e5c15cc7a..4acdf48eca9d 100644\n> > > --- a/src/libcamera/pipeline/ipu3/frames.h\n> > > +++ b/src/libcamera/pipeline/ipu3/frames.h\n> > > @@ -53,7 +53,6 @@ private:\n> > >  \tstd::queue<FrameBuffer *> availableParamBuffers_;\n> > >  \tstd::queue<FrameBuffer *> availableStatBuffers_;\n> > >  \n> > > -\tunsigned int nextId_;\n> > >  \tstd::map<unsigned int, std::unique_ptr<Info>> frameInfo_;\n> > >  };\n> > >  \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 C92FFBD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 14 Mar 2021 09:32:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3027860850;\n\tSun, 14 Mar 2021 10:32:32 +0100 (CET)","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 4B718605B1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 14 Mar 2021 10:32:30 +0100 (CET)","by mail-lf1-x130.google.com with SMTP id e7so52320342lft.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 14 Mar 2021 01:32:30 -0800 (PST)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\t14sm2281968lfl.301.2021.03.14.01.32.28\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSun, 14 Mar 2021 01:32:29 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"D8piznqw\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=u2RMlkxLeQbyS9RPlaIyMgVOAwHo8Y1UNhjR0IC4PGc=;\n\tb=D8piznqwdr8PLSR2e+ntvJ5b3k9BTRqr1pwkh6zsc17fJXkBBcD+xtWMYr9DsCvso3\n\toGgvzG+A3ZzVXa710O1xXtWi/7zGfdg3fiNxPwb7NZ9NqL2upvabhk9zELNAKcGiMh4d\n\tCbHzSub1yNfCiuUmsvVbXhXrWVWSfZtNemsBX9vaBkf74xyqb6LDpZDfdhslB4MC5h9U\n\t99pahAqRgKhmCM5mksRMdKX8+TNLQE5YWrMmcy0QXXhwWqqaxVnh+6nKqXWi9jsBzkmW\n\ta3UdX3Xajj95wwBO+bjwEIqCBPChT2YHKqHrZGXin/EiQzksqFW9u0z4T5kmlq49DK4Y\n\t7acA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=u2RMlkxLeQbyS9RPlaIyMgVOAwHo8Y1UNhjR0IC4PGc=;\n\tb=fyOFks0vpaoOUQX30QXGmLHruBNXWm1s+T1Wtj8N6et8MIvJ9/VYkR5KtGkda/OW3O\n\thklk8xO3a+r4OH+0FCwBzzech1TaaIEXr/j7lnkdburaWc7CtTozbuE+bjuJDTNMSYRA\n\tfSLQo48W70ApQeA1Jv0x4oX4MvDVhngqJqa8BVnKarHpr78xTQczE5glIt/RtzVwevCl\n\tsLS5YkMt9abE/VY4uitZzYvI5x+EbI5J4CgqHBEN6MJGOTA6XayU5w2WZ1xKa3U/vvtX\n\t2jLweEYDwQbxZ8EnicVUDP1lnm508hCRo8ng0SrR+XTDuKQBeb4DqUR6oQZ36SHeR/0b\n\t33+g==","X-Gm-Message-State":"AOAM530unJ/1QA4S/BrPKr1jd7c6I2OekkoPuLjkK2wsnqnYr9sFg6qi\n\t+q1F5LTPwq4ny4V433XNt6HbjuOfrbHR1Q==","X-Google-Smtp-Source":"ABdhPJyiu4jyQY8851/8nJx65pL8oK5RAEhHkCR0YQuYtqI+8rDvINmNvw9UT+Yl5jZHFtCB4fydlg==","X-Received":"by 2002:ac2:5ded:: with SMTP id\n\tz13mr4859141lfq.367.1615714349553; \n\tSun, 14 Mar 2021 01:32:29 -0800 (PST)","Date":"Sun, 14 Mar 2021 10:32:28 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<YE3YLJfPOVjwYsek@oden.dyn.berto.se>","References":"<20210312061131.854849-1-kieran.bingham@ideasonboard.com>\n\t<20210312061131.854849-5-kieran.bingham@ideasonboard.com>\n\t<YEv5zWHoUUALhdxK@oden.dyn.berto.se>\n\t<YE1shf2IHvW8rm98@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<YE1shf2IHvW8rm98@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 4/8] libcamera: pipeline: ipu3:\n\tframes: Use the request sequence","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=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15676,"web_url":"https://patchwork.libcamera.org/comment/15676/","msgid":"<YE4iqWit3K9wvQ9A@pendragon.ideasonboard.com>","date":"2021-03-14T14:50:17","subject":"Re: [libcamera-devel] [PATCH 4/8] libcamera: pipeline: ipu3:\n\tframes: Use the request sequence","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nOn Sun, Mar 14, 2021 at 10:32:28AM +0100, Niklas Söderlund wrote:\n> On 2021-03-14 03:53:09 +0200, Laurent Pinchart wrote:\n> > On Sat, Mar 13, 2021 at 12:31:25AM +0100, Niklas Söderlund wrote:\n> > > On 2021-03-12 06:11:27 +0000, Kieran Bingham wrote:\n> > > > For all frame indexes, use the same sequence number as generated\n> > > > by the Request object.\n> > > > \n> > > > This allows clear matching of what operations occured to which request.\n> > > \n> > > nit-pick: This will not be true if we need to queue buffers internally \n> > > (without a request) to feed the 3A right? I think this change may be a \n> > > step in the right direction just wanted to bring up why an internal id \n> > > was used.\n> > \n> > Wouldn't we still have a request, even if it has only a raw buffer ?\n> \n> Not if it's on the pipelines behalf we run buffers to meet 3A \n> requirements. In such cases the application would not be involved at all \n> and using Requests infernally would then be confusing as the seq numbers \n> domain available to applications would then have holes in it.\n\nThat would only happen if applications stop queuing requests completely.\nThat's considered, at least for now, as an invalid use of the API, the\nrequest queue must be fed at all times for proper operation. What use\ncase do you envision for this ?\n\n> > > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > \n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > \n> > > > ---\n> > > >  src/libcamera/pipeline/ipu3/frames.cpp | 4 +---\n> > > >  src/libcamera/pipeline/ipu3/frames.h   | 1 -\n> > > >  2 files changed, 1 insertion(+), 4 deletions(-)\n> > > > \n> > > > diff --git a/src/libcamera/pipeline/ipu3/frames.cpp b/src/libcamera/pipeline/ipu3/frames.cpp\n> > > > index 151ebfe7ca5f..4198e2019f3f 100644\n> > > > --- a/src/libcamera/pipeline/ipu3/frames.cpp\n> > > > +++ b/src/libcamera/pipeline/ipu3/frames.cpp\n> > > > @@ -18,7 +18,6 @@ namespace libcamera {\n> > > >  LOG_DECLARE_CATEGORY(IPU3)\n> > > >  \n> > > >  IPU3Frames::IPU3Frames()\n> > > > -\t: nextId_(0)\n> > > >  {\n> > > >  }\n> > > >  \n> > > > @@ -31,7 +30,6 @@ void IPU3Frames::init(const std::vector<std::unique_ptr<FrameBuffer>> &paramBuff\n> > > >  \tfor (const std::unique_ptr<FrameBuffer> &buffer : statBuffers)\n> > > >  \t\tavailableStatBuffers_.push(buffer.get());\n> > > >  \n> > > > -\tnextId_ = 0;\n> > > >  \tframeInfo_.clear();\n> > > >  }\n> > > >  \n> > > > @@ -43,7 +41,7 @@ void IPU3Frames::clear()\n> > > >  \n> > > >  IPU3Frames::Info *IPU3Frames::create(Request *request)\n> > > >  {\n> > > > -\tunsigned int id = nextId_++;\n> > > > +\tunsigned int id = request->sequence();\n> > > >  \n> > > >  \tif (availableParamBuffers_.empty()) {\n> > > >  \t\tLOG(IPU3, Error) << \"Parameters buffer underrun\";\n> > > > diff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h\n> > > > index 106e5c15cc7a..4acdf48eca9d 100644\n> > > > --- a/src/libcamera/pipeline/ipu3/frames.h\n> > > > +++ b/src/libcamera/pipeline/ipu3/frames.h\n> > > > @@ -53,7 +53,6 @@ private:\n> > > >  \tstd::queue<FrameBuffer *> availableParamBuffers_;\n> > > >  \tstd::queue<FrameBuffer *> availableStatBuffers_;\n> > > >  \n> > > > -\tunsigned int nextId_;\n> > > >  \tstd::map<unsigned int, std::unique_ptr<Info>> frameInfo_;\n> > > >  };\n> > > >","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 2F9B7BD80E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 14 Mar 2021 14:50:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 55E0160850;\n\tSun, 14 Mar 2021 15:50:56 +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 48C13602E3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 14 Mar 2021 15:50:55 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3E78D55C;\n\tSun, 14 Mar 2021 15:50:54 +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=\"ada5fwuu\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1615733454;\n\tbh=jBfu4/vVNBWvaapJ45mUVziZCykmaJx20rxh3cU/+sc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ada5fwuu5Yude+mskn0QoYfuJciH8E+DoMGsXy7OFQbNiOPaLWW5+vwH97co+p04+\n\tRn32jaLLX1JnwKjvfCS6oHdkg/YT3at8jPGFCWudr3WT/PziYcPpRRSkOSjDONYGUq\n\tMAl/08BYhsE4pxkWQjJaghiFqfQoYbFjXBSNdZZ4=","Date":"Sun, 14 Mar 2021 16:50:17 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<YE4iqWit3K9wvQ9A@pendragon.ideasonboard.com>","References":"<20210312061131.854849-1-kieran.bingham@ideasonboard.com>\n\t<20210312061131.854849-5-kieran.bingham@ideasonboard.com>\n\t<YEv5zWHoUUALhdxK@oden.dyn.berto.se>\n\t<YE1shf2IHvW8rm98@pendragon.ideasonboard.com>\n\t<YE3YLJfPOVjwYsek@oden.dyn.berto.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<YE3YLJfPOVjwYsek@oden.dyn.berto.se>","Subject":"Re: [libcamera-devel] [PATCH 4/8] libcamera: pipeline: ipu3:\n\tframes: Use the request sequence","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=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15691,"web_url":"https://patchwork.libcamera.org/comment/15691/","msgid":"<YE8hyBWIMK2INpoz@oden.dyn.berto.se>","date":"2021-03-15T08:58:48","subject":"Re: [libcamera-devel] [PATCH 4/8] libcamera: pipeline: ipu3:\n\tframes: Use the request sequence","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nOn 2021-03-14 16:50:17 +0200, Laurent Pinchart wrote:\n> Hi Niklas,\n> \n> On Sun, Mar 14, 2021 at 10:32:28AM +0100, Niklas Söderlund wrote:\n> > On 2021-03-14 03:53:09 +0200, Laurent Pinchart wrote:\n> > > On Sat, Mar 13, 2021 at 12:31:25AM +0100, Niklas Söderlund wrote:\n> > > > On 2021-03-12 06:11:27 +0000, Kieran Bingham wrote:\n> > > > > For all frame indexes, use the same sequence number as generated\n> > > > > by the Request object.\n> > > > > \n> > > > > This allows clear matching of what operations occured to which request.\n> > > > \n> > > > nit-pick: This will not be true if we need to queue buffers internally \n> > > > (without a request) to feed the 3A right? I think this change may be a \n> > > > step in the right direction just wanted to bring up why an internal id \n> > > > was used.\n> > > \n> > > Wouldn't we still have a request, even if it has only a raw buffer ?\n> > \n> > Not if it's on the pipelines behalf we run buffers to meet 3A \n> > requirements. In such cases the application would not be involved at all \n> > and using Requests infernally would then be confusing as the seq numbers \n> > domain available to applications would then have holes in it.\n> \n> That would only happen if applications stop queuing requests completely.\n> That's considered, at least for now, as an invalid use of the API, the\n> request queue must be fed at all times for proper operation. What use\n> case do you envision for this ?\n\nYes this only becomes an issue if applications stop queueing requests.  \nWe have in the past talked about this and that it was not unthinkable \nthat pipelines going forward would need to gain the ability to run \nthings internally to satisfy 3A constraints instead of pushing it all to \napplications.\n\nMaybe we have now figured out this is not needed or desired and then my \nconcern is addressed. But if we still think we internally need to queue \nbuffers at some point I think this debug aid change may be confusing \ngoing forward.\n\nIf we don't know what direction we are going to take here I see no \nproblem with merging this patch as it makes things easier now.\n\n> \n> > > > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > > \n> > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > \n> > > > > ---\n> > > > >  src/libcamera/pipeline/ipu3/frames.cpp | 4 +---\n> > > > >  src/libcamera/pipeline/ipu3/frames.h   | 1 -\n> > > > >  2 files changed, 1 insertion(+), 4 deletions(-)\n> > > > > \n> > > > > diff --git a/src/libcamera/pipeline/ipu3/frames.cpp b/src/libcamera/pipeline/ipu3/frames.cpp\n> > > > > index 151ebfe7ca5f..4198e2019f3f 100644\n> > > > > --- a/src/libcamera/pipeline/ipu3/frames.cpp\n> > > > > +++ b/src/libcamera/pipeline/ipu3/frames.cpp\n> > > > > @@ -18,7 +18,6 @@ namespace libcamera {\n> > > > >  LOG_DECLARE_CATEGORY(IPU3)\n> > > > >  \n> > > > >  IPU3Frames::IPU3Frames()\n> > > > > -\t: nextId_(0)\n> > > > >  {\n> > > > >  }\n> > > > >  \n> > > > > @@ -31,7 +30,6 @@ void IPU3Frames::init(const std::vector<std::unique_ptr<FrameBuffer>> &paramBuff\n> > > > >  \tfor (const std::unique_ptr<FrameBuffer> &buffer : statBuffers)\n> > > > >  \t\tavailableStatBuffers_.push(buffer.get());\n> > > > >  \n> > > > > -\tnextId_ = 0;\n> > > > >  \tframeInfo_.clear();\n> > > > >  }\n> > > > >  \n> > > > > @@ -43,7 +41,7 @@ void IPU3Frames::clear()\n> > > > >  \n> > > > >  IPU3Frames::Info *IPU3Frames::create(Request *request)\n> > > > >  {\n> > > > > -\tunsigned int id = nextId_++;\n> > > > > +\tunsigned int id = request->sequence();\n> > > > >  \n> > > > >  \tif (availableParamBuffers_.empty()) {\n> > > > >  \t\tLOG(IPU3, Error) << \"Parameters buffer underrun\";\n> > > > > diff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h\n> > > > > index 106e5c15cc7a..4acdf48eca9d 100644\n> > > > > --- a/src/libcamera/pipeline/ipu3/frames.h\n> > > > > +++ b/src/libcamera/pipeline/ipu3/frames.h\n> > > > > @@ -53,7 +53,6 @@ private:\n> > > > >  \tstd::queue<FrameBuffer *> availableParamBuffers_;\n> > > > >  \tstd::queue<FrameBuffer *> availableStatBuffers_;\n> > > > >  \n> > > > > -\tunsigned int nextId_;\n> > > > >  \tstd::map<unsigned int, std::unique_ptr<Info>> frameInfo_;\n> > > > >  };\n> > > > >  \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 D0A4ABD80E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 15 Mar 2021 08:58:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2E6FF68D42;\n\tMon, 15 Mar 2021 09:58:54 +0100 (CET)","from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com\n\t[IPv6:2a00:1450:4864:20::22c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E4513602ED\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 15 Mar 2021 09:58:50 +0100 (CET)","by mail-lj1-x22c.google.com with SMTP id z25so15244802lja.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 15 Mar 2021 01:58:50 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tq3sm2591299lfp.233.2021.03.15.01.58.49\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 15 Mar 2021 01:58:49 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"PWTe/GfP\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=eLiZE9/e6uCuB1Gb9LTs19Z9Ntd5sYgHIAhR01ci3pk=;\n\tb=PWTe/GfPz7q1SCfVQM10UxwLO9VZOb45su6leBlwryNjv2xtLcnEOIF2W/VSVUd21E\n\tG9GakpSKRl5Y0zgPUDL+2sHkPt1gbMVrBLX6chdMhRmavklY5GDqwn2OsBjcVLFEhbBa\n\tUNhmlJV9j1zQsmbW4VNN5L74YxLaip9PUnszH1xaQfyRXv1u9AvX6G8EV774kWpsYAbY\n\tY10NK7RT/5j2IaDLfEbc7TP5MXBKTOxKs83xuV79alhlZn6qGGbP6/Ik3fFDf/3ftCxV\n\tiNyaxpugTJfnKjSyqq77Bcvq4Mx9pwn1ufUvps8wgeLzqAXlXXzaibhH3+YT8C8DygGr\n\tqDlQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=eLiZE9/e6uCuB1Gb9LTs19Z9Ntd5sYgHIAhR01ci3pk=;\n\tb=m+eSrSE8qGtacZ1QDTHaRmgduJ2trYwday/YhtYMMxosXAojoPrdTdDbCUc40Ob23J\n\tCdp7L7aKtGfAR4u4mVYinneiHkPvmoTToWE3YvvvweThmYesUvHVORBLom5ZUREFZgt2\n\tAOGEjeZC+JWWaLD/sdLLwVWDau7ijihqOdLlK4dQZ0hglEZ+yuk51L4ytcV1+hfnveex\n\tcHTdg1MxPioZHMw3Y6yAUuQyrnXL81CQ3oqqJ6eDYXgkkm+5IwUGj9NlHXMIss9ZTNZN\n\t+INY50XN7a/xfBhfPMSo57J1BXZeqHt9sOGVCCeQSmVOX1t9vaVuXY62kgPb1s9TnK5n\n\tLn0A==","X-Gm-Message-State":"AOAM533CjEdCirWg5uIfiSbWdkjjP11zmB0MJheIMXKObm0Nj6N4Y4YJ\n\tnkWeN6eokAic5HTqdYYCWn8Muw==","X-Google-Smtp-Source":"ABdhPJzZUaTsNvuJVSNenOaijgI2NmsbDzYpanA1LUs7U8VV25ZKGQCWkbgTrKHGNSq21tmYHEqDBw==","X-Received":"by 2002:a2e:b6c6:: with SMTP id m6mr9755413ljo.411.1615798729992;\n\tMon, 15 Mar 2021 01:58:49 -0700 (PDT)","Date":"Mon, 15 Mar 2021 09:58:48 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<YE8hyBWIMK2INpoz@oden.dyn.berto.se>","References":"<20210312061131.854849-1-kieran.bingham@ideasonboard.com>\n\t<20210312061131.854849-5-kieran.bingham@ideasonboard.com>\n\t<YEv5zWHoUUALhdxK@oden.dyn.berto.se>\n\t<YE1shf2IHvW8rm98@pendragon.ideasonboard.com>\n\t<YE3YLJfPOVjwYsek@oden.dyn.berto.se>\n\t<YE4iqWit3K9wvQ9A@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<YE4iqWit3K9wvQ9A@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 4/8] libcamera: pipeline: ipu3:\n\tframes: Use the request sequence","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=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15692,"web_url":"https://patchwork.libcamera.org/comment/15692/","msgid":"<YE8jR5HW8lVMCf6c@pendragon.ideasonboard.com>","date":"2021-03-15T09:05:11","subject":"Re: [libcamera-devel] [PATCH 4/8] libcamera: pipeline: ipu3:\n\tframes: Use the request sequence","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nOn Mon, Mar 15, 2021 at 09:58:48AM +0100, Niklas Söderlund wrote:\n> On 2021-03-14 16:50:17 +0200, Laurent Pinchart wrote:\n> > On Sun, Mar 14, 2021 at 10:32:28AM +0100, Niklas Söderlund wrote:\n> > > On 2021-03-14 03:53:09 +0200, Laurent Pinchart wrote:\n> > > > On Sat, Mar 13, 2021 at 12:31:25AM +0100, Niklas Söderlund wrote:\n> > > > > On 2021-03-12 06:11:27 +0000, Kieran Bingham wrote:\n> > > > > > For all frame indexes, use the same sequence number as generated\n> > > > > > by the Request object.\n> > > > > > \n> > > > > > This allows clear matching of what operations occured to which request.\n> > > > > \n> > > > > nit-pick: This will not be true if we need to queue buffers internally \n> > > > > (without a request) to feed the 3A right? I think this change may be a \n> > > > > step in the right direction just wanted to bring up why an internal id \n> > > > > was used.\n> > > > \n> > > > Wouldn't we still have a request, even if it has only a raw buffer ?\n> > > \n> > > Not if it's on the pipelines behalf we run buffers to meet 3A \n> > > requirements. In such cases the application would not be involved at all \n> > > and using Requests infernally would then be confusing as the seq numbers \n> > > domain available to applications would then have holes in it.\n> > \n> > That would only happen if applications stop queuing requests completely.\n> > That's considered, at least for now, as an invalid use of the API, the\n> > request queue must be fed at all times for proper operation. What use\n> > case do you envision for this ?\n> \n> Yes this only becomes an issue if applications stop queueing requests.  \n> We have in the past talked about this and that it was not unthinkable \n> that pipelines going forward would need to gain the ability to run \n> things internally to satisfy 3A constraints instead of pushing it all to \n> applications.\n> \n> Maybe we have now figured out this is not needed or desired and then my \n> concern is addressed. But if we still think we internally need to queue \n> buffers at some point I think this debug aid change may be confusing \n> going forward.\n> \n> If we don't know what direction we are going to take here I see no \n> problem with merging this patch as it makes things easier now.\n\nThe only use case I can foresee requiring operating the camera\ninternally without requests for every frame would be still image\ncapture (with flash sequence). Even there, it's not clear if that would\nbe needed. Given that it's not a short term development, I wouldn't care\nabout it now in the context of this patch.\n\n> > > > > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > > > \n> > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > > \n> > > > > > ---\n> > > > > >  src/libcamera/pipeline/ipu3/frames.cpp | 4 +---\n> > > > > >  src/libcamera/pipeline/ipu3/frames.h   | 1 -\n> > > > > >  2 files changed, 1 insertion(+), 4 deletions(-)\n> > > > > > \n> > > > > > diff --git a/src/libcamera/pipeline/ipu3/frames.cpp b/src/libcamera/pipeline/ipu3/frames.cpp\n> > > > > > index 151ebfe7ca5f..4198e2019f3f 100644\n> > > > > > --- a/src/libcamera/pipeline/ipu3/frames.cpp\n> > > > > > +++ b/src/libcamera/pipeline/ipu3/frames.cpp\n> > > > > > @@ -18,7 +18,6 @@ namespace libcamera {\n> > > > > >  LOG_DECLARE_CATEGORY(IPU3)\n> > > > > >  \n> > > > > >  IPU3Frames::IPU3Frames()\n> > > > > > -\t: nextId_(0)\n> > > > > >  {\n> > > > > >  }\n> > > > > >  \n> > > > > > @@ -31,7 +30,6 @@ void IPU3Frames::init(const std::vector<std::unique_ptr<FrameBuffer>> &paramBuff\n> > > > > >  \tfor (const std::unique_ptr<FrameBuffer> &buffer : statBuffers)\n> > > > > >  \t\tavailableStatBuffers_.push(buffer.get());\n> > > > > >  \n> > > > > > -\tnextId_ = 0;\n> > > > > >  \tframeInfo_.clear();\n> > > > > >  }\n> > > > > >  \n> > > > > > @@ -43,7 +41,7 @@ void IPU3Frames::clear()\n> > > > > >  \n> > > > > >  IPU3Frames::Info *IPU3Frames::create(Request *request)\n> > > > > >  {\n> > > > > > -\tunsigned int id = nextId_++;\n> > > > > > +\tunsigned int id = request->sequence();\n> > > > > >  \n> > > > > >  \tif (availableParamBuffers_.empty()) {\n> > > > > >  \t\tLOG(IPU3, Error) << \"Parameters buffer underrun\";\n> > > > > > diff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h\n> > > > > > index 106e5c15cc7a..4acdf48eca9d 100644\n> > > > > > --- a/src/libcamera/pipeline/ipu3/frames.h\n> > > > > > +++ b/src/libcamera/pipeline/ipu3/frames.h\n> > > > > > @@ -53,7 +53,6 @@ private:\n> > > > > >  \tstd::queue<FrameBuffer *> availableParamBuffers_;\n> > > > > >  \tstd::queue<FrameBuffer *> availableStatBuffers_;\n> > > > > >  \n> > > > > > -\tunsigned int nextId_;\n> > > > > >  \tstd::map<unsigned int, std::unique_ptr<Info>> frameInfo_;\n> > > > > >  };\n> > > > > >","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 05397BD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 15 Mar 2021 09:05:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6EB6768D3E;\n\tMon, 15 Mar 2021 10:05:50 +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 AC01D602ED\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 15 Mar 2021 10:05:48 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 66F89556;\n\tMon, 15 Mar 2021 10:05:47 +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=\"dgfiFvok\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1615799147;\n\tbh=E7gDuPp3ZHMGXJe0RPz6My4xK+3CxNxSb7pNfriwadg=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=dgfiFvok/YCDFj3o8OewzpRWujkutHnVEgUoZingv3fA3yKZeiMYT1jejFrF+1Icw\n\tEP32ePAd4jGWf+sKaOFQPoOJwPcZ3ksZpkPMeFNBp9f3YqXVIp4NV0xa1+uFgLLj1p\n\tUJhWCUg1ZDPUeOX4cZK399WIp5eO4J4m8S1PTq0Q=","Date":"Mon, 15 Mar 2021 11:05:11 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<YE8jR5HW8lVMCf6c@pendragon.ideasonboard.com>","References":"<20210312061131.854849-1-kieran.bingham@ideasonboard.com>\n\t<20210312061131.854849-5-kieran.bingham@ideasonboard.com>\n\t<YEv5zWHoUUALhdxK@oden.dyn.berto.se>\n\t<YE1shf2IHvW8rm98@pendragon.ideasonboard.com>\n\t<YE3YLJfPOVjwYsek@oden.dyn.berto.se>\n\t<YE4iqWit3K9wvQ9A@pendragon.ideasonboard.com>\n\t<YE8hyBWIMK2INpoz@oden.dyn.berto.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<YE8hyBWIMK2INpoz@oden.dyn.berto.se>","Subject":"Re: [libcamera-devel] [PATCH 4/8] libcamera: pipeline: ipu3:\n\tframes: Use the request sequence","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=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]