Patch Detail
Show a patch.
GET /api/patches/25190/?format=api
{ "id": 25190, "url": "https://patchwork.libcamera.org/api/patches/25190/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25190/", "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": "<20251125162851.2301793-12-stefan.klug@ideasonboard.com>", "date": "2025-11-25T16:28:23", "name": "[v3,11/29] libcamera: rkisp1: Move useDewarper_ flag into RkISP1CameraData", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "17eac80d72eb489aafb90945ba0eca6a4246d820", "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/25190/mbox/", "series": [ { "id": 5613, "url": "https://patchwork.libcamera.org/api/series/5613/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5613", "date": "2025-11-25T16:28:12", "name": "Full dewarper support on imx8mp", "version": 3, "mbox": "https://patchwork.libcamera.org/series/5613/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25190/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25190/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 49498C333C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 Nov 2025 16:29:29 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0631A60AA9;\n\tTue, 25 Nov 2025 17:29:29 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2EA7D60A86\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Nov 2025 17:29:27 +0100 (CET)", "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:bae1:340c:573c:570b])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 3C8E61E4D; \n\tTue, 25 Nov 2025 17:27:18 +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=\"VVw1fHUd\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1764088038;\n\tbh=iFDSPjubyYBD2SEB3gWp3Hvtpge3dVnIDQbTk0mhPyI=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=VVw1fHUdqHLVMMEkNLNdHDHZnsHAhN7GevCH+D6iSN0Ubc8xYpKeym24ZrZFj182X\n\tpmQrJwY0x/GWJgHnUGmPG6F/l0MFpWepcbWwhAmZTqCmZbtZc9s/ljEyho5MUkeFfo\n\tmjz8pR52yNS8xgdDlrjN+p5r/GvaIkmy4DfOBUN4=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>,\n\tPaul Elder <paul.elder@ideasonboard.com>", "Subject": "[PATCH v3 11/29] libcamera: rkisp1: Move useDewarper_ flag into\n\tRkISP1CameraData", "Date": "Tue, 25 Nov 2025 17:28:23 +0100", "Message-ID": "<20251125162851.2301793-12-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.51.0", "In-Reply-To": "<20251125162851.2301793-1-stefan.klug@ideasonboard.com>", "References": "<20251125162851.2301793-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 decision if the dewarper shall be used is not per pipeline but per\ncamera and per configuration (raw streams can't use it). Move the\ncorresponding flag into the camera data class. Rename the flag to\n\"usesDewarper\" which is easier understand when we later add the ability\nto enable/disable the dewarper on a per camera basis which will be\nexpressed using a \"canUseDewarper\" flag.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n---\n\nChanges in v3:\n- Collected tags\n---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 28 ++++++++++++------------\n 1 file changed, 14 insertions(+), 14 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex b56b306f1ad1..a3b92804c69f 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -122,6 +122,8 @@ public:\n \t */\n \tMediaPipeline pipe_;\n \n+\tbool usesDewarper_;\n+\n private:\n \tvoid paramsComputed(unsigned int frame, unsigned int bytesused);\n \tvoid setSensorControls(unsigned int frame,\n@@ -232,7 +234,6 @@ private:\n \n \tstd::unique_ptr<V4L2M2MConverter> dewarper_;\n \tRectangle scalerMaxCrop_;\n-\tbool useDewarper_;\n \n \tstd::optional<Rectangle> activeCrop_;\n \n@@ -280,7 +281,7 @@ RkISP1FrameInfo *RkISP1Frames::create(const RkISP1CameraData *data, Request *req\n \t\tstatBuffer = pipe_->availableStatBuffers_.front();\n \t\tpipe_->availableStatBuffers_.pop();\n \n-\t\tif (pipe_->useDewarper_) {\n+\t\tif (data->usesDewarper_) {\n \t\t\tmainPathBuffer = pipe_->availableMainPathBuffers_.front();\n \t\t\tpipe_->availableMainPathBuffers_.pop();\n \t\t}\n@@ -710,8 +711,7 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n */\n \n PipelineHandlerRkISP1::PipelineHandlerRkISP1(CameraManager *manager)\n-\t: PipelineHandler(manager, kRkISP1MaxQueuedRequests),\n-\t hasSelfPath_(true), useDewarper_(false)\n+\t: PipelineHandler(manager, kRkISP1MaxQueuedRequests), hasSelfPath_(true)\n {\n }\n \n@@ -874,7 +874,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n \tconst PixelFormat &streamFormat = config->at(0).pixelFormat;\n \tconst PixelFormatInfo &info = PixelFormatInfo::info(streamFormat);\n \tisRaw_ = info.colourEncoding == PixelFormatInfo::ColourEncodingRAW;\n-\tuseDewarper_ = dewarper_ && !isRaw_;\n+\tdata->usesDewarper_ = dewarper_ && !isRaw_;\n \n \t/* YUYV8_2X8 is required on the ISP source path pad for YUV output. */\n \tif (!isRaw_)\n@@ -888,7 +888,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n \t\t/* imx8mp has only a single path. */\n \t\tconst auto &cfg = config->at(0);\n \t\tSize ispCrop = format.size.boundedToAspectRatio(cfg.size);\n-\t\tif (useDewarper_)\n+\t\tif (data->usesDewarper_)\n \t\t\tispCrop = dewarper_->adjustInputSize(cfg.pixelFormat,\n \t\t\t\t\t\t\t ispCrop);\n \t\telse\n@@ -929,7 +929,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n \t\t\tstreamConfig[0] = IPAStream(cfg.pixelFormat,\n \t\t\t\t\t\t cfg.size);\n \t\t\t/* Configure dewarp */\n-\t\t\tif (dewarper_ && !isRaw_) {\n+\t\t\tif (data->usesDewarper_) {\n \t\t\t\toutputCfgs.push_back(const_cast<StreamConfiguration &>(cfg));\n \t\t\t\tret = dewarper_->configure(cfg, outputCfgs);\n \t\t\t\tif (ret)\n@@ -994,7 +994,7 @@ int PipelineHandlerRkISP1::exportFrameBuffers([[maybe_unused]] Camera *camera, S\n \t\t * It has mainpath and no self path. Hence, export buffers from\n \t\t * dewarper just for the main path stream, for now.\n \t\t */\n-\t\tif (useDewarper_)\n+\t\tif (data->usesDewarper_)\n \t\t\treturn dewarper_->exportBuffers(&data->mainPathStream_, count, buffers);\n \t\telse\n \t\t\treturn mainPath_.exportBuffers(count, buffers);\n@@ -1028,7 +1028,7 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n \t}\n \n \t/* If the dewarper is being used, allocate internal buffers for ISP. */\n-\tif (useDewarper_) {\n+\tif (data->usesDewarper_) {\n \t\tret = mainPath_.exportBuffers(kRkISP1MinBufferCount, &mainPathBuffers_);\n \t\tif (ret < 0)\n \t\t\treturn ret;\n@@ -1131,7 +1131,7 @@ int PipelineHandlerRkISP1::start(Camera *camera, [[maybe_unused]] const ControlL\n \t\t}\n \t\tactions += [&]() { stat_->streamOff(); };\n \n-\t\tif (useDewarper_) {\n+\t\tif (data->usesDewarper_) {\n \t\t\tret = dewarper_->start();\n \t\t\tif (ret) {\n \t\t\t\tLOG(RkISP1, Error) << \"Failed to start dewarper\";\n@@ -1186,7 +1186,7 @@ void PipelineHandlerRkISP1::stopDevice(Camera *camera)\n \t\t\tLOG(RkISP1, Warning)\n \t\t\t\t<< \"Failed to stop parameters for \" << camera->id();\n \n-\t\tif (useDewarper_)\n+\t\tif (data->usesDewarper_)\n \t\t\tdewarper_->stop();\n \t}\n \n@@ -1282,7 +1282,7 @@ int PipelineHandlerRkISP1::updateControls(RkISP1CameraData *data)\n {\n \tControlInfoMap::Map controls;\n \n-\tif (dewarper_) {\n+\tif (data->usesDewarper_) {\n \t\tstd::pair<Rectangle, Rectangle> cropLimits;\n \t\tif (dewarper_->isConfigured(&data->mainPathStream_))\n \t\t\tcropLimits = dewarper_->inputCropBounds(&data->mainPathStream_);\n@@ -1452,7 +1452,7 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator)\n \t\t\t\tthis, &PipelineHandlerRkISP1::dewarpBufferReady);\n \n \t\t\tLOG(RkISP1, Info)\n-\t\t\t\t<< \"Using DW100 dewarper \" << dewarper_->deviceNode();\n+\t\t\t\t<< \"Found DW100 dewarper \" << dewarper_->deviceNode();\n \t\t} else {\n \t\t\tLOG(RkISP1, Warning)\n \t\t\t\t<< \"Found DW100 dewarper \" << dewarper_->deviceNode()\n@@ -1557,7 +1557,7 @@ void PipelineHandlerRkISP1::imageBufferReady(FrameBuffer *buffer)\n \t\t\tinfo->metadataProcessed = true;\n \t}\n \n-\tif (!useDewarper_) {\n+\tif (!data->usesDewarper_) {\n \t\tcompleteBuffer(request, buffer);\n \t\ttryCompleteRequest(info);\n \n", "prefixes": [ "v3", "11/29" ] }