[{"id":34306,"web_url":"https://patchwork.libcamera.org/comment/34306/","msgid":"<20250521161845.GG12421@pendragon.ideasonboard.com>","date":"2025-05-21T16:18:45","subject":"Re: [PATCH 2/2] libcamera/mali-c55: Remove tpgSizes_ member from\n\tMaliC55CameraData","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Dan,\n\nThank you for the patch.\n\nThe commit message should start with \"libcamera: mali-c55:\". Same for\npatch 1/2. I would actually have squashed the two patches together, but\nthat's up to you.\n\nOn Wed, May 21, 2025 at 02:21:02PM +0100, Daniel Scally wrote:\n> The tpgSizes_ vector is only used within the initTPGData() function.\n> Drop it and use a local variable instead.\n> \n> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>\n> ---\n>  src/libcamera/pipeline/mali-c55/mali-c55.cpp | 7 ++++---\n>  1 file changed, 4 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n> index 35372ee1ed6f694166c395088c65509d32b9d1f2..e8c03ee9aafb44d47e3853e9987f8749dc385bb2 100644\n> --- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n> +++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n> @@ -131,7 +131,6 @@ private:\n>  \tvoid setSensorControls(const ControlList &sensorControls);\n>  \n>  \tstd::string id_;\n> -\tstd::vector<Size> tpgSizes_;\n>  \tSize tpgResolution_;\n>  };\n>  \n> @@ -174,6 +173,8 @@ int MaliC55CameraData::init()\n>  \n>  void MaliC55CameraData::initTPGData()\n>  {\n> +\tstd::vector<Size> tpgSizes;\n> +\n\nMove this...\n\n>  \t/* Replicate the CameraSensor implementation for TPG. */\n>  \tV4L2Subdevice::Formats formats = sd_->formats(0);\n>  \tif (formats.empty())\n> @@ -181,11 +182,11 @@ void MaliC55CameraData::initTPGData()\n>  \n\n... here.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>  \tfor (const auto &format : formats) {\n>  \t\tconst std::vector<SizeRange> &ranges = format.second;\n> -\t\tstd::transform(ranges.begin(), ranges.end(), std::back_inserter(tpgSizes_),\n> +\t\tstd::transform(ranges.begin(), ranges.end(), std::back_inserter(tpgSizes),\n>  \t\t\t       [](const SizeRange &range) { return range.max; });\n>  \t}\n>  \n> -\ttpgResolution_ = tpgSizes_.back();\n> +\ttpgResolution_ = tpgSizes.back();\n>  }\n>  \n>  void MaliC55CameraData::setSensorControls(const ControlList &sensorControls)","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 AD894BD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 21 May 2025 16:18:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D2FA868D85;\n\tWed, 21 May 2025 18:18:52 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 16A6B68C91\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 May 2025 18:18:51 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(179.218-130-109.adsl-dyn.isp.belgacom.be [109.130.218.179])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 85E256B5;\n\tWed, 21 May 2025 18:18:29 +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=\"umHxegKe\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1747844309;\n\tbh=LNPiXfNscCNLZ+ZaddcgbQYQbiV1XSWSubj4HnAg08o=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=umHxegKeqVc/+rHr1jnyDyFMUHuy8EGVmdN8i5gnU+jMzF6jJf9bbUmO1TMnr+1gz\n\tTLD36kRwauyccPkRWnHMzo9YGNc+h1lg+cbDvVgglUb/4yEu4T7iaCV27QddtGG4U5\n\tzpt4D1FYnsgPvBHC5y7n5Ddc7a+VOsyqZ0ibGPp0=","Date":"Wed, 21 May 2025 18:18:45 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Daniel Scally <dan.scally@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 2/2] libcamera/mali-c55: Remove tpgSizes_ member from\n\tMaliC55CameraData","Message-ID":"<20250521161845.GG12421@pendragon.ideasonboard.com>","References":"<20250521-djrscally-c55-cleanup-v1-0-aa171b2aed38@ideasonboard.com>\n\t<20250521-djrscally-c55-cleanup-v1-2-aa171b2aed38@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20250521-djrscally-c55-cleanup-v1-2-aa171b2aed38@ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34308,"web_url":"https://patchwork.libcamera.org/comment/34308/","msgid":"<174784474921.2114591.2736151307539010969@ping.linuxembedded.co.uk>","date":"2025-05-21T16:25:49","subject":"Re: [PATCH 2/2] libcamera/mali-c55: Remove tpgSizes_ member from\n\tMaliC55CameraData","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2025-05-21 17:18:45)\n> Hi Dan,\n> \n> Thank you for the patch.\n> \n> The commit message should start with \"libcamera: mali-c55:\". Same for\n> patch 1/2. I would actually have squashed the two patches together, but\n> that's up to you.\n> \n> On Wed, May 21, 2025 at 02:21:02PM +0100, Daniel Scally wrote:\n> > The tpgSizes_ vector is only used within the initTPGData() function.\n> > Drop it and use a local variable instead.\n> > \n> > Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>\n> > ---\n> >  src/libcamera/pipeline/mali-c55/mali-c55.cpp | 7 ++++---\n> >  1 file changed, 4 insertions(+), 3 deletions(-)\n> > \n> > diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n> > index 35372ee1ed6f694166c395088c65509d32b9d1f2..e8c03ee9aafb44d47e3853e9987f8749dc385bb2 100644\n> > --- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n> > +++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n> > @@ -131,7 +131,6 @@ private:\n> >       void setSensorControls(const ControlList &sensorControls);\n> >  \n> >       std::string id_;\n> > -     std::vector<Size> tpgSizes_;\n> >       Size tpgResolution_;\n> >  };\n> >  \n> > @@ -174,6 +173,8 @@ int MaliC55CameraData::init()\n> >  \n> >  void MaliC55CameraData::initTPGData()\n> >  {\n> > +     std::vector<Size> tpgSizes;\n> > +\n> \n> Move this...\n> \n> >       /* Replicate the CameraSensor implementation for TPG. */\n> >       V4L2Subdevice::Formats formats = sd_->formats(0);\n> >       if (formats.empty())\n> > @@ -181,11 +182,11 @@ void MaliC55CameraData::initTPGData()\n> >  \n> \n> ... here.\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nOr squashed - either way.\n\n\n> \n> >       for (const auto &format : formats) {\n> >               const std::vector<SizeRange> &ranges = format.second;\n> > -             std::transform(ranges.begin(), ranges.end(), std::back_inserter(tpgSizes_),\n> > +             std::transform(ranges.begin(), ranges.end(), std::back_inserter(tpgSizes),\n> >                              [](const SizeRange &range) { return range.max; });\n> >       }\n> >  \n> > -     tpgResolution_ = tpgSizes_.back();\n> > +     tpgResolution_ = tpgSizes.back();\n> >  }\n> >  \n> >  void MaliC55CameraData::setSensorControls(const ControlList &sensorControls)\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 12743C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 21 May 2025 16:25:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BCB8F68D93;\n\tWed, 21 May 2025 18:25:52 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2F32368C91\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 May 2025 18:25:52 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C39256B5;\n\tWed, 21 May 2025 18:25:30 +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=\"nVpdrC8b\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1747844730;\n\tbh=SHlbhUXu2jEyhFMh4Xda2Z61P8vemr0wx5zgOWqi6Xw=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=nVpdrC8bNwa95qngttWouhjpafEpV5MhzL/ybcLfs1F3SIysBOG2j48IIUfh2XcIr\n\tussXFSLPbNzlooc1L7hV/3QkJbLmU4l8GRYpV9CfNmw2rI5Zgtf05h9xIfgeL/ULs5\n\ttNNeqlbIlOkwTrm6MKhouNJfpphMYh6KPrwXcygc=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250521161845.GG12421@pendragon.ideasonboard.com>","References":"<20250521-djrscally-c55-cleanup-v1-0-aa171b2aed38@ideasonboard.com>\n\t<20250521-djrscally-c55-cleanup-v1-2-aa171b2aed38@ideasonboard.com>\n\t<20250521161845.GG12421@pendragon.ideasonboard.com>","Subject":"Re: [PATCH 2/2] libcamera/mali-c55: Remove tpgSizes_ member from\n\tMaliC55CameraData","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","To":"Daniel Scally <dan.scally@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Date":"Wed, 21 May 2025 17:25:49 +0100","Message-ID":"<174784474921.2114591.2736151307539010969@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]