[{"id":22707,"web_url":"https://patchwork.libcamera.org/comment/22707/","msgid":"<164992678010.22830.6365696772853496688@Monstersaurus>","date":"2022-04-14T08:59:40","subject":"Re: [libcamera-devel] [RFC v1 4/5] libcamera: pipeline: ipu3: Get\n\tVCM information","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Kate Hsuan via libcamera-devel (2022-04-14 08:43:41)\n> It is an interface of CameraData to get the VCM steps. Also, the VCM step\n> value is stored in ConfigInfo.\n> \n> Signed-off-by: Kate Hsuan<hpa@redhat.com>\n> ---\n>  src/libcamera/pipeline/ipu3/ipu3.cpp | 15 +++++++++++++++\n>  1 file changed, 15 insertions(+)\n> \n> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> index 9f113171..9cc12e4c 100644\n> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> @@ -85,6 +85,8 @@ public:\n>  \n>         ControlInfoMap ipaControls_;\n>  \n> +       int getSensorControls();\n> +\n>  private:\n>         void metadataReady(unsigned int id, const ControlList &metadata);\n>         void paramsBufferReady(unsigned int id);\n> @@ -670,6 +672,7 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)\n>         configInfo.sensorInfo = sensorInfo;\n>         configInfo.bdsOutputSize = config->imguConfig().bds;\n>         configInfo.iif = config->imguConfig().iif;\n> +       configInfo.sensorInfo.maxVcmSteps = data->getSensorControls();\n\nThis doesn't sound right - \n    maxVcmSteps = getSensorControls?\n\n\n>         ret = data->ipa_->configure(configInfo, &data->ipaControls_);\n>         if (ret) {\n> @@ -1271,6 +1274,18 @@ void IPU3CameraData::setSensorControls([[maybe_unused]] unsigned int id,\n>         focusLens->setFocusPosition(focusValue.get<int32_t>());\n>  }\n>  \n> +int IPU3CameraData::getSensorControls()\n> +{\n> +       int ret = 0;\n> +\n> +       CameraLens *focusLens = cio2_.sensor()->focusLens();\n> +       if (!focusLens)\n> +               return 0;\n> +\n> +       ret = focusLens->getFocusCapabilityies();\n\nCapabilities\n\nBut ... I think all of this needs some rework.  This is getting lens\ncontrols, not sensor controls. And lens controls should be a control\nlist - not returning 'all' controls as a single value which is actually\nonly one value of one control?\n\n> +       return ret;\n> +}\n> +\n>  void IPU3CameraData::paramsBufferReady(unsigned int id)\n>  {\n>         IPU3Frames::Info *info = frameInfos_.find(id);\n> -- \n> 2.35.1\n>","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 D947DC0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 14 Apr 2022 08:59:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 325DD65645;\n\tThu, 14 Apr 2022 10:59:44 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E9596604B6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Apr 2022 10:59:42 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8330C25B;\n\tThu, 14 Apr 2022 10:59:42 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1649926784;\n\tbh=E+Sklghs+0Gx7VlsOEpX5DBtBfOMU3VmF5OUTrbbT6k=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=g5lJKrHGgLGazHAxsvvLm5vrzfxI3dh3pqevVBcliP1PkAplkpTn33/MdL2bqg7It\n\tzNnSuXLJsVU3Ulxar15XgBDL2qyhxp0u2TxYNrTWxQs1sgCWdMFQ0oX2uT7z6BK4xu\n\tD/7NRAO39VDbRa1DCKMrfMB++rvG7n1ug/UcAxVav41MRbWD6ryD5bYLf5Q0PBq31V\n\tWhODO4a1Si+TqWr2q6olVTdhxjEalaRWZU51lJwYaY4SgSMJfeTbkovE950hokEwVs\n\tCVeP/NpDmPB+QfjfSwFY4xdqr7lkmVX2ZnV2qOv3UfMrmxh5yzoluCrW3QkW2fJzBm\n\t4tN+3i/+qGJ7Q==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1649926782;\n\tbh=E+Sklghs+0Gx7VlsOEpX5DBtBfOMU3VmF5OUTrbbT6k=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=lI2/yo6nGrlx0aPp7Xl98WdttN6bKlwLPvBHq0sz/6cxQcmTLZpzKf6ofe19w4zwG\n\tFIWYZSOxodi3YhGtPuRszqCruvOQfpGCuKj+9jftWurQ3w6PJ9v1OorNKLCw70c6ac\n\tFWvU4+R8pSZOSo3n1XsqXc69ADykuCFc7Et2wXz4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"lI2/yo6n\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20220414074342.7455-5-hpa@redhat.com>","References":"<20220414074342.7455-1-hpa@redhat.com>\n\t<20220414074342.7455-5-hpa@redhat.com>","To":"Kate Hsuan <hpa@redhat.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","Date":"Thu, 14 Apr 2022 09:59:40 +0100","Message-ID":"<164992678010.22830.6365696772853496688@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [RFC v1 4/5] libcamera: pipeline: ipu3: Get\n\tVCM information","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":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":22719,"web_url":"https://patchwork.libcamera.org/comment/22719/","msgid":"<CAEth8oHB7B2YgywGPOw4WXf08tuY2T7JOfOVzp4EeF8ufnw8wA@mail.gmail.com>","date":"2022-04-15T06:46:38","subject":"Re: [libcamera-devel] [RFC v1 4/5] libcamera: pipeline: ipu3: Get\n\tVCM information","submitter":{"id":105,"url":"https://patchwork.libcamera.org/api/people/105/","name":"Kate Hsuan","email":"hpa@redhat.com"},"content":"Hi Kieran,\n\nOn Thu, Apr 14, 2022 at 4:59 PM Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> Quoting Kate Hsuan via libcamera-devel (2022-04-14 08:43:41)\n> > It is an interface of CameraData to get the VCM steps. Also, the VCM step\n> > value is stored in ConfigInfo.\n> >\n> > Signed-off-by: Kate Hsuan<hpa@redhat.com>\n> > ---\n> >  src/libcamera/pipeline/ipu3/ipu3.cpp | 15 +++++++++++++++\n> >  1 file changed, 15 insertions(+)\n> >\n> > diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > index 9f113171..9cc12e4c 100644\n> > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > @@ -85,6 +85,8 @@ public:\n> >\n> >         ControlInfoMap ipaControls_;\n> >\n> > +       int getSensorControls();\n> > +\n> >  private:\n> >         void metadataReady(unsigned int id, const ControlList &metadata);\n> >         void paramsBufferReady(unsigned int id);\n> > @@ -670,6 +672,7 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)\n> >         configInfo.sensorInfo = sensorInfo;\n> >         configInfo.bdsOutputSize = config->imguConfig().bds;\n> >         configInfo.iif = config->imguConfig().iif;\n> > +       configInfo.sensorInfo.maxVcmSteps = data->getSensorControls();\n>\n> This doesn't sound right -\n>     maxVcmSteps = getSensorControls?\n>\n>\n> >         ret = data->ipa_->configure(configInfo, &data->ipaControls_);\n> >         if (ret) {\n> > @@ -1271,6 +1274,18 @@ void IPU3CameraData::setSensorControls([[maybe_unused]] unsigned int id,\n> >         focusLens->setFocusPosition(focusValue.get<int32_t>());\n> >  }\n> >\n> > +int IPU3CameraData::getSensorControls()\n> > +{\n> > +       int ret = 0;\n> > +\n> > +       CameraLens *focusLens = cio2_.sensor()->focusLens();\n> > +       if (!focusLens)\n> > +               return 0;\n> > +\n> > +       ret = focusLens->getFocusCapabilityies();\n>\n> Capabilities\n>\n> But ... I think all of this needs some rework.  This is getting lens\n> controls, not sensor controls. And lens controls should be a control\n> list - not returning 'all' controls as a single value which is actually\n> only one value of one control?\n\nI could try to modify this part since I only would like to get the max\nvalue of VCM. I'll update this in v2.\n\nThank you\n\n\n\n>\n> > +       return ret;\n> > +}\n> > +\n> >  void IPU3CameraData::paramsBufferReady(unsigned int id)\n> >  {\n> >         IPU3Frames::Info *info = frameInfos_.find(id);\n> > --\n> > 2.35.1\n> >\n>\n\n\n--\nBR,\nKate","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 1EBC7C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Apr 2022 06:46:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4CF6465644;\n\tFri, 15 Apr 2022 08:46:56 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 01AF165640\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Apr 2022 08:46:53 +0200 (CEST)","from mail-lf1-f72.google.com (mail-lf1-f72.google.com\n\t[209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n\tus-mta-587-5q51OX-jNaygHAe7EGAOxw-1; Fri, 15 Apr 2022 02:46:51 -0400","by mail-lf1-f72.google.com with SMTP id\n\td4-20020a05651221c400b0046ba0689478so3241087lft.21\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Apr 2022 23:46:51 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1650005216;\n\tbh=CGVOLe5Jjmru7tHzXJSVlxkl4vm1/IAvZFoYBW9rK98=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=S3iKaL9veR+IoFzrrNht+BwbYXuhCCJuVkP6y0ZSKcpysChrGRj4f4XxlCFvWuJUg\n\tLm4v7ZaRR26Zri5ySZ7YtvyMyOwB8ondR0KENi2/szdH+V8AvF4CMv8isPIeyJ2CxW\n\t9qCtQBuuGJLZeCClUMIhCxj4DkQ24UnB+ENZXuyk9cdSa/9qF0nXsd/xPV+/2lOjNn\n\t6qRMWqZBTAVyJ58JrTwV8pY9AvzEgUlQfFa7xFFA35GGkPHl3n01XHzchjgR7oZ1E7\n\t/vU0obYvYqRxd/9RTp85vPbPuUprSi4XOPCc/Toi+bPOXy3QjRcbi7OFU5CRW5Y5Vn\n\t4n7zOAfAOnLxg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1650005212;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=TbDw++0J//1MQ32TU5EleytCSWaufX4M/Pz4Cl7ttEU=;\n\tb=f4h411ytsBd812shnIurD8Td7yUsE9hJrs7hRkEQ0LHhn14vG2rPfp+lbgWYfnruz30r3U\n\t1AiklaC8SSSvf+ly9IgNDCR9fHFe2E39DbZz6D/geCRzw2Gqmjykq/XqoHz2yhn2Tga4rP\n\tb3byiRmArtnzIU9B9H7iTth2lV6EYzQ="],"Authentication-Results":["lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"f4h411yt\"; \n\tdkim-atps=neutral","relay.mimecast.com;\n\tauth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hpa@redhat.com"],"X-MC-Unique":"5q51OX-jNaygHAe7EGAOxw-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=TbDw++0J//1MQ32TU5EleytCSWaufX4M/Pz4Cl7ttEU=;\n\tb=a7TumA6juOYj8k8w0WJyG0727NShDpwFo/jIPLunymiN8p/65IjQTOiq3XIaJAYO34\n\tF2vMelOM4SVhQvfk+FYJeUdoyAH7xh6lp7ZGcf46DmeqZpXL4jXML0/i1t8dUJkavWPe\n\t2w/cnnHfq6SKrPbwF6/RXRe1BoQInBwT4X5jsFNVFDZkrM2kDw71ht8Z1P1vviPkFI7O\n\tbco7QgNJD6UsSf7GlzsiGWBEBZFVNh1QeSoaG1eu9+APevTVRxFov85hNi9lkdl19gnr\n\tZMOV8gebsJSaVZEC25+V39lsAf1XfKF8wb37vWk8/ltlM7R0bM+S6ShC+XKP0rz5ZtNc\n\t1qUQ==","X-Gm-Message-State":"AOAM533HrSbg4/7U0Y3NbX4hrZB4rVA7SkOsEMkGn7WFPtyd2Fx6zGQi\n\ttIl/cFAIYuhCopznTV+IUu5FLE/wLCzjOu5AckT9X4LBAd3A+3LUutesJZDI4cPpKpyEw36Euki\n\tSREj1F5cmVCpiAoybQISYDoTRkLEA2g/aYZ3kOTR5/3p3vvMyHw==","X-Received":["by 2002:a05:6512:3e1e:b0:46d:aae8:22a5 with SMTP id\n\ti30-20020a0565123e1e00b0046daae822a5mr2508572lfv.238.1650005209875; \n\tThu, 14 Apr 2022 23:46:49 -0700 (PDT)","by 2002:a05:6512:3e1e:b0:46d:aae8:22a5 with SMTP id\n\ti30-20020a0565123e1e00b0046daae822a5mr2508561lfv.238.1650005209460;\n\tThu, 14 Apr 2022 23:46:49 -0700 (PDT)"],"X-Google-Smtp-Source":"ABdhPJzyqJruNykFrkELFehyYj8hogiwM9/RNIFDP5uR+Kojosp+/wreTSk9GpBqcJQ3wMxs8phv9aGyD31NucxAWsY=","MIME-Version":"1.0","References":"<20220414074342.7455-1-hpa@redhat.com>\n\t<20220414074342.7455-5-hpa@redhat.com>\n\t<164992678010.22830.6365696772853496688@Monstersaurus>","In-Reply-To":"<164992678010.22830.6365696772853496688@Monstersaurus>","Date":"Fri, 15 Apr 2022 14:46:38 +0800","Message-ID":"<CAEth8oHB7B2YgywGPOw4WXf08tuY2T7JOfOVzp4EeF8ufnw8wA@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [RFC v1 4/5] libcamera: pipeline: ipu3: Get\n\tVCM information","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":"Kate Hsuan via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Kate Hsuan <hpa@redhat.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]