From patchwork Mon Oct 28 17:36:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Rudenko X-Patchwork-Id: 21762 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 8A348C3220 for ; Mon, 28 Oct 2024 17:37:12 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D001965397; Mon, 28 Oct 2024 18:37:11 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="XHVDggQu"; dkim-atps=neutral Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7ADA560367 for ; Mon, 28 Oct 2024 18:37:09 +0100 (CET) Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2fb51e00c05so66527691fa.0 for ; Mon, 28 Oct 2024 10:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730137028; x=1730741828; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=93z42zaSU+dq+5VHHDSN/9/IGXucBRv7VWpzUJTaxgE=; b=XHVDggQu4WN9FFxVem0d2qsB6EPhFnYYlTIKoyEB0i1xhoMgNk9qaz3LTyCh4+BF8H YQiohvxtGPkleptDqqdk4XIRYcNxfEh07EsbP44GCVNsbStDbPViEFKuDv6H2NZ2iXbP Rlso3+T4sLZpo4zDR0Qs7qMp2WBKnIwlhfYsEvPrYgpa4WxAQTZg7JLNORNF5vIH1pGt pZ8IRtGjw07nPydH8RbwTWBrxMZ/PpdLZhEyH9sEM+gSDyOvWhdOvTfrHdKZFfGD0aoV 1e92TqBYETgpnqrcAupaX4R1aaQqYuu4hfc1J81Et5aEQxc3vD6ZbWEcjIGw/JgiPqg2 ORbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730137028; x=1730741828; 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=93z42zaSU+dq+5VHHDSN/9/IGXucBRv7VWpzUJTaxgE=; b=wcmwoRukYlV+B9M0ZMvPzxzzUWorrekaShIZihsWaIBusxd2AwCp5iCCAH9ea6LYUa Hz4g30HKAOe2tl+1zUvevyHtwaIDoSWqKTm0b54mq/r7kWKeOEYoeUrRYZEJ5xuwrTzF GpiHKwH5h569PShS0f/y+y66Gg0PD0rv0A1AMEr2O57BuC1CvDQN7mzym8v2U1NMGg8G wAsA/z+BH6bO6+IaGLO9HRiFLvKvsU0ZC+a/krIEcCgfZI+RVKu7LLaTamCx1fcHO1LN ChjJW44l9QaU+lyw48+Edi8zVzz3ARgjOpv+bWeHeJkqmc+urClcG2Y0YwC6Mi6/wwFX zxOQ== X-Gm-Message-State: AOJu0Ywrbvy0vR+L0I5RN45K9Snu6SpfFf2xfUAmBxkt5Ajj/Y94at0a 9WQO5+pqKQQ+88LQvS5j9AfwrG8q/sbwEvKcFc5+duS4GEO36DWXu2pbhUF9igI= X-Google-Smtp-Source: AGHT+IF6WRkaTpsU2Uv4R+vOGcoQFsl1vgktACT6KsrnEVpAHMRzUV4z0caULWaeei9V6l1ROfqkMg== X-Received: by 2002:a2e:9b81:0:b0:2f3:f1ee:2256 with SMTP id 38308e7fff4ca-2fcbe0a359bmr53165421fa.44.1730137027570; Mon, 28 Oct 2024 10:37:07 -0700 (PDT) Received: from localhost.localdomain ([45.12.135.46]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2fcb453e3afsm12115511fa.57.2024.10.28.10.37.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 10:37:06 -0700 (PDT) From: Mikhail Rudenko To: libcamera-devel@lists.libcamera.org Cc: Kieran Bingham , Laurent Pinchart , Mikhail Rudenko Subject: [PATCH RFC 0/3] Pass sensor delays from rkisp1 IPA to the pipeline handler Date: Mon, 28 Oct 2024 20:36:56 +0300 Message-ID: <20241028173659.247353-1-mike.rudenko@gmail.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi, At present, rkisp1 uses hardcoded sensor control delays. In the case when they do not match real sensor delays, the AGC algorithm operates in a suboptimal mode, leading to gain/exposure oscillations on capture start and slower convergence. This series does 3 things to fix this situation. First, it adds an IPC structure for sensor control delays. Second, it adds sensorDelays() method to the CameraSensorHelper and overrides it where sensor-specific delays are known. And finally, it replaces hardcoded delays in rkisp1 pipeline handler with those obtained from the CameraSensorHelper via IPA. I'm not completely sure this is the best solution from the architecture viewpoint, thus "RFC". Any feedback is welcome! Mikhail Rudenko (3): ipa: core: add IPASensorDelays structure libcamera: libipa: camera_sensor: Add sensorDelays method ipa: rkisp1: Pass sensor delays from IPA to pipeline handler include/libcamera/ipa/core.mojom | 35 ++++++++++++++ include/libcamera/ipa/rkisp1.mojom | 3 +- src/ipa/libipa/camera_sensor_helper.cpp | 59 ++++++++++++++++++++++++ src/ipa/libipa/camera_sensor_helper.h | 5 ++ src/ipa/rkisp1/rkisp1.cpp | 8 +++- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 27 +++++------ 6 files changed, 118 insertions(+), 19 deletions(-) --- 2.46.0