[{"id":25546,"web_url":"https://patchwork.libcamera.org/comment/25546/","msgid":"<Y1aYZp1Y4e6KBWsZ@pendragon.ideasonboard.com>","date":"2022-10-24T13:51:34","subject":"Re: [libcamera-devel] [PATCH 04/11] Adds metadata for the ov8858,\n\twhich the PinePhone Pro uses.","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Nicholas,\n\nThank you for the patch.\n\nOn Mon, Oct 24, 2022 at 12:55:36AM -0500, Nicholas Roth via libcamera-devel wrote:\n> From: Nicholas Roth <nicholas@rothemail.net>\n> \n> ---\n>  src/ipa/libipa/camera_sensor_helper.cpp    | 11 +++++++++++\n>  src/libcamera/camera_sensor_properties.cpp | 14 ++++++++++++++\n>  2 files changed, 25 insertions(+)\n> \n> diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\n> index 35056bec..1d9a45a7 100644\n> --- a/src/ipa/libipa/camera_sensor_helper.cpp\n> +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n> @@ -476,6 +476,17 @@ public:\n>  };\n>  REGISTER_CAMERA_SENSOR_HELPER(\"ov5693\", CameraSensorHelperOv5693)\n>  \n> +class CameraSensorHelperOv8858 : public CameraSensorHelper\n> +{\n> +public:\n> +\tCameraSensorHelperOv8858()\n> +\t{\n> +\t\tgainType_ = AnalogueGainLinear;\n> +\t\tgainConstants_.linear = { 1, 0, 0, 128 };\n\nLooking at\nhttp://www.ahdsensor.com/uploadfile/202008/55322e75316871.pdf, this\ndoesn't seem to match the description of the gain controls in table 5-8.\nIn \"real gain\" mode, the gain registers seem to be expressed in Q4.4\nformat.\n\n> +\t}\n> +};\n> +REGISTER_CAMERA_SENSOR_HELPER(\"m00_f_ov8858\", CameraSensorHelperOv8858)\n> +\n>  class CameraSensorHelperOv8865 : public CameraSensorHelper\n>  {\n>  public:\n> diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp\n> index e5f27f06..d0757c15 100644\n> --- a/src/libcamera/camera_sensor_properties.cpp\n> +++ b/src/libcamera/camera_sensor_properties.cpp\n> @@ -146,6 +146,20 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \t\t\t\t */\n>  \t\t\t},\n>  \t\t} },\n> +\t\t{ \"m00_f_ov8858\", {\n\nI'm surprised by the name here. Is this from the mainline driver ?\n\n> +\t\t\t.unitCellSize = { 1200, 1200 },\n> +\t\t\t.testPatternModes = {\n> +\t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n> +\t\t\t\t{ controls::draft::TestPatternModeColorBars, 1 },\n> +\t\t\t\t/*\n> +\t\t\t\t * No best corresponding test pattern for:\n> +\t\t\t\t * 1: \"Vertical Color Bar Type 1\",\n> +\t\t\t\t * 2: \"Vertical Color Bar Type 2\",\n> +\t\t\t\t * 3: \"Vertical Color Bar Type 3\",\n> +\t\t\t\t * 4: \"Vertical Color Bar Type 4\"\n> +\t\t\t\t */\n> +\t\t\t},\n> +\t\t} },\n>  \t\t{ \"ov8865\", {\n>  \t\t\t.unitCellSize = { 1400, 1400 },\n>  \t\t\t.testPatternModes = {","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 E90F2BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 Oct 2022 13:52:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 313BE62F19;\n\tMon, 24 Oct 2022 15:52:01 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D7F962EC6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Oct 2022 15:52:00 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 835108BF;\n\tMon, 24 Oct 2022 15:51:59 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666619521;\n\tbh=pbCqmL4ayp7PnsUTDoktnyyRwDk2PwwAfOTSnnMz74Q=;\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=YEi4XMPYqGedR3McijHhsmHkAqpODkmmVPicE9tOQdSfvM2OWCJTBrhyCsATzX+ix\n\td7A/SHw2faBFUWoEZOHtSdBR3qS5CeIPsL5p5LRfdjHLrjJuz0+/MRnEWQpnmovc4i\n\tRP3IMslNK1rEfccm2PuKsjDDZVFroA5HHfg9ItEQ5ZZXiZPHrWJkkrlHBPwUPkHivc\n\tK39bNsAcx3miiDv8tLLQ5eLDVt0Ze0C98kQwTEGGGUZzY8m2Ip+xyeCH1KAdg1NrdS\n\tXGBu3CdKt2pXhzN2H5EcEBkuTVj1CC8lJTHaiG0/2uYFahgWwK3o4Ure3E4Rox5YAW\n\teVJCf3g1+drGQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1666619519;\n\tbh=pbCqmL4ayp7PnsUTDoktnyyRwDk2PwwAfOTSnnMz74Q=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=rnAlXmBPjI0tmud8ku9QUt3p2uOHQPpQoMcFzt7bwQ43OplnoADlkloffrPvoo/TV\n\tArFl8cVb2XSINlum1+Oab3s1kkQC4CN5pZhl70Up/JOWZ4u25Ab+FttQUUzz8B0kgF\n\t80eAoxDoj51UVgEwCV1pFtXekawuDEWCytjKRJc0="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"rnAlXmBP\"; dkim-atps=neutral","Date":"Mon, 24 Oct 2022 16:51:34 +0300","To":"Nicholas Roth via libcamera-devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<Y1aYZp1Y4e6KBWsZ@pendragon.ideasonboard.com>","References":"<20221024055543.116040-1-nicholas@rothemail.net>\n\t<20221024055543.116040-5-nicholas@rothemail.net>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20221024055543.116040-5-nicholas@rothemail.net>","Subject":"Re: [libcamera-devel] [PATCH 04/11] Adds metadata for the ov8858,\n\twhich the PinePhone Pro uses.","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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"nicholas@rothemail.net","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25616,"web_url":"https://patchwork.libcamera.org/comment/25616/","msgid":"<CAD2rFCpXRVgYz=1KQ70QvdX4mjf+0YgDz3YP18a7Lxt9tceaBw@mail.gmail.com>","date":"2022-10-27T04:10:12","subject":"Re: [libcamera-devel] [PATCH 04/11] Adds metadata for the ov8858,\n\twhich the PinePhone Pro uses.","submitter":{"id":137,"url":"https://patchwork.libcamera.org/api/people/137/","name":"Nicholas Roth","email":"nicholas@rothemail.net"},"content":"> I'm surprised by the name here. Is this from the mainline driver ?\nMe too. It is what libcamera reports while I'm running the latest 5.x\nmainline kernel pushed to Arch/Manjaro as of 4 days ago.\n\n> Looking at\n> http://www.ahdsensor.com/uploadfile/202008/55322e75316871.pdf, this\n> doesn't seem to match the description of the gain controls in table 5-8.\n> In \"real gain\" mode, the gain registers seem to be expressed in Q4.4\n> format.\nI copy-pasted to get this working and forgot to come back! Fixed based on\nthe datasheet you linked by changing 128 to 16, which is the gain control\nreported by the datasheet. See forthcoming commit and commit message for\ndetails.\n\n-Nicholas\n\nOn Mon, Oct 24, 2022 at 8:52 AM Laurent Pinchart <\nlaurent.pinchart@ideasonboard.com> wrote:\n\n> Hi Nicholas,\n>\n> Thank you for the patch.\n>\n> On Mon, Oct 24, 2022 at 12:55:36AM -0500, Nicholas Roth via\n> libcamera-devel wrote:\n> > From: Nicholas Roth <nicholas@rothemail.net>\n> >\n> > ---\n> >  src/ipa/libipa/camera_sensor_helper.cpp    | 11 +++++++++++\n> >  src/libcamera/camera_sensor_properties.cpp | 14 ++++++++++++++\n> >  2 files changed, 25 insertions(+)\n> >\n> > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp\n> b/src/ipa/libipa/camera_sensor_helper.cpp\n> > index 35056bec..1d9a45a7 100644\n> > --- a/src/ipa/libipa/camera_sensor_helper.cpp\n> > +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n> > @@ -476,6 +476,17 @@ public:\n> >  };\n> >  REGISTER_CAMERA_SENSOR_HELPER(\"ov5693\", CameraSensorHelperOv5693)\n> >\n> > +class CameraSensorHelperOv8858 : public CameraSensorHelper\n> > +{\n> > +public:\n> > +     CameraSensorHelperOv8858()\n> > +     {\n> > +             gainType_ = AnalogueGainLinear;\n> > +             gainConstants_.linear = { 1, 0, 0, 128 };\n>\n> Looking at\n> http://www.ahdsensor.com/uploadfile/202008/55322e75316871.pdf, this\n> doesn't seem to match the description of the gain controls in table 5-8.\n> In \"real gain\" mode, the gain registers seem to be expressed in Q4.4\n> format.\n>\n> > +     }\n> > +};\n> > +REGISTER_CAMERA_SENSOR_HELPER(\"m00_f_ov8858\", CameraSensorHelperOv8858)\n> > +\n> >  class CameraSensorHelperOv8865 : public CameraSensorHelper\n> >  {\n> >  public:\n> > diff --git a/src/libcamera/camera_sensor_properties.cpp\n> b/src/libcamera/camera_sensor_properties.cpp\n> > index e5f27f06..d0757c15 100644\n> > --- a/src/libcamera/camera_sensor_properties.cpp\n> > +++ b/src/libcamera/camera_sensor_properties.cpp\n> > @@ -146,6 +146,20 @@ const CameraSensorProperties\n> *CameraSensorProperties::get(const std::string &sen\n> >                                */\n> >                       },\n> >               } },\n> > +             { \"m00_f_ov8858\", {\n>\n> I'm surprised by the name here. Is this from the mainline driver ?\n>\n> > +                     .unitCellSize = { 1200, 1200 },\n> > +                     .testPatternModes = {\n> > +                             { controls::draft::TestPatternModeOff, 0 },\n> > +                             {\n> controls::draft::TestPatternModeColorBars, 1 },\n> > +                             /*\n> > +                              * No best corresponding test pattern for:\n> > +                              * 1: \"Vertical Color Bar Type 1\",\n> > +                              * 2: \"Vertical Color Bar Type 2\",\n> > +                              * 3: \"Vertical Color Bar Type 3\",\n> > +                              * 4: \"Vertical Color Bar Type 4\"\n> > +                              */\n> > +                     },\n> > +             } },\n> >               { \"ov8865\", {\n> >                       .unitCellSize = { 1400, 1400 },\n> >                       .testPatternModes = {\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\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 B08AABDB16\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Oct 2022 04:10:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E334662F68;\n\tThu, 27 Oct 2022 06:10:25 +0200 (CEST)","from mail-io1-xd34.google.com (mail-io1-xd34.google.com\n\t[IPv6:2607:f8b0:4864:20::d34])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3312461F4A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Oct 2022 06:10:24 +0200 (CEST)","by mail-io1-xd34.google.com with SMTP id p184so413167iof.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Oct 2022 21:10:24 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666843825;\n\tbh=vM5vnpLWijvgjyC/iSm+1HT83UdpH6jDFLO91uoOwpY=;\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=Xn42Wp7nZN+ef0B5DIs3Yk61qtR2XVOx7cDG/fB1jTo/m+R6c/SvWdccxT2hTVfw7\n\tfg6sjoSs2HviKqhx/O433XqWX2h+ve3hsMfIWBScC87eKNKgJut0BjCuun2pRDrkMK\n\tsLLUIhenPWpA40OeOTlRKodUvuzKnfbLKtBnzdjPgfDbQsIuEj3StKvT2Gyt2zmHhx\n\tR+UEVCKlXoeLBknYR2s7h88IRsRZb3JHIKhVi6+p6NwQiKqkLmfoXPx7QT6n1JfF7e\n\tmW7dKDFr74mgERHNAegWVLD9cAx9mo30mhchoUhcBZFNsV72uHcV/ZzeKI1g0jpSkn\n\tXTUEmPn9IW9ug==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=rothemail-net.20210112.gappssmtp.com; s=20210112;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=Ycvkb1PflAZRVBhfVSZU5KXbkL2GyjUUS/CaK1AiisY=;\n\tb=ISQwFZ/jW0MrY6reTmFjifUVvCaYAUfvr1ak0L8P25Yp+1h507U07P3Sd/DHsjBp6A\n\twuQ3lU5IIZCDQN+7vY+QPJD9hN85X2sz5UOmXefQUx+/8nmc5o/eaBaYsIzlizRy2wp7\n\tOH2e36i/uBEwYXjIWsElDFE4Ddw12c2soo9Cg78vT/86aO60c+0WtQN/EEXAttKa4txk\n\tl0EGO8BRwlEWclkcvY6IpA9FoVmYZzM1Cef4v+IV5Qr0kSyEmxdZAlyc/qmpvzfzloWA\n\tJaiALmUrxhJ7d4SL9DgYFSxjNlNzYzF9Eo46bCIwGka0Yv0EHEn+H3omTiYH0w7xRa1L\n\t+Y7w=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=rothemail-net.20210112.gappssmtp.com\n\theader.i=@rothemail-net.20210112.gappssmtp.com header.b=\"ISQwFZ/j\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=Ycvkb1PflAZRVBhfVSZU5KXbkL2GyjUUS/CaK1AiisY=;\n\tb=VJfSsHU3JUM5E22SrL3uDMwhpf2zOycx5nhdBTwitkT7KcXZv6+KAbdyWmWe9vzzCm\n\tdR4peD/Ar4UPtplYdp4Uo0PG+8zZe61uVI8+yDNd3U7taPCcYbkq6ezKyMQfTcdokMdu\n\tG6RFRzRfqsyClRBQBnRsGjHM5rt0r7zNWMT2lx0JgdUssM8ASPuCsr/LWeQM/YAIPDuD\n\teEqryGT4lmdP34oE5qCofp4bFgSkWa+xNX44qbPsDgwoYAL3xJ/mTk+GkG3MkbMCuWSa\n\t/h3JX7NUQnwitSXoLzciSWnC7MlFwWwvMobFYVPnnxrNVqABxPkRoCgHQaQZboJGN4dH\n\tfywQ==","X-Gm-Message-State":"ACrzQf3GKhm6B1nhJADo5YsDVFYaH2kOiTgb3NJ8smIFKNrSYeMKYkHV\n\tz7xHgl71JbOppnZhZSI7I4K+fLpF+rDhVlF/M7HtKbrVc8MWhJuZ","X-Google-Smtp-Source":"AMsMyM7WMz+1vFeyvfdxu2dyV7tflQWx6J1BSxeLWu9MvcxGLTadXbPm7jsqPbkYddRe/BIg25sLQrn7HRoblM/vXVg=","X-Received":"by 2002:a05:6638:4122:b0:375:2990:8909 with SMTP id\n\tay34-20020a056638412200b0037529908909mr98937jab.259.1666843822720;\n\tWed, 26 Oct 2022 21:10:22 -0700 (PDT)","MIME-Version":"1.0","References":"<20221024055543.116040-1-nicholas@rothemail.net>\n\t<20221024055543.116040-5-nicholas@rothemail.net>\n\t<Y1aYZp1Y4e6KBWsZ@pendragon.ideasonboard.com>","In-Reply-To":"<Y1aYZp1Y4e6KBWsZ@pendragon.ideasonboard.com>","Date":"Wed, 26 Oct 2022 23:10:12 -0500","Message-ID":"<CAD2rFCpXRVgYz=1KQ70QvdX4mjf+0YgDz3YP18a7Lxt9tceaBw@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"000000000000f31dd205ebfc5115\"","Subject":"Re: [libcamera-devel] [PATCH 04/11] Adds metadata for the ov8858,\n\twhich the PinePhone Pro uses.","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":"Nicholas Roth via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Nicholas Roth <nicholas@rothemail.net>","Cc":"Nicholas Roth via libcamera-devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]