Patch Detail
Show a patch.
GET /api/patches/22209/?format=api
{ "id": 22209, "url": "https://patchwork.libcamera.org/api/patches/22209/?format=api", "web_url": "https://patchwork.libcamera.org/patch/22209/", "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": "<20241206101344.767170-18-stefan.klug@ideasonboard.com>", "date": "2024-12-06T10:13:39", "name": "[v3,17/17] libcamera: pipeline: rkisp1: Limit sensor size to max resolution", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "f34922292edee9678c41ca4f8849f541f3755541", "submitter": { "id": 184, "url": "https://patchwork.libcamera.org/api/people/184/?format=api", "name": "Stefan Klug", "email": "stefan.klug@ideasonboard.com" }, "delegate": { "id": 17, "url": "https://patchwork.libcamera.org/api/users/17/?format=api", "username": "epaul", "first_name": "Paul", "last_name": "Elder", "email": "paul.elder@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/patch/22209/mbox/", "series": [ { "id": 4854, "url": "https://patchwork.libcamera.org/api/series/4854/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4854", "date": "2024-12-06T10:13:22", "name": "rkisp1: Fix aspect ratio and ScalerCrop", "version": 3, "mbox": "https://patchwork.libcamera.org/series/4854/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/22209/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/22209/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 F2EB2BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 6 Dec 2024 10:14:38 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9BAAB6615E;\n\tFri, 6 Dec 2024 11:14:38 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B925A6615E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 6 Dec 2024 11:14:36 +0100 (CET)", "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:3543:aebe:e043:ef86])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6A38A9FC;\n\tFri, 6 Dec 2024 11:14:07 +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=\"exmpAeJp\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1733480047;\n\tbh=lyXsebzoyYik2koXgwhSPV/lOyjoeiT5oyUKcJDoxP4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=exmpAeJp3XULm2nPEMZqzSDLWvhXUXZUcc6NultY+nZfVYvLUfFs+gwBL5PSLO9VJ\n\tta+1CA7CoNL2vR2NbpcIb0VIERSzs6JYNCbb5B6C0nlcA7y4YnL27t34H0Co6FTETY\n\t365mb9I8/pnSTx/ph2L+qtO77aVflHZzUd9Fs29k=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>", "Subject": "[PATCH v3 17/17] libcamera: pipeline: rkisp1: Limit sensor size to\n\tmax resolution", "Date": "Fri, 6 Dec 2024 11:13:39 +0100", "Message-ID": "<20241206101344.767170-18-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20241206101344.767170-1-stefan.klug@ideasonboard.com>", "References": "<20241206101344.767170-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>\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 2baff6da7cb7..4dcc5a4fa6a1 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": [ "v3", "17/17" ] }