[{"id":26425,"web_url":"https://patchwork.libcamera.org/comment/26425/","msgid":"<CAEmqJPq6NYZCwVWSMeBFe02N-wh2603Ef0r3nC0-f5BmFtGOkA@mail.gmail.com>","date":"2023-02-08T08:51:46","subject":"Re: [libcamera-devel] [PATCH v1 4/4] pipeline: raspberrypi: Drop\n\tunused code","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Laurent,\n\nThank you for these fixups.\n\nOn Mon, 6 Feb 2023 at 17:04, Laurent Pinchart via libcamera-devel\n<libcamera-devel@lists.libcamera.org> wrote:\n>\n> Commit 1a614866a29c (\"libcamera: camera_sensor: Validate Transform\") has\n> removed usage of the RPiCameraData::supportsFlips_ but hasn't removed\n> the field itself, nor its initialization. Drop those as they're unused.\n>\n> Fixes: 1a614866a29c (\"libcamera: camera_sensor: Validate Transform\")\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n\n> ---\n>  .../pipeline/raspberrypi/raspberrypi.cpp      | 21 +++++++------------\n>  1 file changed, 8 insertions(+), 13 deletions(-)\n>\n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index d752911ddfff..77e860ab0e72 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -187,8 +187,8 @@ class RPiCameraData : public Camera::Private\n>  public:\n>         RPiCameraData(PipelineHandler *pipe)\n>                 : Camera::Private(pipe), state_(State::Stopped),\n> -                 supportsFlips_(false), flipsAlterBayerOrder_(false),\n> -                 dropFrameCount_(0), buffersAllocated_(false), ispOutputCount_(0)\n> +                 flipsAlterBayerOrder_(false), dropFrameCount_(0),\n> +                 buffersAllocated_(false), ispOutputCount_(0)\n>         {\n>         }\n>\n> @@ -275,11 +275,9 @@ public:\n>         std::deque<Request *> requestQueue_;\n>\n>         /*\n> -        * Manage horizontal and vertical flips supported (or not) by the\n> -        * sensor. Also store the \"native\" Bayer order (that is, with no\n> -        * transforms applied).\n> +        * Store the \"native\" Bayer order (that is, with no transforms\n> +        * applied).\n>          */\n> -       bool supportsFlips_;\n>         bool flipsAlterBayerOrder_;\n>         BayerFormat::Order nativeBayerOrder_;\n>\n> @@ -1424,12 +1422,10 @@ int PipelineHandlerRPi::registerCamera(MediaDevice *unicam, MediaDevice *isp, Me\n>         data->properties_.set(properties::ScalerCropMaximum, Rectangle{});\n>\n>         /*\n> -        * We cache three things about the sensor in relation to transforms\n> -        * (meaning horizontal and vertical flips).\n> -        *\n> -        * If flips are supported verify if they affect the Bayer ordering\n> -        * and what the \"native\" Bayer order is, when no transforms are\n> -        * applied.\n> +        * We cache two things about the sensor in relation to transforms\n> +        * (meaning horizontal and vertical flips): if they affect the Bayer\n> +        * ordering, and what the \"native\" Bayer order is, when no transforms\n> +        * are applied.\n>          *\n>          * We note that the sensor's cached list of supported formats is\n>          * already in the \"native\" order, with any flips having been undone.\n> @@ -1438,7 +1434,6 @@ int PipelineHandlerRPi::registerCamera(MediaDevice *unicam, MediaDevice *isp, Me\n>         const struct v4l2_query_ext_ctrl *hflipCtrl = sensor->controlInfo(V4L2_CID_HFLIP);\n>         if (hflipCtrl) {\n>                 /* We assume it will support vflips too... */\n> -               data->supportsFlips_ = true;\n>                 data->flipsAlterBayerOrder_ = hflipCtrl->flags & V4L2_CTRL_FLAG_MODIFY_LAYOUT;\n>         }\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\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 00A0CBDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  8 Feb 2023 08:51:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3DA29625F4;\n\tWed,  8 Feb 2023 09:51:57 +0100 (CET)","from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com\n\t[IPv6:2607:f8b0:4864:20::b2a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 24868625DD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  8 Feb 2023 09:51:56 +0100 (CET)","by mail-yb1-xb2a.google.com with SMTP id x8so13020765ybt.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 08 Feb 2023 00:51:55 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1675846317;\n\tbh=/PjgH25VpTo51BVBXDDYNGs7n8vwyIGbWWLtD3xw8PI=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=oR8sJk2NX2Vb3mpN5nRUV0drr6+j7MRF1X8Chz+00YidZxbFGusEK1ekmwUvkMpVL\n\tljORfgLOk/c5Tj5QM0+lmqxsRqcjdDzQ4feyIfDmTtRNqa8UpFox2M/IqaGGnbnbs2\n\tG0JxytcmP1T7pSLe+VUR8mIJTHUw3MaCPWS5+GsHPPP5mLhDl9UUgPWjnmbMfaoUB9\n\tU6phH2GIQSp8J8k1FlNWe7NVsmqVkg3rAkm/7CvmgUZIhOzYBfYHdvC7UfCaViEhWe\n\tBhRZJCs0M+PxHcA4KBqias2oZZ3zGsR3MVXFzx9FVSTEnKkmkDQsuKeHSKjnUioJnO\n\tz3eQkw3gmPCOg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=XrY12Ub2r5oUpMJM4tUhzHHftwTGQOSVoL9L8zwEoA0=;\n\tb=DgWQFExJl66tGi39OEAaHu8qk9Emn8TUxtZj0qJF7FK6rNuj2B2MQtbo4m6Niktv2H\n\tsZdsJgQ36/GtfiEo+6nePpnMbUcgBG+Hk0Eq9Tvslr9xHqwVtxiYh8eFBYSz4xrS/bhH\n\toRXp8lzlSCNGDrPdsjHn7DhsRPBiA0G1ptP0MOEDJNhfkfnC75viqW1NxOk7kjyWnwaZ\n\tnrJpVA+HLAD+5LamCdfQ3GoZ9OpayHC/q+plabEr/zP8LBDZYnOOrOjHkgCLrH98OwdT\n\t/veuSUjOr7Rly4rj+6gzx2J+HAxDbtVFI9oqNaOM7nhlWwOju69lhiDVp3U996IsClDQ\n\tIGJQ=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"DgWQFExJ\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=XrY12Ub2r5oUpMJM4tUhzHHftwTGQOSVoL9L8zwEoA0=;\n\tb=LI8GNGtGmjNDcTUoMYaJoefXkwbqM04vH/q+nPsHUFDE5BwZgo918s5RU8XXceExQW\n\tsXo2QINzgqn5KhhC+tTYmo34UxxkAG2l4tBzhe+BJzry5GTbJ9iFqdWDcjHYP90m7xNm\n\tXKZYtqPtUlKy2ncWZM3EBa/RyO24Gwb0Rjrior6CqS26BERn5zDvEaN5UQSwY79M20CK\n\tkFxvJpi6QHnC18yCQyrEzl/zUhU+yNPCzWEdBBJMzw1FPwvxQkW0ZeoSpPxK3gYO7Xg1\n\tueHqdUORjjaS09zeQjmIwLyGqJ2MHL84nZIVp6VSzjJ1lcBDGR6l+w9udaA5S4hKkD7H\n\tzMbw==","X-Gm-Message-State":"AO0yUKWOvFWweWPtkqt2HLORkuSx9F+xrxL0T7L0BB2EOyGapNTsOIJ9\n\t+BoSTndSMqnAMrRIG0DUpmSZeboW04LcS3KusrWzC8EqR6cEG39z","X-Google-Smtp-Source":"AK7set9lboloZLDRdq4Vq9lK8NUmhD3AWlFuKMEfGJh4t1rv2evOXzY4X7PhLDkN/aUJfdRTuMNEMiHG3YiIZwV/cpc=","X-Received":"by 2002:a05:6902:c5:b0:879:5c53:670c with SMTP id\n\ti5-20020a05690200c500b008795c53670cmr221752ybs.524.1675846314617;\n\tWed, 08 Feb 2023 00:51:54 -0800 (PST)","MIME-Version":"1.0","References":"<20230206170356.20340-1-laurent.pinchart@ideasonboard.com>\n\t<20230206170356.20340-5-laurent.pinchart@ideasonboard.com>","In-Reply-To":"<20230206170356.20340-5-laurent.pinchart@ideasonboard.com>","Date":"Wed, 8 Feb 2023 08:51:46 +0000","Message-ID":"<CAEmqJPq6NYZCwVWSMeBFe02N-wh2603Ef0r3nC0-f5BmFtGOkA@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v1 4/4] pipeline: raspberrypi: Drop\n\tunused code","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>","From":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26429,"web_url":"https://patchwork.libcamera.org/comment/26429/","msgid":"<843622fb-5a69-6ee1-a69e-66a9040001f7@ideasonboard.com>","date":"2023-02-08T10:30:58","subject":"Re: [libcamera-devel] [PATCH v1 4/4] pipeline: raspberrypi: Drop\n\tunused code","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Laurent\n\nOn 2/6/23 10:33 PM, Laurent Pinchart via libcamera-devel wrote:\n> Commit 1a614866a29c (\"libcamera: camera_sensor: Validate Transform\") has\n> removed usage of the RPiCameraData::supportsFlips_ but hasn't removed\n> the field itself, nor its initialization. Drop those as they're unused.\n>\n> Fixes: 1a614866a29c (\"libcamera: camera_sensor: Validate Transform\")\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\n> ---\n>   .../pipeline/raspberrypi/raspberrypi.cpp      | 21 +++++++------------\n>   1 file changed, 8 insertions(+), 13 deletions(-)\n>\n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index d752911ddfff..77e860ab0e72 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -187,8 +187,8 @@ class RPiCameraData : public Camera::Private\n>   public:\n>   \tRPiCameraData(PipelineHandler *pipe)\n>   \t\t: Camera::Private(pipe), state_(State::Stopped),\n> -\t\t  supportsFlips_(false), flipsAlterBayerOrder_(false),\n> -\t\t  dropFrameCount_(0), buffersAllocated_(false), ispOutputCount_(0)\n> +\t\t  flipsAlterBayerOrder_(false), dropFrameCount_(0),\n> +\t\t  buffersAllocated_(false), ispOutputCount_(0)\n>   \t{\n>   \t}\n>   \n> @@ -275,11 +275,9 @@ public:\n>   \tstd::deque<Request *> requestQueue_;\n>   \n>   \t/*\n> -\t * Manage horizontal and vertical flips supported (or not) by the\n> -\t * sensor. Also store the \"native\" Bayer order (that is, with no\n> -\t * transforms applied).\n> +\t * Store the \"native\" Bayer order (that is, with no transforms\n> +\t * applied).\n>   \t */\n> -\tbool supportsFlips_;\n>   \tbool flipsAlterBayerOrder_;\n>   \tBayerFormat::Order nativeBayerOrder_;\n>   \n> @@ -1424,12 +1422,10 @@ int PipelineHandlerRPi::registerCamera(MediaDevice *unicam, MediaDevice *isp, Me\n>   \tdata->properties_.set(properties::ScalerCropMaximum, Rectangle{});\n>   \n>   \t/*\n> -\t * We cache three things about the sensor in relation to transforms\n> -\t * (meaning horizontal and vertical flips).\n> -\t *\n> -\t * If flips are supported verify if they affect the Bayer ordering\n> -\t * and what the \"native\" Bayer order is, when no transforms are\n> -\t * applied.\n> +\t * We cache two things about the sensor in relation to transforms\n> +\t * (meaning horizontal and vertical flips): if they affect the Bayer\n> +\t * ordering, and what the \"native\" Bayer order is, when no transforms\n> +\t * are applied.\n>   \t *\n>   \t * We note that the sensor's cached list of supported formats is\n>   \t * already in the \"native\" order, with any flips having been undone.\n> @@ -1438,7 +1434,6 @@ int PipelineHandlerRPi::registerCamera(MediaDevice *unicam, MediaDevice *isp, Me\n>   \tconst struct v4l2_query_ext_ctrl *hflipCtrl = sensor->controlInfo(V4L2_CID_HFLIP);\n>   \tif (hflipCtrl) {\n>   \t\t/* We assume it will support vflips too... */\n> -\t\tdata->supportsFlips_ = true;\n>   \t\tdata->flipsAlterBayerOrder_ = hflipCtrl->flags & V4L2_CTRL_FLAG_MODIFY_LAYOUT;\n>   \t}\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 53F9DBEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  8 Feb 2023 10:31:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A0354625F4;\n\tWed,  8 Feb 2023 11:31:05 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 135A9625DD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  8 Feb 2023 11:31:04 +0100 (CET)","from [IPV6:2401:4900:1f3e:54db:f072:a64a:6d2e:66a9] (unknown\n\t[IPv6:2401:4900:1f3e:54db:f072:a64a:6d2e:66a9])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 141EC496;\n\tWed,  8 Feb 2023 11:31:02 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1675852265;\n\tbh=UfglFgSB6gOEllr/mqEWPzhTepKlz/8XiwM3BR1p8vE=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=gXqMzMzgd6iMGcPHlBTKJvGOqwXGWAP2mNSy0Ubq1YVOplVS2SCIoJkp7hgqWlw34\n\tqnm4KiYmMug2yxvhCqod9l6rDO7kC6hWmpbj0I0XVnM68F9y+tl5jt5pe97LFmB1uQ\n\t1GA2KUuR3KPMwZpE8Ew19C52p4xmPPV/eL8WwJaM3FUQzUgC2AcmxKT7/4nqOAohxy\n\tso91PjbPhApcbnvlAFBnF3MSkKOYxqocMBvgsKJA2Psys5L6qSgujOooxChKWBnb6F\n\tDkXqGcp0mMiD5WB68ctQH/Ep2rG7NTkMDSe5iJG6XUwytPzy3CwoPiEjBPnR7jIvL5\n\t81kPJuLAr8Bkw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1675852263;\n\tbh=UfglFgSB6gOEllr/mqEWPzhTepKlz/8XiwM3BR1p8vE=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=f3rCCPHnW6SVjb3zuI9ll+/cH+bEjZyAPZfhAY6EqnwUqrGdMAqspWVcxeuufkNhg\n\tAnd9Iugd2gGA45ndwYAViizRUPORICATeDTvcmpfEKvst0y43Ukz7caR/eo+sEWUft\n\tDy5QEqFf0HjJv+47B6YGscsN40UBbu6k1TzU41kc="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"f3rCCPHn\"; dkim-atps=neutral","Message-ID":"<843622fb-5a69-6ee1-a69e-66a9040001f7@ideasonboard.com>","Date":"Wed, 8 Feb 2023 16:00:58 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101\n\tThunderbird/102.6.0","Content-Language":"en-US","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20230206170356.20340-1-laurent.pinchart@ideasonboard.com>\n\t<20230206170356.20340-5-laurent.pinchart@ideasonboard.com>","In-Reply-To":"<20230206170356.20340-5-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v1 4/4] pipeline: raspberrypi: Drop\n\tunused code","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>","From":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]