From patchwork Mon Jun 5 09:14:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 18705 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 3F0B5C31E9 for ; Mon, 5 Jun 2023 09:14:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 26B5362891; Mon, 5 Jun 2023 11:14:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1685956491; bh=Po+0B6OoR7x5A87nVYWv4E8Qv65qNKo51f4QNhZTqPk=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=wYjTlo4afxp9zJvhcJbMGbESQBlLJ/ZQBd3rADEuZZesMuDhzZsam/8D6SkmNOZQH aDvt7TkBtN2MEYKG+9/8geAezx207K+nJe9m9QJcEBTl/g0sCOJK6tzozQUEEge1yM zEd+zzf3XVu0lcdBIltu2kBiyuApKehKNwp3aoiN6WyI7f2ebPTaUeRifLJmle0yeY 6kVcyA0z8Jk2uWyxL9e+jziURKK2awdlACGgmfG20xE0V+9//lhZKZ2XA3JGv0QFnK eDLHvolTvBsbxg/dkjKRV6xHZ2r1cUCpxaEdhN1drbxtxD/RD36tneZBWfCk0d+Y0I W/pmFBzf+Nh4g== Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7DBB362880 for ; Mon, 5 Jun 2023 11:14:48 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="qRU0nQ5G"; dkim-atps=neutral Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f3ba703b67so5541731e87.1 for ; Mon, 05 Jun 2023 02:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1685956487; x=1688548487; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5zZra2t06WVGkK/lCB01lQuXNNeuoe7W189Tj55Iz0A=; b=qRU0nQ5G0pnolaiQTWPuDji/D27zediNQl+xa8s6tyWo6AVPv4LNM7GPFw5/rMAqAp 4qs4tlSTReI4ij/5S+JZhMy2v7AR+RhMvQvy2FhxW6IbypVJPptAo+ZeXUhQOo9qLBcq Tq2IxAJNNvjPiU2L4wnKGNHLiVJIS2ZAoCzFD5sTSEtCl9kXWvXEhPfhcYzHjpqCn/gn LSqVwdWdNo0OQNPkMvABgyLdlzPsIHmS5Mpi6HLzGhn2x93BxP7f9sAcs/0A4BL6xclz 4ZRrcoRUgJrbDCQ+bo874BkQEudnuQCaZyEQ31fBuLFGXRjDQxuDLMJMvlmYF6VVsSiH Z2Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685956487; x=1688548487; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5zZra2t06WVGkK/lCB01lQuXNNeuoe7W189Tj55Iz0A=; b=SpwOgXh78GTKtb5eHL4kd9zaa/sLlZ7BpmaIB5v5IcLbVppRClN+94bnvq15QnZWHc WA04hxCFyEeRkkVD+xkzwM/gtPOPkrRz2/asbD4hvawf74tPEE2Bkmg5eFcpmUKlHoek g95WZiXs5SKX83+zr9EgamLrDTC3j9MHa+66FW6nUbTutInQnMW+az4uAmybzVCjpQZM xm0Qtf0/QNkPtjQJTkxVsQk9/+0TMit+niErziDolsxonO5XIRKabXz8UzSnWe7aTVGE 0GPYw+dfssMHr9WAGvSZxgX84pCVMx1ory/uePFgGZuDqXaFLVwnsJ7VjITGH2awjxJg YMRw== X-Gm-Message-State: AC+VfDy2OCXJk1MJoYdgvVgp5u7Ywy47XnE3SnNfyUBS33gD5P6NVteT e8yvsvpNYvDrXBdk4d2XU21YdMI1tlOoUGFXoULpyw== X-Google-Smtp-Source: ACHHUZ4ntxF5SQT7TEbaocioUQaeycmwK5vBnzuDhs1lt54p/Zb+6TBK/0wY+C1qPewvr92+GLU+GQ== X-Received: by 2002:a05:6512:6e:b0:4f6:259d:3d42 with SMTP id i14-20020a056512006e00b004f6259d3d42mr1363718lfo.3.1685956487340; Mon, 05 Jun 2023 02:14:47 -0700 (PDT) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id z16-20020a7bc7d0000000b003f605814850sm13776369wmk.37.2023.06.05.02.14.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jun 2023 02:14:46 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Mon, 5 Jun 2023 10:14:05 +0100 Message-Id: <20230605091406.31757-3-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230605091406.31757-1-naush@raspberrypi.com> References: <20230605091406.31757-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 2/3] pipeline: ipa: rpi: Return lens controls from ipa->configure() 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" In addition to sensor controls, return lens controls from IpaBase::configure() back to the pipeline handler. If there are lens controls present in the ControlList, action them in the pipeline handler as part of the configure routine. Signed-off-by: Naushir Patuck Reviewed-by: Laurent Pinchart Reviewed-by: Jacopo Mondi --- include/libcamera/ipa/raspberrypi.mojom | 3 ++- src/ipa/rpi/common/ipa_base.cpp | 2 +- src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 6 ++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom index ba786e647ca1..4f20792e4679 100644 --- a/include/libcamera/ipa/raspberrypi.mojom +++ b/include/libcamera/ipa/raspberrypi.mojom @@ -46,7 +46,8 @@ struct ConfigParams { struct ConfigResult { float modeSensitivity; libcamera.ControlInfoMap controlInfo; - libcamera.ControlList controls; + libcamera.ControlList sensorControls; + libcamera.ControlList lensControls; }; struct StartResult { diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp index db7a0eb3a1ca..599ad146a863 100644 --- a/src/ipa/rpi/common/ipa_base.cpp +++ b/src/ipa/rpi/common/ipa_base.cpp @@ -201,7 +201,7 @@ int32_t IpaBase::configure(const IPACameraSensorInfo &sensorInfo, const ConfigPa applyAGC(&agcStatus, ctrls); } - result->controls = std::move(ctrls); + result->sensorControls = std::move(ctrls); /* * Apply the correct limits to the exposure, gain and frame duration controls diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp index 3bb5ec531e4f..2ab0b971149a 100644 --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp @@ -1192,8 +1192,10 @@ int CameraData::configureIPA(const CameraConfiguration *config, ipa::RPi::Config return -EPIPE; } - if (!result->controls.empty()) - setSensorControls(result->controls); + if (!result->sensorControls.empty()) + setSensorControls(result->sensorControls); + if (!result->lensControls.empty()) + setLensControls(result->lensControls); return 0; }