[{"id":20033,"web_url":"https://patchwork.libcamera.org/comment/20033/","msgid":"<YVsNGgzZQgzLaPPs@pendragon.ideasonboard.com>","date":"2021-10-04T14:18:02","subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Create empty\n\tcontrol list correctly","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi David,\n\nThank you for the patch.\n\nOn Mon, Oct 04, 2021 at 02:52:07PM +0100, David Plowman wrote:\n> When the start() method is supplied with a NULL list of controls, we\n> send an empty control list to the IPA. When the IPA is running in\n> isolated mode the control list goes through the data serializer, for\n> which it must be marked correctly as a list of \"controls::controls\",\n> otherwise the IPA process will abort.\n> \n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> ---\n>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 0bdfa727..87836996 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -825,7 +825,8 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)\n>  \n>  \t/* Start the IPA. */\n>  \tipa::RPi::StartConfig startConfig;\n> -\tdata->ipa_->start(controls ? *controls : ControlList{}, &startConfig);\n> +\tControlList emptyControls(controls::controls);\n> +\tdata->ipa_->start(controls ? *controls : emptyControls, &startConfig);\n\nWouldn't it be better to change the IPA start() method to take a\nControlList pointer, and pass nullptr when no controls are provided ?\n\n>  \n>  \t/* Apply any gain/exposure settings that the IPA may have passed back. */\n>  \tif (!startConfig.controls.empty())","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 7C627C3243\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  4 Oct 2021 14:18:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C1221691B6;\n\tMon,  4 Oct 2021 16:18:10 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 354876023F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  4 Oct 2021 16:18:09 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9A8A371;\n\tMon,  4 Oct 2021 16:18:08 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"fyGnkusy\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1633357088;\n\tbh=WyH1WX5IraeLrHXPjfJrEa3Gtj+eii0NJlRhBYOMAPo=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=fyGnkusyEO1M7E53mVuTRb4ICuU+fqIx3knQMuwKASM19Q9Y82lMMO3F2nPGgjKLK\n\tWUH1i8xRHmPi75x1tiSEUKCTTKHL3wkYp49q8qxCMioYO0I3Y518O58yGbjjg3Xm97\n\tq11VdQhsVNxFV4glxkzEDahhmgBDYxxNKmp69AS4=","Date":"Mon, 4 Oct 2021 17:18:02 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<YVsNGgzZQgzLaPPs@pendragon.ideasonboard.com>","References":"<20211004135207.2936-1-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20211004135207.2936-1-david.plowman@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Create empty\n\tcontrol list correctly","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":20034,"web_url":"https://patchwork.libcamera.org/comment/20034/","msgid":"<CAHW6GYLUb5JNGhCtB56p-kRe2A_Dbx27eXKcpdqZyRy19+=Ovg@mail.gmail.com>","date":"2021-10-04T14:46:30","subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Create empty\n\tcontrol list correctly","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Laurent\n\nThanks for the feedback.\n\nOn Mon, 4 Oct 2021 at 15:18, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hi David,\n>\n> Thank you for the patch.\n>\n> On Mon, Oct 04, 2021 at 02:52:07PM +0100, David Plowman wrote:\n> > When the start() method is supplied with a NULL list of controls, we\n> > send an empty control list to the IPA. When the IPA is running in\n> > isolated mode the control list goes through the data serializer, for\n> > which it must be marked correctly as a list of \"controls::controls\",\n> > otherwise the IPA process will abort.\n> >\n> > Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> > ---\n> >  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ++-\n> >  1 file changed, 2 insertions(+), 1 deletion(-)\n> >\n> > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > index 0bdfa727..87836996 100644\n> > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > @@ -825,7 +825,8 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)\n> >\n> >       /* Start the IPA. */\n> >       ipa::RPi::StartConfig startConfig;\n> > -     data->ipa_->start(controls ? *controls : ControlList{}, &startConfig);\n> > +     ControlList emptyControls(controls::controls);\n> > +     data->ipa_->start(controls ? *controls : emptyControls, &startConfig);\n>\n> Wouldn't it be better to change the IPA start() method to take a\n> ControlList pointer, and pass nullptr when no controls are provided ?\n\nBut I'm thinking that, because we're going across the IPC mechanism,\nsomeone has to turn the pointer into a real (but possibly empty)\nControlList at some point, so if it doesn't happen here then it\nhappens later. Or have I misunderstood?\n\nDavid\n\n(PS. I've found another problem where the IPA tries to send a\nControlList back and this fails too in isolation mode. So I sent this\npatch a bit too soon and there's a v2 incoming in any case. But\npassing ControlLists across the IPC interface is more of a minefield\nthan I realised!)\n\n>\n> >\n> >       /* Apply any gain/exposure settings that the IPA may have passed back. */\n> >       if (!startConfig.controls.empty())\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 E569BBDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  4 Oct 2021 14:46:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 65C1B691B6;\n\tMon,  4 Oct 2021 16:46:43 +0200 (CEST)","from mail-wr1-x432.google.com (mail-wr1-x432.google.com\n\t[IPv6:2a00:1450:4864:20::432])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8884E6023F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  4 Oct 2021 16:46:41 +0200 (CEST)","by mail-wr1-x432.google.com with SMTP id m22so25815847wrb.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 04 Oct 2021 07:46:41 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"U8MUPp0n\"; 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=Fz1PK1wILczLNZnRWq02kGkf0Zu1/rh+dDV7IUiW0RI=;\n\tb=U8MUPp0n1qy/yPFOTa62IwGeYRcKXdtZTdkv/L434X7zvxcoKIsfGvc+Y7emuntc3G\n\tWsKw/lbpBrx18/XQ+X4Ejyni4gw1bRmjlaMltRQDy3ifuiQDgQCxxJqBZtxQJMOFlB7e\n\tB+oOcl3rW7f5fWA0/f2/ILkVDBjR8aX5TH64KM89kOee98JPXvAj/tprDsnFw8isu0eK\n\tYR0KEAx7WtkBIMugKxiWRr0j/Hdfz5cXTj0YrNlnzFst26Pvg8F+2/MUIvjOtwRzzImx\n\tSGUdReL0kubTGDUzAx6FRAbZHts1o/3Eib7pxmuOepH4HmEfW9EM/J0y3Z3/ZpsPMTlN\n\t29gg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=Fz1PK1wILczLNZnRWq02kGkf0Zu1/rh+dDV7IUiW0RI=;\n\tb=zVczXL68ChZZ7oA6aRFvxGMOBrKpFjwV4TlOTKgZE6d4kjba/Tr3pUdT0X5C3641QC\n\tpnkUyp/STInXnsq0xyNnuzpQyeCUpenUDZ1+fgfoI3ZiONWeUYmtz24DuLHBuVcujC/M\n\tV87CiaUPFjOoFIdSePQafWmoSk2b6Ce2PCxmkRbTojUo+V/SLt9ymjFMPUivQRuZ8h7t\n\tWQcVsGEcNqHjOKWCm2BuMvH+x8ouWF907V0woWv3pfz3L7T3d6Tz1MFNn3Gwi7zldjV2\n\tl6sNVCgdWo9a0CCBP5dH7SPHtlxb6SYSuPl4KkeGdrI7GfPOgnye3mi9rFTET2uxMwKT\n\tlQZQ==","X-Gm-Message-State":"AOAM530Xj8UFT2FSEXvf6IVZZ1n5yuvgkuW92BbpA9/7eG5gc1ClfiSD\n\totLpoS7pPQVZgdDLIfoilKwUwK9WMaT7vU+zurLQNXSSEIQjUQ==","X-Google-Smtp-Source":"ABdhPJwL3zlC9LmHyzeAEVeG6O2s7cf5EIyzf3w0KnkcTnLleLIWDSvJWaaNbAgLtFQaETOEu2lQgIap/iR8tKQ9lgM=","X-Received":"by 2002:adf:fb0a:: with SMTP id\n\tc10mr15421438wrr.354.1633358801092; \n\tMon, 04 Oct 2021 07:46:41 -0700 (PDT)","MIME-Version":"1.0","References":"<20211004135207.2936-1-david.plowman@raspberrypi.com>\n\t<YVsNGgzZQgzLaPPs@pendragon.ideasonboard.com>","In-Reply-To":"<YVsNGgzZQgzLaPPs@pendragon.ideasonboard.com>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Mon, 4 Oct 2021 15:46:30 +0100","Message-ID":"<CAHW6GYLUb5JNGhCtB56p-kRe2A_Dbx27eXKcpdqZyRy19+=Ovg@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Create empty\n\tcontrol list correctly","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":20036,"web_url":"https://patchwork.libcamera.org/comment/20036/","msgid":"<YVtzWzyHaaCTmO7e@pendragon.ideasonboard.com>","date":"2021-10-04T21:34:19","subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Create empty\n\tcontrol list correctly","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi David,\n\nOn Mon, Oct 04, 2021 at 03:46:30PM +0100, David Plowman wrote:\n> On Mon, 4 Oct 2021 at 15:18, Laurent Pinchart wrote:\n> > On Mon, Oct 04, 2021 at 02:52:07PM +0100, David Plowman wrote:\n> > > When the start() method is supplied with a NULL list of controls, we\n> > > send an empty control list to the IPA. When the IPA is running in\n> > > isolated mode the control list goes through the data serializer, for\n> > > which it must be marked correctly as a list of \"controls::controls\",\n> > > otherwise the IPA process will abort.\n> > >\n> > > Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> > > ---\n> > >  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ++-\n> > >  1 file changed, 2 insertions(+), 1 deletion(-)\n> > >\n> > > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > index 0bdfa727..87836996 100644\n> > > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > @@ -825,7 +825,8 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)\n> > >\n> > >       /* Start the IPA. */\n> > >       ipa::RPi::StartConfig startConfig;\n> > > -     data->ipa_->start(controls ? *controls : ControlList{}, &startConfig);\n> > > +     ControlList emptyControls(controls::controls);\n> > > +     data->ipa_->start(controls ? *controls : emptyControls, &startConfig);\n> >\n> > Wouldn't it be better to change the IPA start() method to take a\n> > ControlList pointer, and pass nullptr when no controls are provided ?\n> \n> But I'm thinking that, because we're going across the IPC mechanism,\n> someone has to turn the pointer into a real (but possibly empty)\n> ControlList at some point, so if it doesn't happen here then it\n> happens later. Or have I misunderstood?\n\nNo, you're right, it's my mistake, I thought we supported nullable\narguments already for IPC but that's not the case yet (unless I've\nmissed something, Paul can correct me here).\n\nBy the way, the above could be written\n\n\tdata->ipa_->start(controls ? *controls : ControlList{ controls::controls },\n\t\t\t  &startConfig);\n\nUp to you. With or without that change,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> (PS. I've found another problem where the IPA tries to send a\n> ControlList back and this fails too in isolation mode. So I sent this\n> patch a bit too soon and there's a v2 incoming in any case. But\n> passing ControlLists across the IPC interface is more of a minefield\n> than I realised!)\n\nThat's good feedback, thanks. We need to harden the interface.\n\n> > >\n> > >       /* Apply any gain/exposure settings that the IPA may have passed back. */\n> > >       if (!startConfig.controls.empty())","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 D7DFABDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  4 Oct 2021 21:34:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6EEA1691B9;\n\tMon,  4 Oct 2021 23:34:28 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 15E536023F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  4 Oct 2021 23:34:27 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 74F075A1;\n\tMon,  4 Oct 2021 23:34:26 +0200 (CEST)"],"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=\"hLjp9x9u\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1633383266;\n\tbh=vo7hiHbLlNd2v/0USVD1UEazyOIuUf2dn4gVka0lqJc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=hLjp9x9up63jvPmwiBhJUGSTTezpZyXVcXSDNxHqokCSyAITG6zztOTYEFHBjXmK8\n\taykllVh2ZW58fqNf48pYUzyNb2WHTlr+oQb+BdmTYIeiLwsmk8VzvSVqe6ZmxmTtD5\n\tN0A0Gkz8ZWU07+OE27giEupb3KhSofZ9tnbDQZvg=","Date":"Tue, 5 Oct 2021 00:34:19 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<YVtzWzyHaaCTmO7e@pendragon.ideasonboard.com>","References":"<20211004135207.2936-1-david.plowman@raspberrypi.com>\n\t<YVsNGgzZQgzLaPPs@pendragon.ideasonboard.com>\n\t<CAHW6GYLUb5JNGhCtB56p-kRe2A_Dbx27eXKcpdqZyRy19+=Ovg@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAHW6GYLUb5JNGhCtB56p-kRe2A_Dbx27eXKcpdqZyRy19+=Ovg@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Create empty\n\tcontrol list correctly","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":20088,"web_url":"https://patchwork.libcamera.org/comment/20088/","msgid":"<20211006045044.GG4221@pyrite.rasen.tech>","date":"2021-10-06T04:50:44","subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Create empty\n\tcontrol list correctly","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hello,\n\nOn Tue, Oct 05, 2021 at 12:34:19AM +0300, Laurent Pinchart wrote:\n> Hi David,\n> \n> On Mon, Oct 04, 2021 at 03:46:30PM +0100, David Plowman wrote:\n> > On Mon, 4 Oct 2021 at 15:18, Laurent Pinchart wrote:\n> > > On Mon, Oct 04, 2021 at 02:52:07PM +0100, David Plowman wrote:\n> > > > When the start() method is supplied with a NULL list of controls, we\n> > > > send an empty control list to the IPA. When the IPA is running in\n> > > > isolated mode the control list goes through the data serializer, for\n> > > > which it must be marked correctly as a list of \"controls::controls\",\n> > > > otherwise the IPA process will abort.\n> > > >\n> > > > Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> > > > ---\n> > > >  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ++-\n> > > >  1 file changed, 2 insertions(+), 1 deletion(-)\n> > > >\n> > > > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > > index 0bdfa727..87836996 100644\n> > > > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > > @@ -825,7 +825,8 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)\n> > > >\n> > > >       /* Start the IPA. */\n> > > >       ipa::RPi::StartConfig startConfig;\n> > > > -     data->ipa_->start(controls ? *controls : ControlList{}, &startConfig);\n> > > > +     ControlList emptyControls(controls::controls);\n> > > > +     data->ipa_->start(controls ? *controls : emptyControls, &startConfig);\n> > >\n> > > Wouldn't it be better to change the IPA start() method to take a\n> > > ControlList pointer, and pass nullptr when no controls are provided ?\n> > \n> > But I'm thinking that, because we're going across the IPC mechanism,\n> > someone has to turn the pointer into a real (but possibly empty)\n> > ControlList at some point, so if it doesn't happen here then it\n> > happens later. Or have I misunderstood?\n> \n> No, you're right, it's my mistake, I thought we supported nullable\n> arguments already for IPC but that's not the case yet (unless I've\n> missed something, Paul can correct me here).\n\nWe don't. We can't pass in pointers either.\n\n> \n> By the way, the above could be written\n> \n> \tdata->ipa_->start(controls ? *controls : ControlList{ controls::controls },\n> \t\t\t  &startConfig);\n\nYeah that should work.\n\n> \n> Up to you. With or without that change,\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> > (PS. I've found another problem where the IPA tries to send a\n> > ControlList back and this fails too in isolation mode. So I sent this\n> > patch a bit too soon and there's a v2 incoming in any case. But\n> > passing ControlLists across the IPC interface is more of a minefield\n> > than I realised!)\n> \n> That's good feedback, thanks. We need to harden the interface.\n> \n> > > >\n> > > >       /* Apply any gain/exposure settings that the IPA may have passed back. */\n> > > >       if (!startConfig.controls.empty())\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 082D9BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  6 Oct 2021 04:50:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5EA38691BB;\n\tWed,  6 Oct 2021 06:50:54 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 39DC36012B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Oct 2021 06:50:53 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 52AF6581;\n\tWed,  6 Oct 2021 06:50:50 +0200 (CEST)"],"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=\"Zgs0B7GX\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1633495852;\n\tbh=lbRE0poeTe21rIr6vOPT43g1TuBMSziwLjIXMqOgPHQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Zgs0B7GX6K4vlK7C/E1ylIFYSN1bgIRbzVBJ7nB2NysOdFV8mOwYkaq+I0CuVohFv\n\t++zo1zS2y02/ZJqFDQC1kc6U8vY67GMEgnoSmv4/cjq8xJyDFjh8CdmyyQuYXODb7s\n\ttGwtdlDIqyMGJDKFGgHNJOKrGxjYwZi34VFa9eQ8=","Date":"Wed, 6 Oct 2021 13:50:44 +0900","From":"paul.elder@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20211006045044.GG4221@pyrite.rasen.tech>","References":"<20211004135207.2936-1-david.plowman@raspberrypi.com>\n\t<YVsNGgzZQgzLaPPs@pendragon.ideasonboard.com>\n\t<CAHW6GYLUb5JNGhCtB56p-kRe2A_Dbx27eXKcpdqZyRy19+=Ovg@mail.gmail.com>\n\t<YVtzWzyHaaCTmO7e@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<YVtzWzyHaaCTmO7e@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] pipeline: raspberrypi: Create empty\n\tcontrol list correctly","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]