Show a patch.

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

{
    "id": 27141,
    "url": "https://patchwork.libcamera.org/api/patches/27141/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/27141/",
    "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": "<20260630090215.813311-2-naush@raspberrypi.com>",
    "date": "2026-06-30T09:00:20",
    "name": "[v2,1/1] pipeline: rpi: pisp: Ensure we don't run our SW correction with packed",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "7800e54e5130b016c99bb7729b25864c01f94f21",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/27141/mbox/",
    "series": [
        {
            "id": 6028,
            "url": "https://patchwork.libcamera.org/api/series/6028/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=6028",
            "date": "2026-06-30T09:00:19",
            "name": "RPi pipeline handler fixes",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/6028/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/27141/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/27141/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 41673C3261\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 30 Jun 2026 09:02:31 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0496865F5E;\n\tTue, 30 Jun 2026 11:02:29 +0200 (CEST)",
            "from mail-wm1-x331.google.com (mail-wm1-x331.google.com\n\t[IPv6:2a00:1450:4864:20::331])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CB883658C5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Jun 2026 11:02:26 +0200 (CEST)",
            "by mail-wm1-x331.google.com with SMTP id\n\t5b1f17b1804b1-493bd302c91so17795e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Jun 2026 02:02:26 -0700 (PDT)",
            "from naush-dell.pitowers.org\n\t([2a00:1098:3142:1f:9aa7:43e2:6907:a5c1])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-493b8c8d92dsm56635285e9.0.2026.06.30.02.02.25\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 30 Jun 2026 02:02:25 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"JMp5MbI5\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1782810146; x=1783414946;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to:content-type;\n\tbh=ZnzHEQt4EwC9uN8oitaivu1h/kOcnd2zgGIMaZwhoOI=;\n\tb=JMp5MbI5bJHrqQjCU4X8CrZ3UFrjr8nZFX/p9iweqjh4ihZxaIN44nQHMPUNieBmtb\n\tXMeiXTgyG9L/FHZXKLbhdwRguJS1Bu2PZLvDo7NwMAX9eatP7weLmLzmsDBejlnPrX7b\n\tRmg6Pb3JZMsrsF76fLbCuXWMlZbr8pWX+5UMe9eBmbUgpzniAD3yXZRkxQjuO2YOnrLp\n\trCBybmSnwRhV/OxE6I254u/MQbhtE7hZwYECw7ZMr9Jyu5qNxgZRYEpOWTJk1YUxGJyF\n\tAToz9HA/5EQJLyZU1tPT1aqzrzbtDNhxigWJ3chmlcm3/e2VunyZPr62G909sqzSXZ/6\n\tjA1Q==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1782810146; x=1783414946;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to:content-type;\n\tbh=ZnzHEQt4EwC9uN8oitaivu1h/kOcnd2zgGIMaZwhoOI=;\n\tb=h+WLr7Q9F977LAZCI2luf1XpmCLCp8f0kPsrFRSieUoh+FDj5132hCrdpoqxkF6MaO\n\tx1sw+7Xv72fvprYlX5l5ESobhymWwx0koqUigM4hzeIbC3oz1Rh6RQ0TbuK2pggLh4QT\n\tfK0cYbw4bCIG3OlUZCWCC1CcJhUbwL1yQVo0d1rToJquhjIwU33pD6rMs6Alflt2QBZr\n\t6bPCEVNk5BaNcFHENwOOvOPRhY8Z0lmhj9zLzlzVFG+NLHegwMaL+n5zacfRf4H8MnBD\n\tulL5y2G10P/G3yxOhsX6u2vyWGjpNBfkyBITTFJVdnlJqEcZ5SluKLdXzKuflwd3qyYf\n\trQwg==",
        "X-Gm-Message-State": "AOJu0Yw8hxy+RxYUfsPfjvToNFrgVQSgyXihQYKbfcRpCLTKgXCh2GAZ\n\tY7cUJ/7Ypl3DlFHh7QqoRTONUhA/X/1hpM6ZjVe6HYiW+OB5NKrT89ttq+9refL1N+4yKR8GjR8\n\t6Gs/o6Kk=",
        "X-Gm-Gg": "AfdE7cnR0PZXGUV7krDq21CdcsgCi+fd5aurGMtaMJMi1P/LaYkufO4jlknplBRiiYg\n\tLaLOHoBgFxuSQqk1IwC9K7PimHyH+plC2gj6HYxCud74TqhcptWrAcLaCOdNzUaSElSXRxiP7W8\n\tCMxqlVRMYuVvjCjtnbL7F+LmDQfETF/fZ2cbtWi5zqPH5pyuYfEDcvp+CiCksfuHwi5A7PhMZcf\n\tSTVqLWbEpn1AZLIuYMgI19FrJrzsZlzhnVs3CTGTFOKwZAZIqFChwy/ufoWrZrongOes3tOMP6p\n\thXkOUx/3FQvZg1yWdWBXLR96I8BKHGqGF97MYqdas1SSPVuYnHsL4NWhEH6i2qOuJUPY8/86Zd2\n\taeLTuLk0zY8GRZvvbKxca/Nx7hOy1O4PdkwpPorjysev9vA5qoWcRSDLihWXC23nt67wcC/EY1K\n\taI9lKLwDf9+x7DVfw8k8Y87dcdsPtt8pLKjCD2INMNsMaJCbvsdkKoE845LRiQLw5mgtDlp/yg5\n\tOUpiOGd8IVE/EO78988TM9l7ixZMmCvje6Rhghf+YuedH5bEM1EtXurFbMmK83Zk5vz29rJj+WA\n\tVScLAcN3nAK4GTUmcyBf",
        "X-Received": "by 2002:a05:600c:3e85:b0:493:2f0f:db7e with SMTP id\n\t5b1f17b1804b1-493b8279d73mr20955625e9.2.1782810146198; \n\tTue, 30 Jun 2026 02:02:26 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Naushir Patuck <naush@raspberrypi.com>,\n\tDavid Plowman <david.plowman@raspberrypi.com>",
        "Subject": "[PATCH v2 1/1] pipeline: rpi: pisp: Ensure we don't run our SW\n\tcorrection with packed",
        "Date": "Tue, 30 Jun 2026 10:00:20 +0100",
        "Message-ID": "<20260630090215.813311-2-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260630090215.813311-1-naush@raspberrypi.com>",
        "References": "<20260630090215.813311-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "Due to hardware bugs in the CSI-2 RX, we need to unpack 14-bit CSI-2\npacked samples and swap endian order in 16-bit samples both in software.\nThese SW routines only work on unpacked/uncompresssed samples.\n\nFor this reason, ensure the user cannot configure 14/16-bit RAW streams\nwith PiSP Bayer compression in platformValidate().\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/libcamera/pipeline/rpi/pisp/pisp.cpp | 11 +++++++++++\n 1 file changed, 11 insertions(+)",
    "diff": "diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\nindex b744c901f751..8e8da116ef6f 100644\n--- a/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n+++ b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n@@ -1223,6 +1223,17 @@ PiSPCameraData::platformValidate(RPi::RPiCameraConfiguration *rpiConfig) const\n \t\t\tstatus = CameraConfiguration::Adjusted;\n \t\t}\n \n+\t\tunsigned bpp = MediaBusFormatInfo::info(rpiConfig->sensorFormat_.code).bitsPerPixel;\n+\t\tif ((bpp == 16 || bpp == 14) &&\n+\t\t    bayer.packing != BayerFormat::Packing::None) {\n+\t\t\tLOG(RPI, Info)\n+\t\t\t\t<< \"The sensor is configured for a 16/14-bit output, \"\n+\t\t\t\t<< \"compression is not available for SW fixups needed.\";\n+\t\t\tbayer.packing = BayerFormat::Packing::None;\n+\t\t\trawStream->pixelFormat = bayer.toPixelFormat();\n+\t\t\tstatus = CameraConfiguration::Adjusted;\n+\t\t}\n+\n \t\trawStreams[0].format =\n \t\t\tRPi::PipelineHandlerBase::toV4L2DeviceFormat(cfe_[Cfe::Output0].dev(), rawStream);\n \n",
    "prefixes": [
        "v2",
        "1/1"
    ]
}