[{"id":35842,"web_url":"https://patchwork.libcamera.org/comment/35842/","msgid":"<175802970846.1246375.17889046700867451893@ping.linuxembedded.co.uk>","date":"2025-09-16T13:35:08","subject":"Re: [PATCH 4/4] libcamera: libipa: Add vd55g1 support for libipa","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Benjamin Mugnier (2025-09-05 10:08:25)\n> Values are sourced initially from the vd55g1 user manual.\n> \n> Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>\n\nAfter embarassingly getting this inverted when trying to verify this I\nrealised I was comparing the gain calc against the gainCode calculation\n:D\n\nBut net result is ... now I believe this is correct and matches the RPi\nimplementation so:\n\nI think I interpret from this and the driver that we have 28 codes\nthat range from a gain of x1.0->8.0\n\nPicking up from Paul's tools with desmos [0] for cool graphs ;D\n[0] https://www.desmos.com/calculator/yowz4dby6d\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  src/ipa/libipa/camera_sensor_helper.cpp | 12 ++++++++++++\n>  1 file changed, 12 insertions(+)\n> \n> diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\n> index dcd69d9f2bbb39feabfefe41cee8b45f0f958127..4f052151940fbc5db2628a7f53abcc135cbdb55c 100644\n> --- a/src/ipa/libipa/camera_sensor_helper.cpp\n> +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n> @@ -745,6 +745,18 @@ public:\n>  };\n>  REGISTER_CAMERA_SENSOR_HELPER(\"ov13858\", CameraSensorHelperOv13858)\n>  \n> +class CameraSensorHelperVd55g1 : public CameraSensorHelper\n> +{\n> +public:\n> +       CameraSensorHelperVd55g1()\n> +       {\n> +               /* From datasheet: 0x40 at 10bits. */\n> +               blackLevel_ = 4096;\n> +               gain_ = AnalogueGainLinear{ 0, 32, -1, 32 };\n> +       }\n> +};\n> +REGISTER_CAMERA_SENSOR_HELPER(\"vd55g1\", CameraSensorHelperVd55g1)\n> +\n>  class CameraSensorHelperVd56g3 : public CameraSensorHelper\n>  {\n>  public:\n> \n> -- \n> 2.25.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 7E884C328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 16 Sep 2025 13:35:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2389569370;\n\tTue, 16 Sep 2025 15:35:13 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 127F9613A1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Sep 2025 15:35:12 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D9D916BE;\n\tTue, 16 Sep 2025 15:33:53 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"lOqPhYWr\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1758029633;\n\tbh=ZAr3y1y4GqKw4/dwYvZOub2S4BrUKhW1+NU0Iyrv3k4=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=lOqPhYWr364nvn/UWyLz5cpmzK7Ooy5lG/DaDZpht0uB9M84MsuF60ib9DhRxkUDV\n\tVCsu3iakIgovpcusuIQUNwU5nUXUqIf5yEziMVi8rVlcA4swlVN3vbXEqeZf4/9gp6\n\tPzCpF9+1x6SiFQJJQrMjlqhfc/Iz4odG/IZxAiqo=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250905-vd55g1_support-v1-4-545d39f280b2@foss.st.com>","References":"<20250905-vd55g1_support-v1-0-545d39f280b2@foss.st.com>\n\t<20250905-vd55g1_support-v1-4-545d39f280b2@foss.st.com>","Subject":"Re: [PATCH 4/4] libcamera: libipa: Add vd55g1 support for libipa","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Sylvain Petinot <sylvain.petinot@foss.st.com>,\n\tBenjamin Mugnier <benjamin.mugnier@foss.st.com>","To":"Benjamin Mugnier <benjamin.mugnier@foss.st.com>,\n\tNaushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 16 Sep 2025 14:35:08 +0100","Message-ID":"<175802970846.1246375.17889046700867451893@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]