Show a patch.

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

{
    "id": 23330,
    "url": "https://patchwork.libcamera.org/api/patches/23330/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23330/",
    "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": "<20250501141609.717148-2-kieran.bingham@ideasonboard.com>",
    "date": "2025-05-01T14:16:07",
    "name": "[1/3] libcamera: pipeline: rkisp1: Detect invalid sensor configurations",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "40fb3ce6b0512d223157323eb5342707b4df0c22",
    "submitter": {
        "id": 4,
        "url": "https://patchwork.libcamera.org/api/people/4/?format=api",
        "name": "Kieran Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23330/mbox/",
    "series": [
        {
            "id": 5159,
            "url": "https://patchwork.libcamera.org/api/series/5159/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5159",
            "date": "2025-05-01T14:16:06",
            "name": "libcamera: rkisp1: Camera Sensor Mode Validation",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5159/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23330/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23330/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 78683C327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  1 May 2025 14:16:17 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4FEC768ADC;\n\tThu,  1 May 2025 16:16:15 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B45DD68AD0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  1 May 2025 16:16:13 +0200 (CEST)",
            "from Monstersaurus.lgs-net.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 70BE1741;\n\tThu,  1 May 2025 16:16:06 +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=\"RlymVgtk\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1746108966;\n\tbh=XfdBFOWRyFd2f/VcVPkeON4gYAZDif2ht/YNZJEnZ6I=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=RlymVgtkNyNJSmF/n6KqHCrcbz4BnMk+DXkr4yg/pAcDC8v75C6KFQX3YvLLF32A4\n\tVGfOo8gFEZIq6fVczVhKysqiSF2C/w22YhAA0JLsLEOsXV0GYayP/fffD8/rUQp32Z\n\tTWxZpjXiyoQ8t0n/SSDjkYkaWeosRLjhRoEWGCmo=",
        "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "To": "libcamera devel <libcamera-devel@lists.libcamera.org>",
        "Cc": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "Subject": "[PATCH 1/3] libcamera: pipeline: rkisp1: Detect invalid sensor\n\tconfigurations",
        "Date": "Thu,  1 May 2025 15:16:07 +0100",
        "Message-ID": "<20250501141609.717148-2-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.48.1",
        "In-Reply-To": "<20250501141609.717148-1-kieran.bingham@ideasonboard.com>",
        "References": "<20250501141609.717148-1-kieran.bingham@ideasonboard.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": "If we select a Sensor Format that is larger than the ISP capabilities\nthe pipeline will not be able to successfully start.\n\nDetect this during validate - and report accordingly, returning\nan 'Invalid' state to reflect that we were not able to\nreconfigure to adjust to a working state in this instance.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 12 ++++++++++++\n 1 file changed, 12 insertions(+)",
    "diff": "diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 675f0a7490a6..d8c6100946bc 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -673,9 +673,21 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n \tsensorFormat_ = sensor->getFormat(mbusCodes, maxSize,\n \t\t\t\t\t  mainPath->maxResolution());\n \n+\n+\t/*\n+\t * TODO: There doesn't seem to be a valid occasion to set the size to\n+\t * the native resolution if there was not a supported size found above.\n+\t */\n \tif (sensorFormat_.size.isNull())\n \t\tsensorFormat_.size = sensor->resolution();\n \n+\tif (sensorFormat_.size > mainPath->maxResolution()) {\n+\t\tLOG(RkISP1, Error)\n+\t\t\t<< \"Sensor format size \" << sensorFormat_.size\n+\t\t\t<< \" exceeds maximum possible size \" << mainPath->maxResolution();\n+\t\treturn Invalid;\n+\t}\n+\n \treturn status;\n }\n \n",
    "prefixes": [
        "1/3"
    ]
}