[{"id":27692,"web_url":"https://patchwork.libcamera.org/comment/27692/","msgid":"<CAHW6GY+Fw7k6_Vv-=h3HiVaFYgnRpveSEdQZux65fGnGqXP93w@mail.gmail.com>","date":"2023-08-25T09:15:15","subject":"Re: [libcamera-devel] [PATCH] ipa: rpi: imx290: Hide one frame on\n\tstartup","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Naush\n\nThanks for the patch!\n\nOn Thu, 24 Aug 2023 at 14:19, Naushir Patuck via libcamera-devel\n<libcamera-devel@lists.libcamera.org> wrote:\n>\n> The imx290 produces a single unusable frame on startup and mode switch.\n> This is signalled to the IPA in the mode switch case, but not the\n> startup case. Fix this.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n\nThanks!\nDavid\n\n> ---\n>  src/ipa/rpi/cam_helper/cam_helper_imx290.cpp | 7 +++++++\n>  1 file changed, 7 insertions(+)\n>\n> diff --git a/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp b/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp\n> index 7d6f5b549a73..d98b51cd56b3 100644\n> --- a/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp\n> +++ b/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp\n> @@ -19,6 +19,7 @@ public:\n>         double gain(uint32_t gainCode) const override;\n>         void getDelays(int &exposureDelay, int &gainDelay,\n>                        int &vblankDelay, int &hblankDelay) const override;\n> +       unsigned int hideFramesStartup() const override;\n>         unsigned int hideFramesModeSwitch() const override;\n>\n>  private:\n> @@ -54,6 +55,12 @@ void CamHelperImx290::getDelays(int &exposureDelay, int &gainDelay,\n>         hblankDelay = 2;\n>  }\n>\n> +unsigned int CamHelperImx290::hideFramesStartup() const\n> +{\n> +       /* On startup, we seem to get 1 bad frame. */\n> +       return 1;\n> +}\n> +\n>  unsigned int CamHelperImx290::hideFramesModeSwitch() const\n>  {\n>         /* After a mode switch, we seem to get 1 bad frame. */\n> --\n> 2.34.1\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 A3F37BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Aug 2023 09:15:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C596C627E0;\n\tFri, 25 Aug 2023 11:15:29 +0200 (CEST)","from mail-vs1-xe2d.google.com (mail-vs1-xe2d.google.com\n\t[IPv6:2607:f8b0:4864:20::e2d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 217F560377\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Aug 2023 11:15:28 +0200 (CEST)","by mail-vs1-xe2d.google.com with SMTP id\n\tada2fe7eead31-44d426d0e05so348998137.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Aug 2023 02:15:28 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1692954929;\n\tbh=cDy/rjVOiGTRo5MFxzW9rAiRVM7VTcFFJ+MxVoEwrNU=;\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=GrP12ECylqx/FwS274T265B4ss1Ok+JZOtCfWozrj2TUUYpMysyQaMvsUmWe6NoeC\n\t4tjCo7MeRSfV9TkBrmryYgxPdNzbkCMolA4k5QeTBIRUe8qUiKTJ9479lGViejqASG\n\tAfsZ5tqFpZHc8SmReax/5w34QH3apLmyccDuD9F1VsnHC/Ylv8AO4pzst04DmRLrvd\n\tL/Yb31lA+XEcGnGvxE1kZyq66lp+w9YoaJQ1IAsilMGBCGogXOtJVRMsBMBSP8gUO3\n\tHU5pcdagMDk6RXgtJSzWBdyDxWSA++1+vH28sJkxuvknnLmKHQoK43sScd5RJM/mGp\n\tGwN62iHvZlo2Q==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1692954926; x=1693559726;\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=ybJE53xEYZP+qBESg+rCw4eazeDVRyidRqFMMd+Va/0=;\n\tb=AHZmecmTjt1NJSS4C/ev9GH0A1x1DGc2TSH5jhwILr3NN9RV4a3zn10Y7i902Dj4MU\n\tdba4vjqDcexjajf2+6S+aGwpPy6Sb8k7Y1PkGf0tuBtse22s8+PR/nwx8W3OCaZZwZzW\n\t6zg22Uph/8Sq6xwRMClAO4apzhAqXJtPzcluPJER2Va3DkTMeCkr+MfSHX79hhcUSdvp\n\tC7ErxYhsBl8pNflRGwXFs52FQ0idzE/t6ct2vxnBITYLNlB68LTRiAOw/9lvg+kwZzVr\n\tRa8pkNWoZH6s58ZUb7YT6P8CrqqoMSvFVCBnTrF4L4zUW6d0QqfKwYJ3QjShvlKIIVot\n\t8pzQ=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"AHZmecmT\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1692954926; x=1693559726;\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=ybJE53xEYZP+qBESg+rCw4eazeDVRyidRqFMMd+Va/0=;\n\tb=HKuxF8WvVHC+iqZn0vSVuWhPpsG8nryKeYavs2k9O3F0hbhif8SgKHVDhjCor3DWHS\n\tJm5cVVWB3Ue6DWNJN9fa9KER9fWuRcDAHgPM1cHy/t6SciHihJVHMWQZpug7AVAWPqXk\n\t6I6f1n4Dd3MRpCG7TlUl+eC8WasCtrcSaQZ1itGPjKqJdV7jKBeBU813F8XrG6fTlQmG\n\tPmw/u9EMh/qF+wzS1k3lBK/xH855JUnErnihNrUYoLp8EmtIdjUWNJQ53UCbF19vwcfR\n\tkjHijYNun81yfiQMBzc1ddnxLW1Fabp1krAV0ES6QC3VfgT/ynzOAJDTm4K13ULKaf0G\n\tqwLw==","X-Gm-Message-State":"AOJu0YxGm9dI96zPNmmtFg09KR0nJsrBxqntYQXKCy9OyDYBKz4HiqHm\n\tq8skueg2lvX8uvRBG2pZgAfYTVgYxUqxTj8EXfVhTA==","X-Google-Smtp-Source":"AGHT+IHzKdczhhBaNNgCDToqEIvllxAeKsYw2uSOuZzneKnHQyW/HriQVBjOTCR08WjwdWOfAmHZNlR8I+i0FD+yTwA=","X-Received":"by 2002:a67:f594:0:b0:44d:5178:23cb with SMTP id\n\ti20-20020a67f594000000b0044d517823cbmr12357691vso.27.1692954926586;\n\tFri, 25 Aug 2023 02:15:26 -0700 (PDT)","MIME-Version":"1.0","References":"<20230824131908.12109-1-naush@raspberrypi.com>","In-Reply-To":"<20230824131908.12109-1-naush@raspberrypi.com>","Date":"Fri, 25 Aug 2023 10:15:15 +0100","Message-ID":"<CAHW6GY+Fw7k6_Vv-=h3HiVaFYgnRpveSEdQZux65fGnGqXP93w@mail.gmail.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] ipa: rpi: imx290: Hide one frame on\n\tstartup","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":"David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"David Plowman <david.plowman@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":27704,"web_url":"https://patchwork.libcamera.org/comment/27704/","msgid":"<mcwlhnfzo4e5jcpohrx7mczbngswrklicvx6bry3huxgvclvmr@6dgp33haxpfb>","date":"2023-08-29T07:20:02","subject":"Re: [libcamera-devel] [PATCH] ipa: rpi: imx290: Hide one frame on\n\tstartup","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Naush\n\nOn Thu, Aug 24, 2023 at 02:19:08PM +0100, Naushir Patuck via libcamera-devel wrote:\n> The imx290 produces a single unusable frame on startup and mode switch.\n> This is signalled to the IPA in the mode switch case, but not the\n> startup case. Fix this.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nThanks\n  j\n\n> ---\n>  src/ipa/rpi/cam_helper/cam_helper_imx290.cpp | 7 +++++++\n>  1 file changed, 7 insertions(+)\n>\n> diff --git a/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp b/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp\n> index 7d6f5b549a73..d98b51cd56b3 100644\n> --- a/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp\n> +++ b/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp\n> @@ -19,6 +19,7 @@ public:\n>  \tdouble gain(uint32_t gainCode) const override;\n>  \tvoid getDelays(int &exposureDelay, int &gainDelay,\n>  \t\t       int &vblankDelay, int &hblankDelay) const override;\n> +\tunsigned int hideFramesStartup() const override;\n>  \tunsigned int hideFramesModeSwitch() const override;\n>\n>  private:\n> @@ -54,6 +55,12 @@ void CamHelperImx290::getDelays(int &exposureDelay, int &gainDelay,\n>  \thblankDelay = 2;\n>  }\n>\n> +unsigned int CamHelperImx290::hideFramesStartup() const\n> +{\n> +\t/* On startup, we seem to get 1 bad frame. */\n> +\treturn 1;\n> +}\n> +\n>  unsigned int CamHelperImx290::hideFramesModeSwitch() const\n>  {\n>  \t/* After a mode switch, we seem to get 1 bad frame. */\n> --\n> 2.34.1\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 C0501BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 29 Aug 2023 07:20:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F0E08627E1;\n\tTue, 29 Aug 2023 09:20:09 +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 E15DF61E01\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 29 Aug 2023 09:20:07 +0200 (CEST)","from ideasonboard.com (mob-5-90-48-16.net.vodafone.it [5.90.48.16])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id F0DE3741;\n\tTue, 29 Aug 2023 09:18:45 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1693293610;\n\tbh=9zZGvQFAAH5Ewkvg0v/rZQOuc1MaC/uPR9uB/OAr9Co=;\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:Cc:\n\tFrom;\n\tb=smGEo5r3MCVahvyhYDFDTeTzG5nlA9vpBtuQNZ7KSqPmZWCSeVmbcaSbt45oUd7Nm\n\tkfuYCEHZkziIet/xLfawfwHPaGxdgvkO1I2hzUlCtCK8OfKfy7Nb4GKPRWGpzZROez\n\t6OiLhH+1iCgZtVVLdv92TW9zF3fNS0cpaNQngUSAeoeFyUlIEDRLDUMjs3HQiPGF0c\n\tMX6J47Zd52b6Avr6j0eZmm4Ec8gJq6hjJ9vEW57DMZLFc8pVmMOaSy1R0/5/GnMPhD\n\txHFJkh4VV0jbUV+8PPkPnPK9ylFhfKbH2htqg+pBROJ/IGXjlnNqLCd2UAJJz+ocaI\n\tfhtRqsQzaiAbA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1693293526;\n\tbh=9zZGvQFAAH5Ewkvg0v/rZQOuc1MaC/uPR9uB/OAr9Co=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=G819GS7H8nxzY3X//yqXBCYYxaq5q6+FtAMaglKqBPGMEFtFv0dcq0xLrXaD2ygry\n\tZv3aiG8YuKZKe8SV3SgAeFlkl8lYk9waHiBSIZvbU9JV5bvWH3A8P6u2nFrs8jLnlx\n\tXolezZyuDsZCulpRWatWc9g4hzCyanr6JZQGULrM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"G819GS7H\"; dkim-atps=neutral","Date":"Tue, 29 Aug 2023 09:20:02 +0200","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<mcwlhnfzo4e5jcpohrx7mczbngswrklicvx6bry3huxgvclvmr@6dgp33haxpfb>","References":"<20230824131908.12109-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230824131908.12109-1-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH] ipa: rpi: imx290: Hide one frame on\n\tstartup","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":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]