{"id":27520,"url":"https://patchwork.libcamera.org/api/patches/27520/?format=json","web_url":"https://patchwork.libcamera.org/patch/27520/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<CALr1FG-QhzJ-9ioVO5Rx5TdsAxve-92j-zNees0rvaN19UjEFA@mail.gmail.com>","date":"2026-07-29T14:41:37","name":"libipa: camera_sensor_helper: Add imx471","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"f0278524972d34acf2ad175b3a4cd8725ae9f28a","submitter":{"id":476,"url":"https://patchwork.libcamera.org/api/people/476/?format=json","name":"John Cronin","email":"john@stromback.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/27520/mbox/","series":[{"id":6090,"url":"https://patchwork.libcamera.org/api/series/6090/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=6090","date":"2026-07-29T14:41:37","name":"libipa: camera_sensor_helper: Add imx471","version":1,"mbox":"https://patchwork.libcamera.org/series/6090/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/27520/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/27520/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 EE5B0C3264\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 29 Jul 2026 14:41:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4E66667FB1;\n\tWed, 29 Jul 2026 16:41:41 +0200 (CEST)","from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com\n\t[IPv6:2607:f8b0:4864:20::1132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3E82067FA9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 Jul 2026 16:41:39 +0200 (CEST)","by mail-yw1-x1132.google.com with SMTP id\n\t00721157ae682-81e86df8987so15802237b3.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 Jul 2026 07:41:39 -0700 (PDT)","from 313336824172 named unknown by gmailapi.google.com with\n\tHTTPREST; Wed, 29 Jul 2026 10:41:37 -0400","from 313336824172 named unknown by gmailapi.google.com with\n\tHTTPREST; Wed, 29 Jul 2026 10:41:37 -0400"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=stromback-com.20251104.gappssmtp.com\n\theader.i=@stromback-com.20251104.gappssmtp.com\n\theader.b=\"JQAygkIp\"; dkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1785336098; cv=none;\n\td=google.com; s=arc-20260327;\n\tb=WlFG14Gf+L84JLqM4NFbLcSG9lFdxD/p6y1aNuHuqa5DGIZPi6A/UzIn+KNmK1Bv4K\n\tG7RGQiZnsvBspPn1w50DT11PVqp7G3h5r0ZYhAlVzeg3MfE1UCM11DtdF+nAxJHfdcHi\n\tdesrAxlALtWSxnQPJub7suUVCPG2tqItsAXbtM7+sFy9t1F+/D3V3Ww6MRF9LOr1lOQi\n\tjey9b0MebhBkZp1zvEPERwoQ11LATF9PSyUEYwSeKDlj9itBJ5sT7sV3i8v/YNG4K687\n\tuRvdBFPA5m+7r+3LhlhR89xCmYWea/fyCMnnP3daOz8hbIznturQWbiVU1L6Rm4IfYw2\n\t1NLQ==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20260327; \n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:references:in-reply-to:mime-version:dkim-signature;\n\tbh=0qchJ7hl2sq9H3+e+u2TkEOXVmXbvixmz0pZNbM+7jI=;\n\tfh=8fmqAynsXLJdjJ4QlnoP1T39WQbBLOq6I+TqiUNWVms=;\n\tb=p6g48CCizsHCI9dS0kdhyi7NSIbaRefkY8ZmFOH5kvph0bun07Ca8pye9Kcx5RZ/rF\n\tQmDnKIo7sAAgxIsUqWSrhhnB7HlVeyM4VBCxj+kMb+hLMJ94cBSafXPit3geEoK1xYGl\n\tN59W8TMLNQG5qRusxubySV9sCmLAfGY6rJLDja+g/TTVaHM6jnlP03INtE50IMltBIF0\n\t8840+XhUmoPJrlAs7YpqDebT9AfooFFFqJxQCd5/geB91Soy2zeiDB59ITGz4FPHxO3W\n\tPfFT8H7sl12WBy+YcbEG1UR5+RoivuZGUL10htUYZI50am3MJ3VslmuAHVZd6I16Hm8q\n\tCVkw==; darn=lists.libcamera.org","ARC-Authentication-Results":"i=1; mx.google.com; arc=none","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=stromback-com.20251104.gappssmtp.com; s=20251104; t=1785336098;\n\tx=1785940898; darn=lists.libcamera.org; \n\th=content-transfer-encoding:content-type:cc:to:subject:message-id\n\t:date:from:references:in-reply-to:mime-version:from:to:cc:subject\n\t:date:message-id:reply-to:content-type;\n\tbh=0qchJ7hl2sq9H3+e+u2TkEOXVmXbvixmz0pZNbM+7jI=;\n\tb=JQAygkIpmX6tRX/5rIHf2h4VTT1y2zh11hnwuD4pRHeJbmKk8HF67KdI7fFYfNxXAU\n\tOuyi8zFWC4rtb9HbRpzBkVsLCakLaJ4hII/tpyFYku9SfBqnhT9zJFSJDmnf76ij6+zk\n\tc31TK8Efc+VMZVx1qeFnhjwiKdVGjNKHaCmmTthk0qkQv7a2bHI9YxqiuHWdDzbUwzOL\n\tl9aktk6RGauXD9Xo58a1AG7itphjf8cewwYzstuFc4vzBA2qfgQ01ObpDIABcNy1y73t\n\tM6+4Gd0CdOu4SdJK+dVFj0FIly+bPgYVlG75dkLNvCzBnttYVftJ+Lf8R1/5M6J46W7C\n\t+dtg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1785336098; x=1785940898;\n\th=content-transfer-encoding:content-type:cc:to:subject:message-id\n\t:date:from:references:in-reply-to:mime-version:x-gm-gg\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to\n\t:content-type;\n\tbh=0qchJ7hl2sq9H3+e+u2TkEOXVmXbvixmz0pZNbM+7jI=;\n\tb=VklxM7wR+SkWaIMgjKVO8W20cSZC7qM78acO5JbkQV0HbkDSVJPyPAGOWnH0lgwsrN\n\taqCuU0ti0+36CJAuYLezswjAzAX6o14CM/jOcCcW/NwmBIdAJzgI0rZEzo5ufPJRYz2g\n\tF7bZMbi2wYSn1gPsudDTnUVdAdGzw9QliVlqX9nrMzSgaAzODRUINs2vd0u1oCZg9Ysg\n\tiJTGP88v/VBbvHFBEvEEm6L4bjW6cYKK9Z4eSaL5JpAROaCZI9dPTzG/FRCvQzoDZAW4\n\tqTnwSrSlcEBYnBcpjyxji1hVN0g3j+Z2BvMoJaVhVTflDsrPwi5FO5ceDoNrBpMBzL6V\n\tuSmw==","X-Gm-Message-State":"AOJu0YxSZ0Sj0MK5p3cNNys3TJPKq3kWiXnVwrFrW0UdoAInOa0V+tve\n\ti57/KMsw6VY3QWAOyWeHbHWYe9IEPDKW3iV5bZ6o043tkVdO4aQTerxQWOCWIdshr69mOK8ckSr\n\tRgzTNlrHRYPS+uDk4gIS4eRaKqIOLGaCqRn2+rMo59xCjy4Oi4OKXeCs=","X-Gm-Gg":"AR+sD10yjY58xxr91co2EPcGxz5FhvoHEpYU2DB6EnkNT29qlsrHMrJvw7MVRsR2sPz\n\tNzQrQCJqXogsadR7QDAGhHeI9hogKjl75DXby014TNMIfvOnCnQHmQJ3WuGqksUMsO57bv/zVKA\n\twm0uXG+BZlyPyGawhQxF25G99gBnhQxkC1ElsaMnVOOsoFfs4qIlaQ/Yfehqb/Y6PuS+IYRTivH\n\t+doCocT8XImEhrCXwrIS/YwWOn9vWZE0E4PR4SGLRgLCSG3i4kUM5xZ5PvX6ca6EtXYCe3Yn2l+\n\tGZs4CsgfD01uEeJyIhb7wEBHcFlpB5dKf7oIGvegVIJKHTAqsYFevH/3zvPOYBRPtHzzfXSiEbr\n\tbrllGwg/6OyXJ59z39EklB4sHP/HqNMyLf9mkdXcWvL8k3xNXQ44UzcrRBGXK8rAHIOcPe+KQKC\n\tbqPq5vwQBy1pWL3iI6qpOdIzjCvfGvsqRbXRi4S4fI4rYB3E/UskC1frx+XveF6XMczasWC70bP\n\tM8RQI9R6rIlktbqI0pNeOB1aC8n3cOMg0eW2xRS6Q==","X-Received":"by 2002:a05:690c:3389:b0:81e:a3d3:9b0f with SMTP id\n\t00721157ae682-81f991dbb4bmr38772197b3.15.1785336097732;\n\tWed, 29 Jul 2026 07:41:37 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<178532114379.1788834.11075609312135567537@ping.linuxembedded.co.uk>","References":"<178532114379.1788834.11075609312135567537@ping.linuxembedded.co.uk>","From":"John Cronin <john@stromback.com>","Date":"Wed, 29 Jul 2026 10:41:37 -0400","X-Gm-Features":"AUfX_mzBXLdWeU_cTY6N1RvxL7ZbeirGyg6qL_dVVUlUuni0sA1o1LGBPaaj-bk","Message-ID":"<CALr1FG-QhzJ-9ioVO5Rx5TdsAxve-92j-zNees0rvaN19UjEFA@mail.gmail.com>","Subject":"[PATCH] libipa: camera_sensor_helper: Add imx471","To":"libcamera-devel@lists.libcamera.org","Cc":"kieran.bingham@ideasonboard.com","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","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>"},"content":"Add CameraSensorHelper for Sony IMX471 (SONY471A), used on Lenovo\nThinkPad X9-15 and related IPU7 platforms.\n\nThe kernel imx471 driver programs analogue gain code 0..800 into\nregister 0x0204. Use the common Sony linear model G = 1024/(1024-code)\n(matching imx355/imx477/imx708) and a 10-bit pedestal of 64 (4096 at\n16-bit).\n\nAlso register static sensor properties so soft-ISP AGC no longer warns\nabout missing delays/properties for this model.\n\nTested on Fedora 44 / ThinkPad X9-15 Gen 1 (kernel 7.1.5, imx471 bound\nvia IPU7 ISYS). Soft-ISP loads without \"Failed to create camera sensor\nhelper for imx471\"; AGC reports gain range 1.0-4.57x and adjusts\nexposure under capture.\n\nSigned-off-by: John Cronin <john.cronin@opcenter.com>\nTested-by: John Cronin <john.cronin@opcenter.com>\n---\n src/ipa/libipa/camera_sensor_helper.cpp       | 24 +++++++++++++++++++\n .../sensor/camera_sensor_properties.cpp       | 17 +++++++++++++\n 2 files changed, 41 insertions(+)\n\n \t\t\t.testPatternModes = {},","diff":"diff --git a/src/ipa/libipa/camera_sensor_helper.cpp\nb/src/ipa/libcamera/ipa/libipa/camera_sensor_helper.cpp\nindex cc16e25..5fb545a 100644\n--- a/src/ipa/libipa/camera_sensor_helper.cpp\n+++ b/src/ipa/libipa/camera_sensor_helper.cpp\n@@ -644,6 +644,30 @@ class CameraSensorHelperImx462 : public\nCameraSensorHelperImx290\n };\n REGISTER_CAMERA_SENSOR_HELPER(\"imx462\", CameraSensorHelperImx462)\n\n+class CameraSensorHelperImx471 : public CameraSensorHelper\n+{\n+public:\n+\tCameraSensorHelperImx471()\n+\t{\n+\t\t/*\n+\t\t * Sony IMX471 (IPU7 / ThinkPad X9, X1 Carbon Gen14).\n+\t\t *\n+\t\t * Analogue gain is programmed via V4L2_CID_ANALOGUE_GAIN to\n+\t\t * register 0x0204. The kernel driver (imx471) exposes range\n+\t\t * 0..800 and writes the code directly.\n+\t\t *\n+\t\t * Sony linear gain model used by several IMX sensors:\n+\t\t *   G = 1024 / (1024 - code)\n+\t\t * so code 0 → 1.0x and code 800 → ~4.57x.\n+\t\t *\n+\t\t * 10-bit optical black pedestal is typically 64 → 4096 at 16-bit.\n+\t\t */\n+\t\tblackLevel_ = 4096;\n+\t\tgain_ = AnalogueGainLinear{ 0, 1024, -1, 1024 };\n+\t}\n+};\n+REGISTER_CAMERA_SENSOR_HELPER(\"imx471\", CameraSensorHelperImx471)\n+\n class CameraSensorHelperImx477 : public CameraSensorHelper\n {\n public:\ndiff --git a/src/libcamera/sensor/camera_sensor_properties.cpp\nb/src/libcamera/sensor/camera_sensor_properties.cpp\nindex fc9e184..7ba55dc 100644\n--- a/src/libcamera/sensor/camera_sensor_properties.cpp\n+++ b/src/libcamera/sensor/camera_sensor_properties.cpp\n@@ -297,6 +297,23 @@ const CameraSensorProperties\n*CameraSensorProperties::get(const std::string &sen\n \t\t\t\t.hblankDelay = 2\n \t\t\t},\n \t\t} },\n+\t\t{ \"imx471\", {\n+\t\t\t/* 1/2.3-type; ~1.4 µm pixels (nm). Delays unverified. */\n+\t\t\t.unitCellSize = { 1400, 1400 },\n+\t\t\t.testPatternModes = {\n+\t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n+\t\t\t\t{ controls::draft::TestPatternModeSolidColor, 1 },\n+\t\t\t\t{ controls::draft::TestPatternModeColorBars, 2 },\n+\t\t\t\t{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },\n+\t\t\t\t{ controls::draft::TestPatternModePn9, 4 },\n+\t\t\t},\n+\t\t\t.sensorDelays = {\n+\t\t\t\t.exposureDelay = 2,\n+\t\t\t\t.gainDelay = 2,\n+\t\t\t\t.vblankDelay = 2,\n+\t\t\t\t.hblankDelay = 2\n+\t\t\t},\n+\t\t} },\n \t\t{ \"imx477\", {\n \t\t\t.unitCellSize = { 1550, 1550 },\n","prefixes":[]}