From patchwork Thu Jun 1 09:56:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 18676 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 7AA99C31E9 for ; Thu, 1 Jun 2023 09:56:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CAF3862728; Thu, 1 Jun 2023 11:56:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1685613395; bh=jabNdxQhE/cZdftzMydsN8IaMWF9JGrkVzkGrMjt2EI=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=GOUM5SzrPZbPHhLUYYi2IzzLLjT1bLXtJ0By78rbdxSB3llbDTR2/sMK0xRyTrYoU pe6gMJ+C8/u0m8kpTPsFIU0+kayfju//SdC2xwI212B3yo3K+4dU4rJ7zdqPYRBPNy GTIOG0kBR/g9WXXklYEBUE4KP1OV+eqnDxf1CCBvc1poK1c5kfyGJLIJU+PiZolVgV JSKjWDRm9mkSRMGAQ1nMi2ANtvoKR+PtMIJL5fyTWLxjsAx/MznLgg4pOKQYoo47Lm ShabMs1WvHgv/0ABXSIpT1lWoZ41oM6mQ9aN67u+jDoUKE09CLJvQ+8asLl7cKlCt8 nOCVt8UfTrCwA== Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D868161EA6 for ; Thu, 1 Jun 2023 11:56:33 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="BX6gqQ3K"; dkim-atps=neutral Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4f4f3ac389eso696882e87.1 for ; Thu, 01 Jun 2023 02:56:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1685613393; x=1688205393; 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=NlJiT1ineFBInzSUOiuRRKdEbpZiPS259mnUIH2WI/U=; b=BX6gqQ3KcR+d14lOFpt4uRDWINf1BhF+WzBW0NN1e2JnaJHcXaOC5aTUl+0Qtp5KML Z8absoi8JHyiRcBLSbVUWvT4r7+hvyvE6HgCrbHLpmEb3SOSRJIUUKNT4btD78X4cyD1 Nqw4+op5P+uBUafjpPcHX4FikM8piezgKETCYiBRrVICteZOBGEhsAKzaEHMip97RkUn zWs93d/y3xfFzKRTO7+HaKu/AVEpJy9g5TchGIub0UT1pgu3CO8Hwo+iLVVMoRvKsRsy vhMhIIEduY0S1VitrBUmacS0cAgYVX4eXDleZBb2YFFLeH2KneGSjn7a4oPpmfu9GKHU Gh4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685613393; x=1688205393; 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=NlJiT1ineFBInzSUOiuRRKdEbpZiPS259mnUIH2WI/U=; b=V6lxnBgN6/de1iYJDkukv8YYkQBsu0XWPz7wU6FyrRCJdH+mG0TraSPhQVC8UE19+e rPd5J3ulyjxbzq6ce8cfxRhqzyO+kCWM2xL3wfuImSlR0umcyJITqgyO1X6E9Do7q6fn BuSBHsIznmVSVE4B7lcq63l7IOYcRsSBD84Yvb4tXNstKINB/CcN5wbPwx3sc5xwtnUR bARnzoPbqpp7/F//tgZ/5gsvE2frkRgdFrtfDiIe0+uJ/tlNlKRqTC1IyS0aXjpcafsm iZFbL4GWcLX6OqDeZkutweHjfu+Rcu3zWR2eNTWuEZZnvhN2cA42rD30IRchhTiX5F0+ 7kXw== X-Gm-Message-State: AC+VfDz+emGSYrfB+MeJlDgoyN9gfJGMjfR9UEuShiznNBz4GEZEpcKh WTHe4zPC30XiiwhqyyXi9npwRGdN22CSND2HeGT2qg== X-Google-Smtp-Source: ACHHUZ76Y66cWKD2qXcW7CQzKUopeB7UOAgGyyyKy2ut2UkLRdHY4ifL6C9wACwfDiUQd6RcsBckTQ== X-Received: by 2002:a19:7604:0:b0:4f5:e688:25c7 with SMTP id c4-20020a197604000000b004f5e68825c7mr540279lff.38.1685613392768; Thu, 01 Jun 2023 02:56:32 -0700 (PDT) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id h12-20020a5d6e0c000000b002ca864b807csm9889531wrz.0.2023.06.01.02.56.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 02:56:32 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Thu, 1 Jun 2023 10:56:29 +0100 Message-Id: <20230601095630.25443-3-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230601095630.25443-1-naush@raspberrypi.com> References: <20230601095630.25443-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v1 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 Cc: nick.hollinghurst@raspberrypi.com 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 --- 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; }