From patchwork Thu Aug 24 13:19:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 18959 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id B5576BE080 for ; Thu, 24 Aug 2023 13:19:14 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B287F627E0; Thu, 24 Aug 2023 15:19:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1692883153; bh=0oNSUiuaJalXStkgeSTF+9bLWf3hzD8gNSFvSTaferQ=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=S52f4tPiGf3QYU2W6rAi7kxHnm6GHByl3DmLdaaF4KtKUZAmmjQZnlL4GI8UDr+yq w15eN63M9i+PpsloGLHVP8IS0dTYSDqOMLuMHHPYrsN9yjDRrRszzJvF6NgFs84a/y HBRiyC55G6K1OzWEDnqsISeWzTF6ugBvaq950Tw2rEyX5IcPk1K+AlQ5CMXjcbzB9Y h/LOVCk9DEgoKWFstojn+kOSdZ0vjm2ysYvtL7bp4jNYEbKKR1CZfsjxHQtIrb2zHg vGT8SSIFxcz1E1Il+xLbRwUawojzqDxpj6Z0cqR3sAnS6u4lYB5KLuKiQXRpp0m5du J76hyOTwF71LA== Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1C82F61E04 for ; Thu, 24 Aug 2023 15:19:12 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="mgvTNQKC"; dkim-atps=neutral Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-31c3726cc45so4116631f8f.0 for ; Thu, 24 Aug 2023 06:19:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1692883151; x=1693487951; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=xFRDW11M9uvShRUmPgrp8KqO7/6ywZaq1zt5zUFAxGo=; b=mgvTNQKCBby32MgJmzRSUi12QwgtPxJscngFo5gpzQSZq0GlGrW5tQpj4NrJM+a8Wx +bh66FyeMudC+0RigeN0Z2IS0hPfM4Hn7mwSr5ICDXeWCOz2cWDhECev9kncOFmmS8Ew hhGEQ7QcdE9wTbKiLdREOixcHTU6vJ118EsqS+yp1wJaU4X0ip7nAQFGdWPGgxCNNimi T6Tz/x6N6YAhQ4QSxlTCTZoDL1GfQRa/+CFcEdSpFKSWq9r2fFiJRsql5CYdoomMSuYv KSaIB6P7GWWP+WlyAvnLUoHL8MQbV2kLLQaYnzhieyHhb0O8XUiBBaagLrRjxv9zWK9W u7LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692883151; x=1693487951; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xFRDW11M9uvShRUmPgrp8KqO7/6ywZaq1zt5zUFAxGo=; b=CEvj91iscqSL7wd5ZSKJxjMWRWkEUm7NuI6N3hme2eM7v8Gx4VrayizCV2SxUAyIpV M4NlUbSgWPbWGqwfEpPa7sVdgTsBl4jYxpMnOvJGMyybK/I4cnSVwQXbK1DYxlai38BD NJn/OQo5KlFk9KkqtcS8FoWVamTmPtCzlvdvl+gbay0RJjdWbOX/kLulTWtw1hsPlFD5 tkObGU8NUki+/xfhbfIgM70lPnvWghqIUj3otMZWSHkEId5+xQDkem6NcoKQ7A7JqCXh ecF1MgmRsm05yO8Ul2L6fAun8HgEX63MBgRcH7N1NsDvNNdIKfFsw3Dl5VuKHZ+vF8/e vltA== X-Gm-Message-State: AOJu0YywwhagUjozV3+hLW8/bxChy0Jo8kmzg73uopLR65Rz9AspCDv/ HAdxJjh2OCV+MfdTDxY6dNnNKSyA0e1UkUjQ7/s= X-Google-Smtp-Source: AGHT+IGzsGIcZnQl29EQNn8t1rsjtHtXfFy0gKo+syUC+/GV6DASlNwpYdjqiIO8j3fSm9DROxLI+Q== X-Received: by 2002:adf:e990:0:b0:319:6d8a:75f8 with SMTP id h16-20020adfe990000000b003196d8a75f8mr13142109wrm.44.1692883151376; Thu, 24 Aug 2023 06:19:11 -0700 (PDT) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id l9-20020a5d6749000000b003143867d2ebsm22516262wrw.63.2023.08.24.06.19.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 06:19:11 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Thu, 24 Aug 2023 14:19:08 +0100 Message-Id: <20230824131908.12109-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] ipa: rpi: imx290: Hide one frame on startup X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Naushir Patuck via libcamera-devel From: Naushir Patuck Reply-To: Naushir Patuck Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The imx290 produces a single unusable frame on startup and mode switch. This is signalled to the IPA in the mode switch case, but not the startup case. Fix this. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Jacopo Mondi --- src/ipa/rpi/cam_helper/cam_helper_imx290.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp b/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp index 7d6f5b549a73..d98b51cd56b3 100644 --- a/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp +++ b/src/ipa/rpi/cam_helper/cam_helper_imx290.cpp @@ -19,6 +19,7 @@ public: double gain(uint32_t gainCode) const override; void getDelays(int &exposureDelay, int &gainDelay, int &vblankDelay, int &hblankDelay) const override; + unsigned int hideFramesStartup() const override; unsigned int hideFramesModeSwitch() const override; private: @@ -54,6 +55,12 @@ void CamHelperImx290::getDelays(int &exposureDelay, int &gainDelay, hblankDelay = 2; } +unsigned int CamHelperImx290::hideFramesStartup() const +{ + /* On startup, we seem to get 1 bad frame. */ + return 1; +} + unsigned int CamHelperImx290::hideFramesModeSwitch() const { /* After a mode switch, we seem to get 1 bad frame. */