Patch Detail
Show a patch.
GET /api/patches/23133/?format=api
{ "id": 23133, "url": "https://patchwork.libcamera.org/api/patches/23133/?format=api", "web_url": "https://patchwork.libcamera.org/patch/23133/", "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": "<20250403180902.484863-1-foss+libcamera@0leil.net>", "date": "2025-04-03T18:09:00", "name": "Revert \"libcamera: rkisp1: Eliminate hard-coded resizer limits\"", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "55419303054a15614cdb588cdfbb3fd6987cf17f", "submitter": { "id": 120, "url": "https://patchwork.libcamera.org/api/people/120/?format=api", "name": "Quentin Schulz", "email": "foss+libcamera@0leil.net" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/23133/mbox/", "series": [ { "id": 5112, "url": "https://patchwork.libcamera.org/api/series/5112/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5112", "date": "2025-04-03T18:09:00", "name": "Revert \"libcamera: rkisp1: Eliminate hard-coded resizer limits\"", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5112/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/23133/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/23133/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 D770AC3213\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 3 Apr 2025 18:09:36 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 16A2A68994;\n\tThu, 3 Apr 2025 20:09:36 +0200 (CEST)", "from smtp-190e.mail.infomaniak.ch (smtp-190e.mail.infomaniak.ch\n\t[IPv6:2001:1600:4:17::190e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C463768980\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 3 Apr 2025 20:09:33 +0200 (CEST)", "from smtp-3-0001.mail.infomaniak.ch (smtp-3-0001.mail.infomaniak.ch\n\t[10.4.36.108])\n\tby smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id\n\t4ZT8rs4G2ZzJ1w; Thu, 3 Apr 2025 20:09:33 +0200 (CEST)", "from unknown by smtp-3-0001.mail.infomaniak.ch (Postfix) with\n\tESMTPA id 4ZT8rs01wHzXkK; Thu, 3 Apr 2025 20:09:32 +0200 (CEST)" ], "From": "Quentin Schulz <foss+libcamera@0leil.net>", "To": "", "Cc": "Umang Jain <umang.jain@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org,\n\tQuentin Schulz <quentin.schulz@cherry.de>", "Subject": "[PATCH] Revert \"libcamera: rkisp1: Eliminate hard-coded resizer\n\tlimits\"", "Date": "Thu, 3 Apr 2025 20:09:00 +0200", "Message-ID": "<20250403180902.484863-1-foss+libcamera@0leil.net>", "X-Mailer": "git-send-email 2.49.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Infomaniak-Routing": "alpha", "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": "From: Quentin Schulz <quentin.schulz@cherry.de>\n\nThis reverts commit e85c7ddd38ce8456ab01c2a73baf9e788f6a462e.\n\nLinux kernel predating 6.4 (specifically commit 7cfb35d3a800 (\"media:\nrkisp1: Implement ENUM_FRAMESIZES\") do not have the ioctl in rkisp1\ndriver required to dynamically query the resizer limits.\n\nBecause of that, maxResolution and minResolution are both {0, 0}\n(default value for Size objects) which means filterSensorResolution()\nwill create an entry for the sensor in sensorSizesMap_ but because the\nsensor resolution cannot fit inside the min and max resolution of the\nrkisp1, no size is put into this entry in sensorSizesMap_.\nOn the next call to filterSensorResolution(),\nsensorSizesMap_.find(sensor) will return the entry but when attempting\nto call back() on iter->second, it'll trigger an assert because the size\narray is empty.\n\nLinux kernel 6.1 is supported until December 2027, so it seems premature\nto get rid of those hard-coded resizer limits before this happens.\n\nLet's keep the hard-coded resizer limits by default, they can still be\nqueried if necessary.\n\nFixes: 761545407c76 (\"pipeline: rkisp1: Filter out sensor sizes not supported by the pipeline\")\nSigned-off-by: Quentin Schulz <quentin.schulz@cherry.de>\n---\n src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 21 +++++++++++++------\n src/libcamera/pipeline/rkisp1/rkisp1_path.h | 3 ++-\n 2 files changed, 17 insertions(+), 7 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\nindex eee5b09e..d43f31e1 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n@@ -54,8 +54,11 @@ const std::map<PixelFormat, uint32_t> formatToMediaBus = {\n \n } /* namespace */\n \n-RkISP1Path::RkISP1Path(const char *name, const Span<const PixelFormat> &formats)\n-\t: name_(name), running_(false), formats_(formats), link_(nullptr)\n+RkISP1Path::RkISP1Path(const char *name, const Span<const PixelFormat> &formats,\n+\t\t const Size &minResolution, const Size &maxResolution)\n+\t: name_(name), running_(false), formats_(formats),\n+\t minResolution_(minResolution), maxResolution_(maxResolution),\n+\t link_(nullptr)\n {\n }\n \n@@ -517,10 +520,12 @@ void RkISP1Path::stop()\n }\n \n /*\n- * \\todo Remove the hardcoded formats once all users will have migrated to a\n- * recent enough kernel.\n+ * \\todo Remove the hardcoded resolutions and formats once all users will have\n+ * migrated to a recent enough kernel.\n */\n namespace {\n+constexpr Size RKISP1_RSZ_MP_SRC_MIN{ 32, 16 };\n+constexpr Size RKISP1_RSZ_MP_SRC_MAX{ 4416, 3312 };\n constexpr std::array<PixelFormat, 18> RKISP1_RSZ_MP_FORMATS{\n \tformats::YUYV,\n \tformats::NV16,\n@@ -542,6 +547,8 @@ constexpr std::array<PixelFormat, 18> RKISP1_RSZ_MP_FORMATS{\n \tformats::SRGGB12,\n };\n \n+constexpr Size RKISP1_RSZ_SP_SRC_MIN{ 32, 16 };\n+constexpr Size RKISP1_RSZ_SP_SRC_MAX{ 1920, 1920 };\n constexpr std::array<PixelFormat, 8> RKISP1_RSZ_SP_FORMATS{\n \tformats::YUYV,\n \tformats::NV16,\n@@ -555,12 +562,14 @@ constexpr std::array<PixelFormat, 8> RKISP1_RSZ_SP_FORMATS{\n } /* namespace */\n \n RkISP1MainPath::RkISP1MainPath()\n-\t: RkISP1Path(\"main\", RKISP1_RSZ_MP_FORMATS)\n+\t: RkISP1Path(\"main\", RKISP1_RSZ_MP_FORMATS,\n+\t\t RKISP1_RSZ_MP_SRC_MIN, RKISP1_RSZ_MP_SRC_MAX)\n {\n }\n \n RkISP1SelfPath::RkISP1SelfPath()\n-\t: RkISP1Path(\"self\", RKISP1_RSZ_SP_FORMATS)\n+\t: RkISP1Path(\"self\", RKISP1_RSZ_SP_FORMATS,\n+\t\t RKISP1_RSZ_SP_SRC_MIN, RKISP1_RSZ_SP_SRC_MAX)\n {\n }\n \ndiff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\nindex 2a1ef0ab..430181d3 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n@@ -34,7 +34,8 @@ struct V4L2SubdeviceFormat;\n class RkISP1Path\n {\n public:\n-\tRkISP1Path(const char *name, const Span<const PixelFormat> &formats);\n+\tRkISP1Path(const char *name, const Span<const PixelFormat> &formats,\n+\t\t const Size &minResolution, const Size &maxResolution);\n \n \tbool init(MediaDevice *media);\n \n", "prefixes": [] }