From patchwork Mon Sep 26 09:36:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 17395 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 B5EB4C0DA4 for ; Mon, 26 Sep 2022 09:36:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2596E6224D; Mon, 26 Sep 2022 11:36:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1664184978; bh=Bgczjz6S9dTZu0HHZ4ylLyIBCMOXWqxMfm9a2RGVu1E=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=q7UBq1DIgrXC+8FbOc7NM8U4qXniz1htMxJZheD7NfGq3QYKwRHdQHco2ji5oVpzg i/MlL+r/K0vVcKg35g5obo/+7+9fTi1nmjkg/amS+tN4KivcYWJezu0eQbmOBF+JLb rAXdMq3hhGzr6MnFTkF2TGWyUpXYTtaSiUpoT/+ZD9aXNL1JkrMK8DDgIv4naDWlTk mIlMwzfDLQ4o5oRUL9Ae4VHO9oIuzuTwn+Wqazja7PikbMUfcAC2JZe6lUMgznX5My by6jKdJSTfO3/9KAhicnXdq1WbwutEPhYzHNYR99Eyo8RhUNCRh4XX9OguVbICh76e qdUhRuYKPVH1g== Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3DE5861F7C for ; Mon, 26 Sep 2022 11:36:16 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="j8TE2Zqe"; dkim-atps=neutral Received: by mail-wm1-x333.google.com with SMTP id l8so4070399wmi.2 for ; Mon, 26 Sep 2022 02:36:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=vvTvS6K/KgANWo0Eoe1G5amqDl4mlX3OozLvj9NfGtw=; b=j8TE2ZqeKk7EiLUgfwdtbKCbLrvMud+nbGYS95n4zEjYTHVzRpLHDth/5YQufPHNH/ YzxvqpkKbvH6/a3J+bKenKryeLJy6f954wOJRkjq3RTbfPZHVIac6hOhy1Vvnm6WbHUU Idtjn8abS+eFltzaEJrK6kxeZBKi3q64AfQjWUfnc4iKhZt6ElYW88WaClY4BVzTwr8n zn2+SHrDBxMbvXbLvenpw4JrM3JDuluhog58Em22kMMcQJ1hUvtkuaCTYghCAwoYEa4l tXeCV2QmIgxmRw79dagzKXSybF2sWpO4cjuUI06EHh4ViDVMqsqbDSGEwS5dnoPGgkUe sS8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=vvTvS6K/KgANWo0Eoe1G5amqDl4mlX3OozLvj9NfGtw=; b=k6qkjlqQSXGNy7HE8leYRu1tacqATthwMchV+Ta8gNkwmFpGjv7qnL/yOw5xacAbeo TWN5qZ3vROkJheLedd6hhNrNTWhkvWN0/lnghPNxytbOT6t5W0ziywxh8fg7AGfG/m7w DIopeDheGNiMNTjfh96hmyH1DKCrhzcojtub2U17uPomjRKAjXnRmnJiRk/bO4nrm88F j1cOe1tuJUn8rV3NNK27LwDp5g3mTHNQU41J1f/urcRkIrix9Bl1vMLfiHkV2Zx7GKgM uo3dC7+oNqYHNjdDdxXL6HnS6z+UTXsCvaItI6eUqWYTDANqpP2+mEW+shC6CHVHhJyx qaLA== X-Gm-Message-State: ACrzQf33CWxgp4O6sWhgPxBT1tYQY8j8NQpapPRekDFkdW5yxnP8B52f 6PRmKw8hmf+JlP4AaY3MHC79hpTSqcWRfCfN X-Google-Smtp-Source: AMsMyM5hq2N+WET6pBQFXIF3itCKERUWwig/EMsx/jLILXPrpp0QnboqCHB615Q3rNleuuEdcgexqw== X-Received: by 2002:a1c:7315:0:b0:3b4:e1b8:47b2 with SMTP id d21-20020a1c7315000000b003b4e1b847b2mr14155725wmb.165.1664184975603; Mon, 26 Sep 2022 02:36:15 -0700 (PDT) Received: from naush-laptop.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id n5-20020a05600c3b8500b003b5054c6f87sm10649956wms.21.2022.09.26.02.36.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 02:36:15 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Mon, 26 Sep 2022 10:36:13 +0100 Message-Id: <20220926093613.29828-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] ipa: raspberrypi: Fix sensor delays for the IMX296 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 IMX296 implements a 2 frame delay for exposure, gain and vertical blanking changes. Report this in the camera helper. Signed-off-by: Naushir Patuck Reviewed-by: Jacopo Mondi Reviewed-by: David Plowman --- src/ipa/raspberrypi/cam_helper_imx296.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ipa/raspberrypi/cam_helper_imx296.cpp b/src/ipa/raspberrypi/cam_helper_imx296.cpp index ab1d157aaf45..09f828ea6249 100644 --- a/src/ipa/raspberrypi/cam_helper_imx296.cpp +++ b/src/ipa/raspberrypi/cam_helper_imx296.cpp @@ -23,6 +23,7 @@ public: double gain(uint32_t gainCode) const override; uint32_t exposureLines(Duration exposure) const override; Duration exposure(uint32_t exposureLines) const override; + void getDelays(int &exposureDelay, int &gainDelay, int &vblankDelay) const override; private: static constexpr uint32_t maxGainCode = 239; @@ -61,6 +62,14 @@ Duration CamHelperImx296::exposure(uint32_t exposureLines) const return exposureLines * timePerLine + 14.26us; } +void CamHelperImx296::getDelays(int &exposureDelay, int &gainDelay, + int &vblankDelay) const +{ + exposureDelay = 2; + gainDelay = 2; + vblankDelay = 2; +} + static CamHelper *create() { return new CamHelperImx296();