Patch Detail
Show a patch.
GET /api/patches/23690/?format=api
{ "id": 23690, "url": "https://patchwork.libcamera.org/api/patches/23690/?format=api", "web_url": "https://patchwork.libcamera.org/patch/23690/", "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": "<20250630081126.2384387-5-stefan.klug@ideasonboard.com>", "date": "2025-06-30T08:11:19", "name": "[v1,4/6] pipeline: rkisp1: Properly handle the bufferCount set in the stream configuration", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "226fafda03e19028ed23a671a3d19c5c4a4d5ada", "submitter": { "id": 184, "url": "https://patchwork.libcamera.org/api/people/184/?format=api", "name": "Stefan Klug", "email": "stefan.klug@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/23690/mbox/", "series": [ { "id": 5257, "url": "https://patchwork.libcamera.org/api/series/5257/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5257", "date": "2025-06-30T08:11:15", "name": "rkisp1: Allow usage of more than 4 buffers", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5257/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/23690/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/23690/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 CB320C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 30 Jun 2025 08:11:50 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6C10468E11;\n\tMon, 30 Jun 2025 10:11:50 +0200 (CEST)", "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 4879368E0F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 Jun 2025 10:11:44 +0200 (CEST)", "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:883b:eaf8:7aec:d1d4])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id B2E721352; \n\tMon, 30 Jun 2025 10:11:22 +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=\"cQsWLDaO\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1751271082;\n\tbh=gaAqoFHAde8LKprVSI5/jyKy39lo8PbGwa7J1cmkfuw=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=cQsWLDaOAF/YX6Dd8yeEjlyUNhj0MpFipNenyhZYEn0u36SMBO92wfUvUYitI7iVt\n\tz7CAJtfQlshkoaTX3epYJsP6uymnDbeu+I7QcKmyXGcok7xPQKFHfa3YMYqsPmP40S\n\tP37RLAXWbngS7xax+JF+WhU5NBoBezxumX4Wp8Ss=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>", "Subject": "[PATCH v1 4/6] pipeline: rkisp1: Properly handle the bufferCount set\n\tin the stream configuration", "Date": "Mon, 30 Jun 2025 10:11:19 +0200", "Message-ID": "<20250630081126.2384387-5-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.48.1", "In-Reply-To": "<20250630081126.2384387-1-stefan.klug@ideasonboard.com>", "References": "<20250630081126.2384387-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": "The bufferCount is reset to a hardcoded value of 4 in RkISP1Path::validate().\nKeep the default value of 4 but do not reset it, if it was changed.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n\n---\n\nChanges in v1:\n- Removed todo comment that was solved by this change\n---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 5 +++--\n src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 7 ++-----\n src/libcamera/pipeline/rkisp1/rkisp1_path.h | 4 +---\n 3 files changed, 6 insertions(+), 10 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex bd14ab237064..9d7b05490af6 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -790,6 +790,7 @@ PipelineHandlerRkISP1::generateConfiguration(Camera *camera,\n \t\t\treturn nullptr;\n \n \t\tcfg.colorSpace = colorSpace;\n+\t\tcfg.bufferCount = kPipelineDepth;\n \t\tconfig->addConfiguration(cfg);\n \t}\n \n@@ -1123,14 +1124,14 @@ int PipelineHandlerRkISP1::start(Camera *camera, [[maybe_unused]] const ControlL\n \t}\n \n \tif (data->mainPath_->isEnabled()) {\n-\t\tret = mainPath_.start();\n+\t\tret = mainPath_.start(maxQueuedRequestsDevice_);\n \t\tif (ret)\n \t\t\treturn ret;\n \t\tactions += [&]() { mainPath_.stop(); };\n \t}\n \n \tif (hasSelfPath_ && data->selfPath_->isEnabled()) {\n-\t\tret = selfPath_.start();\n+\t\tret = selfPath_.start(maxQueuedRequestsDevice_);\n \t\tif (ret)\n \t\t\treturn ret;\n \t}\ndiff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\nindex 64018dc5b2f4..8ea5500d4080 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n@@ -249,7 +249,6 @@ RkISP1Path::generateConfiguration(const CameraSensor *sensor, const Size &size,\n \tStreamConfiguration cfg(formats);\n \tcfg.pixelFormat = format;\n \tcfg.size = streamSize;\n-\tcfg.bufferCount = RKISP1_BUFFER_COUNT;\n \n \treturn cfg;\n }\n@@ -383,7 +382,6 @@ RkISP1Path::validate(const CameraSensor *sensor,\n \n \tcfg->size.boundTo(maxResolution);\n \tcfg->size.expandTo(minResolution);\n-\tcfg->bufferCount = RKISP1_BUFFER_COUNT;\n \n \tV4L2DeviceFormat format;\n \tformat.fourcc = video_->toV4L2PixelFormat(cfg->pixelFormat);\n@@ -480,15 +478,14 @@ int RkISP1Path::configure(const StreamConfiguration &config,\n \treturn 0;\n }\n \n-int RkISP1Path::start()\n+int RkISP1Path::start(unsigned int bufferCount)\n {\n \tint ret;\n \n \tif (running_)\n \t\treturn -EBUSY;\n \n-\t/* \\todo Make buffer count user configurable. */\n-\tret = video_->importBuffers(RKISP1_BUFFER_COUNT);\n+\tret = video_->importBuffers(bufferCount);\n \tif (ret)\n \t\treturn ret;\n \ndiff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\nindex 430181d371a7..0b60c499ac64 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n@@ -58,7 +58,7 @@ public:\n \t\treturn video_->exportBuffers(bufferCount, buffers);\n \t}\n \n-\tint start();\n+\tint start(unsigned int bufferCount);\n \tvoid stop();\n \n \tint queueBuffer(FrameBuffer *buffer) { return video_->queueBuffer(buffer); }\n@@ -69,8 +69,6 @@ private:\n \tvoid populateFormats();\n \tSize filterSensorResolution(const CameraSensor *sensor);\n \n-\tstatic constexpr unsigned int RKISP1_BUFFER_COUNT = 4;\n-\n \tconst char *name_;\n \tbool running_;\n \n", "prefixes": [ "v1", "4/6" ] }