{"id":18676,"url":"https://patchwork.libcamera.org/api/1.1/patches/18676/?format=json","web_url":"https://patchwork.libcamera.org/patch/18676/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20230601095630.25443-3-naush@raspberrypi.com>","date":"2023-06-01T09:56:29","name":"[libcamera-devel,v1,2/3] pipeline: ipa: rpi: Return lens controls from ipa->configure()","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"2642a0eeeed886632547db3cf9091c4198f7f98d","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/1.1/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18676/mbox/","series":[{"id":3898,"url":"https://patchwork.libcamera.org/api/1.1/series/3898/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3898","date":"2023-06-01T09:56:27","name":"Default lens behaviour","version":1,"mbox":"https://patchwork.libcamera.org/series/3898/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/18676/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18676/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 7AA99C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  1 Jun 2023 09:56:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CAF3862728;\n\tThu,  1 Jun 2023 11:56:35 +0200 (CEST)","from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com\n\t[IPv6:2a00:1450:4864:20::12d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D868161EA6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  1 Jun 2023 11:56:33 +0200 (CEST)","by mail-lf1-x12d.google.com with SMTP id\n\t2adb3069b0e04-4f4f3ac389eso696882e87.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 01 Jun 2023 02:56:33 -0700 (PDT)","from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\th12-20020a5d6e0c000000b002ca864b807csm9889531wrz.0.2023.06.01.02.56.32\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 01 Jun 2023 02:56:32 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1685613395;\n\tbh=jabNdxQhE/cZdftzMydsN8IaMWF9JGrkVzkGrMjt2EI=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=GOUM5SzrPZbPHhLUYYi2IzzLLjT1bLXtJ0By78rbdxSB3llbDTR2/sMK0xRyTrYoU\n\tpe6gMJ+C8/u0m8kpTPsFIU0+kayfju//SdC2xwI212B3yo3K+4dU4rJ7zdqPYRBPNy\n\tGTIOG0kBR/g9WXXklYEBUE4KP1OV+eqnDxf1CCBvc1poK1c5kfyGJLIJU+PiZolVgV\n\tJSKjWDRm9mkSRMGAQ1nMi2ANtvoKR+PtMIJL5fyTWLxjsAx/MznLgg4pOKQYoo47Lm\n\tShabMs1WvHgv/0ABXSIpT1lWoZ41oM6mQ9aN67u+jDoUKE09CLJvQ+8asLl7cKlCt8\n\tnOCVt8UfTrCwA==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1685613393; x=1688205393;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=NlJiT1ineFBInzSUOiuRRKdEbpZiPS259mnUIH2WI/U=;\n\tb=BX6gqQ3KcR+d14lOFpt4uRDWINf1BhF+WzBW0NN1e2JnaJHcXaOC5aTUl+0Qtp5KML\n\tZ8absoi8JHyiRcBLSbVUWvT4r7+hvyvE6HgCrbHLpmEb3SOSRJIUUKNT4btD78X4cyD1\n\tNqw4+op5P+uBUafjpPcHX4FikM8piezgKETCYiBRrVICteZOBGEhsAKzaEHMip97RkUn\n\tzWs93d/y3xfFzKRTO7+HaKu/AVEpJy9g5TchGIub0UT1pgu3CO8Hwo+iLVVMoRvKsRsy\n\tvhMhIIEduY0S1VitrBUmacS0cAgYVX4eXDleZBb2YFFLeH2KneGSjn7a4oPpmfu9GKHU\n\tGh4Q=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"BX6gqQ3K\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1685613393; x=1688205393;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=NlJiT1ineFBInzSUOiuRRKdEbpZiPS259mnUIH2WI/U=;\n\tb=V6lxnBgN6/de1iYJDkukv8YYkQBsu0XWPz7wU6FyrRCJdH+mG0TraSPhQVC8UE19+e\n\trPd5J3ulyjxbzq6ce8cfxRhqzyO+kCWM2xL3wfuImSlR0umcyJITqgyO1X6E9Do7q6fn\n\tBuSBHsIznmVSVE4B7lcq63l7IOYcRsSBD84Yvb4tXNstKINB/CcN5wbPwx3sc5xwtnUR\n\tbARnzoPbqpp7/F//tgZ/5gsvE2frkRgdFrtfDiIe0+uJ/tlNlKRqTC1IyS0aXjpcafsm\n\tiZFbL4GWcLX6OqDeZkutweHjfu+Rcu3zWR2eNTWuEZZnvhN2cA42rD30IRchhTiX5F0+\n\t7kXw==","X-Gm-Message-State":"AC+VfDz+emGSYrfB+MeJlDgoyN9gfJGMjfR9UEuShiznNBz4GEZEpcKh\n\tWTHe4zPC30XiiwhqyyXi9npwRGdN22CSND2HeGT2qg==","X-Google-Smtp-Source":"ACHHUZ76Y66cWKD2qXcW7CQzKUopeB7UOAgGyyyKy2ut2UkLRdHY4ifL6C9wACwfDiUQd6RcsBckTQ==","X-Received":"by 2002:a19:7604:0:b0:4f5:e688:25c7 with SMTP id\n\tc4-20020a197604000000b004f5e68825c7mr540279lff.38.1685613392768; \n\tThu, 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","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v1 2/3] pipeline: ipa: rpi: Return lens\n\tcontrols from ipa->configure()","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"nick.hollinghurst@raspberrypi.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"In addition to sensor controls, return lens controls from\nIpaBase::configure() back to the pipeline handler. If there are lens\ncontrols present in the ControlList, action them in the pipeline handler\nas part of the configure routine.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n include/libcamera/ipa/raspberrypi.mojom             | 3 ++-\n src/ipa/rpi/common/ipa_base.cpp                     | 2 +-\n src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 6 ++++--\n 3 files changed, 7 insertions(+), 4 deletions(-)","diff":"diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\nindex ba786e647ca1..4f20792e4679 100644\n--- a/include/libcamera/ipa/raspberrypi.mojom\n+++ b/include/libcamera/ipa/raspberrypi.mojom\n@@ -46,7 +46,8 @@ struct ConfigParams {\n struct ConfigResult {\n \tfloat modeSensitivity;\n \tlibcamera.ControlInfoMap controlInfo;\n-\tlibcamera.ControlList controls;\n+\tlibcamera.ControlList sensorControls;\n+\tlibcamera.ControlList lensControls;\n };\n \n struct StartResult {\ndiff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\nindex db7a0eb3a1ca..599ad146a863 100644\n--- a/src/ipa/rpi/common/ipa_base.cpp\n+++ b/src/ipa/rpi/common/ipa_base.cpp\n@@ -201,7 +201,7 @@ int32_t IpaBase::configure(const IPACameraSensorInfo &sensorInfo, const ConfigPa\n \t\tapplyAGC(&agcStatus, ctrls);\n \t}\n \n-\tresult->controls = std::move(ctrls);\n+\tresult->sensorControls = std::move(ctrls);\n \n \t/*\n \t * Apply the correct limits to the exposure, gain and frame duration controls\ndiff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\nindex 3bb5ec531e4f..2ab0b971149a 100644\n--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n@@ -1192,8 +1192,10 @@ int CameraData::configureIPA(const CameraConfiguration *config, ipa::RPi::Config\n \t\treturn -EPIPE;\n \t}\n \n-\tif (!result->controls.empty())\n-\t\tsetSensorControls(result->controls);\n+\tif (!result->sensorControls.empty())\n+\t\tsetSensorControls(result->sensorControls);\n+\tif (!result->lensControls.empty())\n+\t\tsetLensControls(result->lensControls);\n \n \treturn 0;\n }\n","prefixes":["libcamera-devel","v1","2/3"]}