[{"id":18740,"web_url":"https://patchwork.libcamera.org/comment/18740/","msgid":"<YRUtS8XWOfmFa6YS@pendragon.ideasonboard.com>","date":"2021-08-12T14:16:43","subject":"Re: [libcamera-devel] [PATCH] ipa: ipu3: fix headers order","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jean-Michel,\n\nThank you for the patch.\n\nOn Thu, Aug 12, 2021 at 03:57:50PM +0200, Jean-Michel Hautbois wrote:\n> The ipu3 does not follow the current coding style practices for header inclusion.\n> Re-order the headers to match the updated styles.\n\nA library-wide patch may be better to be done with this once and for\nall. However, before that, ...\n\n> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> ---\n>  src/ipa/ipu3/ipu3.cpp | 6 ++++--\n>  1 file changed, 4 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n> index c34fa460..21b9db64 100644\n> --- a/src/ipa/ipu3/ipu3.cpp\n> +++ b/src/ipa/ipu3/ipu3.cpp\n> @@ -22,16 +22,18 @@\n>  \n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/framebuffer.h>\n> +#include <libcamera/request.h>\n> +\n>  #include <libcamera/ipa/ipa_interface.h>\n>  #include <libcamera/ipa/ipa_module_info.h>\n>  #include <libcamera/ipa/ipu3_ipa_interface.h>\n> -#include <libcamera/request.h>\n\nKieran, is the IPA headers separation something we want to carry\nforward, or should we update the clang-format rules ?\n\n>  #include \"libcamera/internal/mapped_framebuffer.h\"\n>  \n> +#include \"libipa/camera_sensor_helper.h\"\n> +\n>  #include \"ipu3_agc.h\"\n>  #include \"ipu3_awb.h\"\n> -#include \"libipa/camera_sensor_helper.h\"\n\nThe split here doesn't bother me much, but we could also do without it\nif desired.\n\n>  static constexpr uint32_t kMaxCellWidthPerSet = 160;\n>  static constexpr uint32_t kMaxCellHeightPerSet = 56;","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 7A669C3240\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 Aug 2021 14:16:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0A42860265;\n\tThu, 12 Aug 2021 16:16:49 +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 6E27E60264\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Aug 2021 16:16:47 +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 D249AEE;\n\tThu, 12 Aug 2021 16:16:46 +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=\"nMjWzMlT\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1628777807;\n\tbh=sw/ddiHX8Ojsh58Mwmvl+W+ocSUVfvVUy8VOZASyXDA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=nMjWzMlTWX6vVPs328eMgtRlFLvSLg/HqknsnGzSuo+XMHmoUvUHmJt933tvGgPzA\n\tpnl1bR6ZkB8GIV0hrl98jmxjgoH0Y7fzjspqgKxH3HYV1cesBnoEFaFM9A1hldWRfM\n\tzJFXGBVl8jMMqI89sQGzSItOO5/Cj1H/jL/5//6M=","Date":"Thu, 12 Aug 2021 17:16:43 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Message-ID":"<YRUtS8XWOfmFa6YS@pendragon.ideasonboard.com>","References":"<20210812135750.165416-1-jeanmichel.hautbois@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210812135750.165416-1-jeanmichel.hautbois@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] ipa: ipu3: fix headers order","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":18741,"web_url":"https://patchwork.libcamera.org/comment/18741/","msgid":"<b1a8dd7d-cad0-ad27-1947-0ac6bb606eb9@ideasonboard.com>","date":"2021-08-12T14:50:12","subject":"Re: [libcamera-devel] [PATCH] ipa: ipu3: fix headers order","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 12/08/2021 15:16, Laurent Pinchart wrote:\n> Hi Jean-Michel,\n> \n> Thank you for the patch.\n> \n> On Thu, Aug 12, 2021 at 03:57:50PM +0200, Jean-Michel Hautbois wrote:\n>> The ipu3 does not follow the current coding style practices for header inclusion.\n>> Re-order the headers to match the updated styles.\n> \n> A library-wide patch may be better to be done with this once and for\n> all. However, before that, ...\n\nI sort of disagree, these can be handled as they arise. This patch is\nsplit from the upcoming series which likely highlighted this, so it's\njust a cleanup along the way.\n\nHeader sort orders are not ... critical, or bug fixes (for the most\npart). It's just style, and the tool is updated to make it consistent as\nwe go.\n\n\n>> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n>> ---\n>>  src/ipa/ipu3/ipu3.cpp | 6 ++++--\n>>  1 file changed, 4 insertions(+), 2 deletions(-)\n>>\n>> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n>> index c34fa460..21b9db64 100644\n>> --- a/src/ipa/ipu3/ipu3.cpp\n>> +++ b/src/ipa/ipu3/ipu3.cpp\n>> @@ -22,16 +22,18 @@\n>>  \n>>  #include <libcamera/control_ids.h>\n>>  #include <libcamera/framebuffer.h>\n>> +#include <libcamera/request.h>\n>> +\n>>  #include <libcamera/ipa/ipa_interface.h>\n>>  #include <libcamera/ipa/ipa_module_info.h>\n>>  #include <libcamera/ipa/ipu3_ipa_interface.h>\n>> -#include <libcamera/request.h>\n> \n> Kieran, is the IPA headers separation something we want to carry\n> forward, or should we update the clang-format rules ?\n\nI think this is much better.\n\nThe IPA interface is a part of libcamera, but is separate from the\npublic API.\n\nTo me ... sorting folders in alphabetically among files is ... wrong.\n\nWe already have base and internal as distinct groups.\nMerging libcamera/ipa/* in libcamera/* would be an inconsistency if we\ndidn't give it a group of it's own.\n\n\n>>  #include \"libcamera/internal/mapped_framebuffer.h\"\n>>  \n>> +#include \"libipa/camera_sensor_helper.h\"\n>> +\n>>  #include \"ipu3_agc.h\"\n>>  #include \"ipu3_awb.h\"\n>> -#include \"libipa/camera_sensor_helper.h\"\n> \n> The split here doesn't bother me much, but we could also do without it\n> if desired.\n\nSame here, libipa is an internal helper library. It should be included\nbefore any local includes.\n\n#include \"ipu3_agc.h\"\n#include \"ipu3_awb.h\"\n#include \"libipa/camera_sensor_helper.h\"\n#include \"helpers.h\"\n#include \"xylophones.h\"\n\nwould be wrong to me ...\n\n\n\n>>  static constexpr uint32_t kMaxCellWidthPerSet = 160;\n>>  static constexpr uint32_t kMaxCellHeightPerSet = 56;\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 5C729C3240\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 Aug 2021 14:50:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C25EC6884F;\n\tThu, 12 Aug 2021 16:50:16 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3E4A860264\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Aug 2021 16:50:16 +0200 (CEST)","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 4CA57EE;\n\tThu, 12 Aug 2021 16:50:15 +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=\"UtL3ojA1\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1628779815;\n\tbh=s9VVfWjfG4vj47MtcEcCPwEibeWBb1jhXsBPaRu+eig=;\n\th=From:To:Cc:References:Subject:Date:In-Reply-To:From;\n\tb=UtL3ojA1wzEFVfV6i4L5G4eE7h+BpRwEUCZDkDDWMrNG2l5PUp7+IHEslY5oiOeoN\n\tg2eKqvhZVp62p7Nphjf3Ob0H8dg3wHkgLZP84l15WluXAEAFBk5KC/EITsoO3+iyMP\n\t96fm82VTeEu4o44OUEILlxNYys5cBNQtdOF2Icks=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tJean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","References":"<20210812135750.165416-1-jeanmichel.hautbois@ideasonboard.com>\n\t<YRUtS8XWOfmFa6YS@pendragon.ideasonboard.com>","Message-ID":"<b1a8dd7d-cad0-ad27-1947-0ac6bb606eb9@ideasonboard.com>","Date":"Thu, 12 Aug 2021 15:50:12 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.11.0","MIME-Version":"1.0","In-Reply-To":"<YRUtS8XWOfmFa6YS@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH] ipa: ipu3: fix headers order","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":18742,"web_url":"https://patchwork.libcamera.org/comment/18742/","msgid":"<YRU2xYnV7X9+j7rk@pendragon.ideasonboard.com>","date":"2021-08-12T14:57:09","subject":"Re: [libcamera-devel] [PATCH] ipa: ipu3: fix headers order","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Thu, Aug 12, 2021 at 03:50:12PM +0100, Kieran Bingham wrote:\n> On 12/08/2021 15:16, Laurent Pinchart wrote:\n> > On Thu, Aug 12, 2021 at 03:57:50PM +0200, Jean-Michel Hautbois wrote:\n> >> The ipu3 does not follow the current coding style practices for header inclusion.\n> >> Re-order the headers to match the updated styles.\n> > \n> > A library-wide patch may be better to be done with this once and for\n> > all. However, before that, ...\n> \n> I sort of disagree, these can be handled as they arise. This patch is\n> split from the upcoming series which likely highlighted this, so it's\n> just a cleanup along the way.\n> \n> Header sort orders are not ... critical, or bug fixes (for the most\n> part). It's just style, and the tool is updated to make it consistent as\n> we go.\n\nIt's not critical, but the longer we stay in the space between the old\nand new styles, the more annoying it will be. I'd rather write a big\npatch and get used to the new order than having to deal with a slow\nmigration for a long time.\n\n> >> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> >> ---\n> >>  src/ipa/ipu3/ipu3.cpp | 6 ++++--\n> >>  1 file changed, 4 insertions(+), 2 deletions(-)\n> >>\n> >> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n> >> index c34fa460..21b9db64 100644\n> >> --- a/src/ipa/ipu3/ipu3.cpp\n> >> +++ b/src/ipa/ipu3/ipu3.cpp\n> >> @@ -22,16 +22,18 @@\n> >>  \n> >>  #include <libcamera/control_ids.h>\n> >>  #include <libcamera/framebuffer.h>\n> >> +#include <libcamera/request.h>\n> >> +\n> >>  #include <libcamera/ipa/ipa_interface.h>\n> >>  #include <libcamera/ipa/ipa_module_info.h>\n> >>  #include <libcamera/ipa/ipu3_ipa_interface.h>\n> >> -#include <libcamera/request.h>\n> > \n> > Kieran, is the IPA headers separation something we want to carry\n> > forward, or should we update the clang-format rules ?\n> \n> I think this is much better.\n> \n> The IPA interface is a part of libcamera, but is separate from the\n> public API.\n> \n> To me ... sorting folders in alphabetically among files is ... wrong.\n> \n> We already have base and internal as distinct groups.\n> Merging libcamera/ipa/* in libcamera/* would be an inconsistency if we\n> didn't give it a group of it's own.\n\nFine with me.\n\n> >>  #include \"libcamera/internal/mapped_framebuffer.h\"\n> >>  \n> >> +#include \"libipa/camera_sensor_helper.h\"\n> >> +\n> >>  #include \"ipu3_agc.h\"\n> >>  #include \"ipu3_awb.h\"\n> >> -#include \"libipa/camera_sensor_helper.h\"\n> > \n> > The split here doesn't bother me much, but we could also do without it\n> > if desired.\n> \n> Same here, libipa is an internal helper library. It should be included\n> before any local includes.\n> \n> #include \"ipu3_agc.h\"\n> #include \"ipu3_awb.h\"\n> #include \"libipa/camera_sensor_helper.h\"\n> #include \"helpers.h\"\n> #include \"xylophones.h\"\n> \n> would be wrong to me ...\n\nOK. I have a feeling we'll rework libipa to move from \"\" to <> at some\npoint :-)\n\n> >>  static constexpr uint32_t kMaxCellWidthPerSet = 160;\n> >>  static constexpr uint32_t kMaxCellHeightPerSet = 56;","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 2687DBD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 Aug 2021 14:57:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A1C6160265;\n\tThu, 12 Aug 2021 16:57:14 +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 AA15F60264\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Aug 2021 16:57:13 +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 1E483EE;\n\tThu, 12 Aug 2021 16:57:13 +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=\"ZmRXBtPY\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1628780233;\n\tbh=jjTDK82kIxNPYkHZjiN4JnmCoDXJ8ienjxU0GE4B2bM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ZmRXBtPYoD5va39yOdA8xBKdZ3L7usMtZKEzGHZnJG/YimtF2MKGANZbBV1hpLb8Y\n\t2AoZtTt0GKXKRRv4wGrX1scRUK8fyuaJwoZNeKREbmwVYmLE3L6krHd1hLBBaWSRHR\n\teoxTP0c0pXUt2Zgi8FeDs6vUUFGmovE8wNyZDKjg=","Date":"Thu, 12 Aug 2021 17:57:09 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YRU2xYnV7X9+j7rk@pendragon.ideasonboard.com>","References":"<20210812135750.165416-1-jeanmichel.hautbois@ideasonboard.com>\n\t<YRUtS8XWOfmFa6YS@pendragon.ideasonboard.com>\n\t<b1a8dd7d-cad0-ad27-1947-0ac6bb606eb9@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<b1a8dd7d-cad0-ad27-1947-0ac6bb606eb9@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] ipa: ipu3: fix headers order","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>"}}]