[{"id":22764,"web_url":"https://patchwork.libcamera.org/comment/22764/","msgid":"<20220421101626.qqj3oxftbfden647@uno.localdomain>","date":"2022-04-21T10:16:26","subject":"Re: [libcamera-devel] [RFC PATCH v2 3/4] libcamera: pipeline: ipu3:\n\tGet and set VCM information","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Kate\n\nOn Thu, Apr 21, 2022 at 03:28:47PM +0800, Kate Hsuan via libcamera-devel wrote:\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 fd989e61..d1a1d21c 100644\n> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> @@ -86,6 +86,8 @@ public:\n>\n>  \tControlInfoMap ipaControls_;\n>\n> +\tint getMaxLensSteps();\n> +\n>  private:\n>  \tvoid metadataReady(unsigned int id, const ControlList &metadata);\n>  \tvoid paramsBufferReady(unsigned int id);\n> @@ -667,6 +669,7 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)\n>  \tCameraLens *lens = data->cio2_.sensor()->focusLens();\n>  \tif (lens)\n>  \t\tconfigInfo.lensControls = lens->controls();\n> +\tsensorInfo.maxVcmSteps = data->getMaxLensSteps();\n\nIs a dedicated function necessary ?\n\nCan't it just be\n\n        if (lens) {\n  \t\tconfigInfo.lensControls = lens->controls();\n                sensorInfo.maxVcmSteps = lens->getMaxFocusStep();\n        }\n\nThanks\n   j\n\n>\n>  \tconfigInfo.sensorInfo = sensorInfo;\n>  \tconfigInfo.bdsOutputSize = config->imguConfig().bds;\n> @@ -1272,6 +1275,18 @@ void IPU3CameraData::setSensorControls([[maybe_unused]] unsigned int id,\n>  \tfocusLens->setFocusPosition(focusValue.get<int32_t>());\n>  }\n>\n> +int IPU3CameraData::getMaxLensSteps()\n> +{\n> +\tint ret = 0;\n> +\n> +\tCameraLens *focusLens = cio2_.sensor()->focusLens();\n> +\tif (!focusLens)\n> +\t\treturn 0;\n> +\n> +\tret = focusLens->getMaxFocusStep();\n> +\treturn ret;\n> +}\n> +\n>  void IPU3CameraData::paramsBufferReady(unsigned int id)\n>  {\n>  \tIPU3Frames::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 B6A50C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Apr 2022 10:16:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 12F5065644;\n\tThu, 21 Apr 2022 12:16:30 +0200 (CEST)","from relay10.mail.gandi.net (relay10.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2530165641\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Apr 2022 12:16:29 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 79543240005;\n\tThu, 21 Apr 2022 10:16:28 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1650536190;\n\tbh=pNcf7Rn4dSeeNy/i2l7P6+DJOw4qcuq24pwBRCadf6Q=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=3zll/ycJobi4YM3rZ7Yz0eo9mXEug9LHOJniNQ/lUnGU/VwyzLQwQaBGkUeCEDZw+\n\tYdiKAue82S8vNKtj4c4gKbehVcDobKpJSG1Sry5J12UcsnvR+DhDz+LnhCuiYS/gFp\n\tMJlU1QbsxSJQI4VT5ZieG45U1Ar4EFS0h5ZGj4kfmffqvtUfVXpzlfw9haN4iUszzk\n\tyYG0lxcEvk+gkaJwXWXRSSgTd0UtH1kDyoSrU0dP150Z/4Jf4alREWH8YX5+JxnIvB\n\tf8k6cJR5O22cdLxwFWj7WGW84P7yYsqPXybXaKvq2SBFvTkyY9iyMk+PXeW07CEUvA\n\tgJk71SCEIWlXg==","Date":"Thu, 21 Apr 2022 12:16:26 +0200","To":"Kate Hsuan <hpa@redhat.com>","Message-ID":"<20220421101626.qqj3oxftbfden647@uno.localdomain>","References":"<20220421072848.6752-1-hpa@redhat.com>\n\t<20220421072848.6752-4-hpa@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220421072848.6752-4-hpa@redhat.com>","Subject":"Re: [libcamera-devel] [RFC PATCH v2 3/4] libcamera: pipeline: ipu3:\n\tGet and set VCM 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":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","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>"}},{"id":22777,"web_url":"https://patchwork.libcamera.org/comment/22777/","msgid":"<CAEth8oFeQb1tG1OKYo6WRQHUepHUZmL8an9ZOySOewzEQo1ffA@mail.gmail.com>","date":"2022-04-25T01:21:09","subject":"Re: [libcamera-devel] [RFC PATCH v2 3/4] libcamera: pipeline: ipu3:\n\tGet and set VCM information","submitter":{"id":105,"url":"https://patchwork.libcamera.org/api/people/105/","name":"Kate Hsuan","email":"hpa@redhat.com"},"content":"Hi Jacopo,\n\nOn Thu, Apr 21, 2022 at 6:16 PM Jacopo Mondi <jacopo@jmondi.org> wrote:\n>\n> Hi Kate\n>\n> On Thu, Apr 21, 2022 at 03:28:47PM +0800, Kate Hsuan via libcamera-devel wrote:\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 fd989e61..d1a1d21c 100644\n> > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > @@ -86,6 +86,8 @@ public:\n> >\n> >       ControlInfoMap ipaControls_;\n> >\n> > +     int getMaxLensSteps();\n> > +\n> >  private:\n> >       void metadataReady(unsigned int id, const ControlList &metadata);\n> >       void paramsBufferReady(unsigned int id);\n> > @@ -667,6 +669,7 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)\n> >       CameraLens *lens = data->cio2_.sensor()->focusLens();\n> >       if (lens)\n> >               configInfo.lensControls = lens->controls();\n> > +     sensorInfo.maxVcmSteps = data->getMaxLensSteps();\n>\n> Is a dedicated function necessary ?\n>\n> Can't it just be\n>\n>         if (lens) {\n>                 configInfo.lensControls = lens->controls();\n>                 sensorInfo.maxVcmSteps = lens->getMaxFocusStep();\n>         }\n>\n> Thanks\n>    j\n>\n\nThank you for addressing this.\nIt should be under \"if\". I will modify this in my v3.\n\n\n> >\n> >       configInfo.sensorInfo = sensorInfo;\n> >       configInfo.bdsOutputSize = config->imguConfig().bds;\n> > @@ -1272,6 +1275,18 @@ void IPU3CameraData::setSensorControls([[maybe_unused]] unsigned int id,\n> >       focusLens->setFocusPosition(focusValue.get<int32_t>());\n> >  }\n> >\n> > +int IPU3CameraData::getMaxLensSteps()\n> > +{\n> > +     int ret = 0;\n> > +\n> > +     CameraLens *focusLens = cio2_.sensor()->focusLens();\n> > +     if (!focusLens)\n> > +             return 0;\n> > +\n> > +     ret = focusLens->getMaxFocusStep();\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>","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 A17B5C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 25 Apr 2022 01:21:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D1CC365644;\n\tMon, 25 Apr 2022 03:21:29 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 27A63604A8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 25 Apr 2022 03:21:25 +0200 (CEST)","from mail-lf1-f71.google.com (mail-lf1-f71.google.com\n\t[209.85.167.71]) 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-604-sri1DGAtNvyKoKrOl6AHcA-1; Sun, 24 Apr 2022 21:21:23 -0400","by mail-lf1-f71.google.com with SMTP id\n\tv13-20020a056512096d00b004487e1503d0so5656924lft.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 24 Apr 2022 18:21:23 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1650849689;\n\tbh=8fT84LpfVfFjKxNrxWuSgX1mFrjF5N8LZyxp/8pS/OI=;\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=fBCjYXDBnGFqpRN4fp6UWASp6P3HHXCSMFzxWNrflFgO4agk1jKHQj4YUaPeT+LGS\n\thpEs+KeZWjrlFtzNl7t/YEc0VDzTaQYTzNfYPU4EM+Rh4uGY8bCEgePVb/KqcPOK2I\n\tcHFto6UB4X76dYjdohMcGGH1HCLGArGQfAnB06cV0t35ptKayQJQ8qsI664ME1hvcA\n\taEf/4BrjHn5EFp7y6Mls4cYNHTtOZfnL72UDQY+5K8/bhQysmT8tluR6LsS8IhWHXn\n\tlE+L4OWUIpw3v/la2296dzPtYIdgeVEe+bWIwBHhbb7nTmpU0CjmU2WWERq3u8SJlE\n\tnHHSPVnFXuvRA==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1650849684;\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=9bLCwkjdZIxBg1I6PTFxm6f/dBa+8KWmCIUCK0A4Pz4=;\n\tb=VhTyxU6jvkQlDhjoLB8pvHuT0zgfGsLX36CPPxZ2mym6E9Rdwd5jX3Qaia1E1KOzOX93lo\n\trp/6t4ewSw2h8Vgcxmhp0Ja3dNTkS+EfMhfZe0K0ZNa7DjmL9gpxlP/Ujhm7UKYXbNNlGi\n\txjrhD+nzB3gLaEnp9/qZB1s6Z2mI8Cs="],"Authentication-Results":["lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"VhTyxU6j\"; \n\tdkim-atps=neutral","relay.mimecast.com;\n\tauth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hpa@redhat.com"],"X-MC-Unique":"sri1DGAtNvyKoKrOl6AHcA-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=9bLCwkjdZIxBg1I6PTFxm6f/dBa+8KWmCIUCK0A4Pz4=;\n\tb=LO7+uODFm428RMW29FvE/H+MtCM7QKBh4ncHDrYHUFd0D8mXewRdcPA9iQAUM2Pn8q\n\t0cBOVFac0a2kX4I0PwZWp95anajV8VisuzinxW530ziAVXUdmKpGLaO56yZCxwjBfv8d\n\tdogM2YF7mEim+3gocbw8vA4fk55Ehs4KHe9sGeO2g9qINKJOoCfxcy//RjYBwp2BAlBp\n\txoYlWDYsSz1hFkeofv8Q11qO4q1hIXxJd3/xtzsH19YRmeLJM1pxE8bkWA2O/yoOj3oR\n\tFRTzuBS69TI62CiBry7ECLarBh9h2HZuA6u5IQKBZSdO95v+EaQhCFkeDFYLfVHN/Wco\n\tMbww==","X-Gm-Message-State":"AOAM531oi8l3vbqThKwfmfpVkq7HIHjxm2XYKEcVdP2PlN0y4jf5iOes\n\t8iCpuZ1o44sH/6o0Wfg2CI3vt/rbSo1akxdqVeY97gijSh1Y5ynJDf6EfbG3lK5Uy27vW44at9v\n\tk/zrdiALZDnU28Y8F0udn/REN4OvCvGcFemdVzOIUh+Lw4rNp0g==","X-Received":["by 2002:ac2:4250:0:b0:44a:ff88:3795 with SMTP id\n\tm16-20020ac24250000000b0044aff883795mr11512058lfl.384.1650849681609; \n\tSun, 24 Apr 2022 18:21:21 -0700 (PDT)","by 2002:ac2:4250:0:b0:44a:ff88:3795 with SMTP id\n\tm16-20020ac24250000000b0044aff883795mr11512045lfl.384.1650849681175;\n\tSun, 24 Apr 2022 18:21:21 -0700 (PDT)"],"X-Google-Smtp-Source":"ABdhPJwTkMApArVTGicsmSNdry7Df4Zu8p8cyXMGtBl/ZgM8nBcZBst/tyCjmnOZls3xGUCMZXtamYoccwfirnMOUMU=","MIME-Version":"1.0","References":"<20220421072848.6752-1-hpa@redhat.com>\n\t<20220421072848.6752-4-hpa@redhat.com>\n\t<20220421101626.qqj3oxftbfden647@uno.localdomain>","In-Reply-To":"<20220421101626.qqj3oxftbfden647@uno.localdomain>","Date":"Mon, 25 Apr 2022 09:21:09 +0800","Message-ID":"<CAEth8oFeQb1tG1OKYo6WRQHUepHUZmL8an9ZOySOewzEQo1ffA@mail.gmail.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [RFC PATCH v2 3/4] libcamera: pipeline: ipu3:\n\tGet and set VCM 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>"}}]