Show a patch.

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

{
    "id": 22366,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/22366/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/22366/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20241216154124.203650-21-stefan.klug@ideasonboard.com>",
    "date": "2024-12-16T15:41:00",
    "name": "[v4,20/20] pipeline: rkisp1: Limit sensor size to max resolution",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "f34922292edee9678c41ca4f8849f541f3755541",
    "submitter": {
        "id": 184,
        "url": "https://patchwork.libcamera.org/api/1.1/people/184/?format=api",
        "name": "Stefan Klug",
        "email": "stefan.klug@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/22366/mbox/",
    "series": [
        {
            "id": 4896,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4896/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4896",
            "date": "2024-12-16T15:40:40",
            "name": "rkisp1: Fix aspect ratio and ScalerCrop",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/4896/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/22366/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/22366/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 0EE9EC32F6\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 16 Dec 2024 15:42:46 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8D11167FA7;\n\tMon, 16 Dec 2024 16:42:45 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BBE4867FA4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 16 Dec 2024 16:42:41 +0100 (CET)",
            "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:bfdf:3a3c:e45:66e3])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2F0EF82A;\n\tMon, 16 Dec 2024 16:42:05 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"uOX+Dgat\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1734363725;\n\tbh=jeL0tv/MP6uIXkrmDqdzN8kqG5EECeHMHez1p3CUyLA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=uOX+DgattsfmvBeTQVm6JjSUsi8G4iHkYDi4+PXq7SLN8MfhNqGA0M1sxKv2t2+ig\n\teSaSv5ywnwOr1+rG8wq6vIDZ/VWL8ybml/SrIt8NijibC9Lm2f4HHSBKe13qQLR0GH\n\tijV2YRWEC/vQCLEHmDkDnSI0P+6Mr+Zm9qOiHo/U=",
        "From": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tPaul Elder <paul.elder@ideasonboard.com>",
        "Subject": "[PATCH v4 20/20] pipeline: rkisp1: Limit sensor size to max\n\tresolution",
        "Date": "Mon, 16 Dec 2024 16:41:00 +0100",
        "Message-ID": "<20241216154124.203650-21-stefan.klug@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20241216154124.203650-1-stefan.klug@ideasonboard.com>",
        "References": "<20241216154124.203650-1-stefan.klug@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": "In RkISPPath::validate() the sensor sizes are correctly filtered to the\nones supported by the ISP. But later in RkISPPipeline::configure() the\nconfigured stream size is passed to sensor->getFormat() and the\nCameraSensor class chooses the best sensor format for the requested\nstream size. This can result in a sensor format that is too big for the\nISP. Fix that by supplying the maximum resolution supported by the ISP\nto setFormat().\n\nFixes: 761545407c76 (\"pipeline: rkisp1: Filter out sensor sizes not supported by the pipeline\")\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n---\nChanges in v4:\n- Changed commit tite prefix to pipeline:\n\nChanges in v3:\n- Added this patch\n---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp    | 3 ++-\n src/libcamera/pipeline/rkisp1/rkisp1_path.h | 1 +\n 2 files changed, 3 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 432a01694913..35c793da9bba 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -677,7 +677,8 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n \t\t\t       [](const auto &value) { return value.second; });\n \t}\n \n-\tsensorFormat_ = sensor->getFormat(mbusCodes, maxSize);\n+\tsensorFormat_ = sensor->getFormat(mbusCodes, maxSize,\n+\t\t\t\t\t  mainPath->maxResolution());\n \n \tif (sensorFormat_.size.isNull())\n \t\tsensorFormat_.size = sensor->resolution();\ndiff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\nindex 45be8476616c..2a1ef0abe6d1 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n@@ -62,6 +62,7 @@ public:\n \n \tint queueBuffer(FrameBuffer *buffer) { return video_->queueBuffer(buffer); }\n \tSignal<FrameBuffer *> &bufferReady() { return video_->bufferReady; }\n+\tconst Size &maxResolution() const { return maxResolution_; }\n \n private:\n \tvoid populateFormats();\n",
    "prefixes": [
        "v4",
        "20/20"
    ]
}