Show a patch.

GET /api/patches/27521/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 27521,
    "url": "https://patchwork.libcamera.org/api/patches/27521/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/27521/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<CALr1FG_KCY4FY0mkt==uD87VjKqRRWDec=vjgmf7wigurYZJYQ@mail.gmail.com>",
    "date": "2026-07-29T14:43:32",
    "name": "[v2] 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=api",
        "name": "John Cronin",
        "email": "john@stromback.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/27521/mbox/",
    "series": [
        {
            "id": 6091,
            "url": "https://patchwork.libcamera.org/api/series/6091/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=6091",
            "date": "2026-07-29T14:43:32",
            "name": "[v2] libipa: camera_sensor_helper: Add imx471",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/6091/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/27521/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/27521/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 E8C27C32FE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 29 Jul 2026 14:43:37 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B94CB67FAF;\n\tWed, 29 Jul 2026 16:43:36 +0200 (CEST)",
            "from mail-yx1-xb135.google.com (mail-yx1-xb135.google.com\n\t[IPv6:2607:f8b0:4864:20::b135])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D4DDF67FA9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 Jul 2026 16:43:34 +0200 (CEST)",
            "by mail-yx1-xb135.google.com with SMTP id\n\t956f58d0204a3-66899fe9077so1396821d50.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 Jul 2026 07:43:34 -0700 (PDT)",
            "from 313336824172 named unknown by gmailapi.google.com with\n\tHTTPREST; Wed, 29 Jul 2026 10:43:32 -0400",
            "from 313336824172 named unknown by gmailapi.google.com with\n\tHTTPREST; Wed, 29 Jul 2026 10:43:32 -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=\"RQZfraa6\"; dkim-atps=neutral",
        "ARC-Seal": "i=1; a=rsa-sha256; t=1785336213; cv=none;\n\td=google.com; s=arc-20260327;\n\tb=braekP9F7EGz9sTL0HhzRtPfknjkF7zhLY1pMENJ5WubNsomCeyEyJX1jscBdRmt9T\n\tjCO0FkIwQvpxIqTBTmDtZw0YDOixm85FD7YFWZwsBclxTlMGuWs+N8CbzaVarsKjqRBK\n\tAndTVDGqfMxKDm+gNcQHbSvtbNX7dFlZe0P9iwRt7Apmg+h0BwaIN4pdbtouihOBlOeF\n\tjjTQ6Tl70eg5dpxMHVfoRKBeH3gLeeogOsVD7hHusFJWU5Gc1ckpOvjbN6Tm2XSVCSki\n\tmMuHb6PbUbW68mW6fg1q0JkslpInJKV7HpL7mqhHN1SyPnsE/qqt2cGy4Q64yk7r2eQu\n\tCsYg==",
        "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=KBB4hh3CPkb8MfngEFEu2CoxNfm2wy6QvZOjz/VGOm8=;\n\tfh=8fmqAynsXLJdjJ4QlnoP1T39WQbBLOq6I+TqiUNWVms=;\n\tb=WjYVGL/XjB7itmdtsIyfS6Hl1MdlpaVKszw9NVAx+WHloXP5qVA/vsTGz0QgBM2pb2\n\t6RbvstI1DdXMpJf1WD5nqqjsz3H0hiE1VBbVqvqBhut/PYEV781ZGhUgwjas0YtaEilp\n\twGMyjzr/s+v/fGHLVEYwKoHN3yyYxLEK8Wm33oQyv3aQgacLWtm5ZwBiIYccnZ4d/UAc\n\tGObZB2FhhY+oKYYk9k0Y+D1iQHCGtiqBgsOOgDGQeRF0Clqq0yXLUhldbsUbjqfQvekj\n\tP8TLsZFLcJ0ZtnbcjOodr4ppUB7UKN1hez8ZJZvSijsldo19/elyve0wa072gZ3++6S+\n\tKNgQ==; 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=1785336213;\n\tx=1785941013; 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=KBB4hh3CPkb8MfngEFEu2CoxNfm2wy6QvZOjz/VGOm8=;\n\tb=RQZfraa6MQpWPkjt5HtdhI4qkRWSS+2DJhs7SCBlvJApvxDzyGI6aqdcLWNLaljoiQ\n\tuavwvoZhsJvKoGW7i+sWTOb7n6ymribB1FXyza7SfW2mSU9T6gIZnRWhiQHjHNhBRt+u\n\t6clTldfKKLCGJi5ATOu8L4G8kMBndcbtrPeu9By6uSQem2fNnOtZA0AGLafX8wMzAYQL\n\tLSAhdQTygE7oBbgVjNniZ/xkGU6B9OOKGIoExXBlXnrw8RHOWNwxuuAoh+nC3pkxeV9u\n\t1u1g9xdNF5Y+gyIEK21awDZocLcgxpLa6qzp/lOii4xmk27LeNb5zbxeaw8dZbh2VpjF\n\tF/Fw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1785336213; x=1785941013;\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=KBB4hh3CPkb8MfngEFEu2CoxNfm2wy6QvZOjz/VGOm8=;\n\tb=Prd70wiBoxwzFYbCjb49LsSrOE6hSX3OzUVHD2hNfQ2O56MLMT7SV6dcTU7YRgT6Ac\n\tIS/2TMFBpqzAnWeD5zJJSwtLUIJ5VZjJ3qK6Xi9k6P4/T2U4yjYAPTRpoCpR+CKIoG4C\n\tsSK6YIr4yd0UDKtfkbJB9wryvWHn9xLiu2J/LmyMUX74pseR98KIdQco2Cd6zV2O77MO\n\tZHXfDDBnJAUOMMGjvITqqEWIRMKD8BmY/H+Cth+wdI4XKiJ72agdzZpAnZVnYx4m8DX1\n\tfkD4c1sIFPoSkUBk5r3sgb2k0TxeJkPj+Rs1OkycnYOzikP5jZl/u0OgYPrDaLFKtMB5\n\tgmUg==",
        "X-Gm-Message-State": "AOJu0Yw66ZOgQuY91wjEJhxvzrmsp6RSvvZS82Hi4FW39oHrawzS8u+R\n\tqYi/iEm55B67nPJKCkbPnf+pd8CP4KPwnM17C69LqG8nQ0dhOV3YfHLq7L97ohRRjiQUQqsW1VN\n\tPRmmx/fq4tQi6vVxad8NsA1mg4OKudfetmc8HxSfj29yjE2i1eCNaO0w=",
        "X-Gm-Gg": "AR+sD1128fWK2exJjIsPXyKz46OT9yoJLlRkZ2qfg7njQ/josNPXp0xNdVGS39a9Hfp\n\t7tCBn7vsZnqmlpPEPXNvDX6F9Ze/w4owBmJwoPqRfAjl/h1Gzy+l4UBQfg0PhCuaqQixhmR5olc\n\tdDt6MJnhmzGTwb7vMz0Q475hczJGxVL57mhr/Pkbc1qn5Lw49+iOOSPMHWHg297bomf32nY2BCl\n\tg7vSxkdbDNsY9ls9XY9U8lGGs5ql0MYzsvFd7tTyXtZ2PVarMaTBhWaSw1syNUHpIJCbk6L3yOk\n\thvsCMVhyiTiQiINjjLLMgsBeDcaNdc7XzUAv+qr5uvmnvtyet6Mb9vg7gNROyq1YfAnmO+u5aGR\n\tK6A+vIj6gqJC4/XQ7d9D0urd4C8vpP+BJv23v73nOTqvnDpmIsjCSdLdWAKv8vGuKG2Qd0/xhHP\n\tZAeC4RanpNxFW7epNhQBsHh+gFhaUVSrNyCWDu+W/TJOa5uA4obT+jC0XDeVXdGAuAzwySb/FjQ\n\txNqTE7jcEOEg5VPlbdM5j+rFHmaSwWFwzvSk5WioQ==",
        "X-Received": "by 2002:a05:690c:f10:b0:7fe:1333:c745 with SMTP id\n\t00721157ae682-81f99242bfdmr35202777b3.27.1785336213431;\n\tWed, 29 Jul 2026 07:43:33 -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:43:32 -0400",
        "X-Gm-Features": "AUfX_mwetmCJ2d6LwC44n_0cn_VsuDZF2BT4nU-GV20DhVdGDhO1xPqj8A2Neuk",
        "Message-ID": "<CALr1FG_KCY4FY0mkt==uD87VjKqRRWDec=vjgmf7wigurYZJYQ@mail.gmail.com>",
        "Subject": "[PATCH v2] 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---\nChanges in v2:\n- Fix mangled diff --git b/ path from the previous mail (copy error in\nMUA send).\n  ---/+++ paths and hunk contents were already correct; pure\napply-ready form now.\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/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": [
        "v2"
    ]
}