Patch Detail
Show a patch.
GET /api/patches/24591/?format=api
{ "id": 24591, "url": "https://patchwork.libcamera.org/api/patches/24591/?format=api", "web_url": "https://patchwork.libcamera.org/patch/24591/", "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": "<20251011160335.50578-4-kieran.bingham@ideasonboard.com>", "date": "2025-10-11T16:03:31", "name": "[RFC,3/7] ipa: mali-c55: Confine blacklevel config", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "f7ebe00e7a054cecbc41ae8e449286f5dc3b7df0", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/24591/mbox/", "series": [ { "id": 5486, "url": "https://patchwork.libcamera.org/api/series/5486/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5486", "date": "2025-10-11T16:03:28", "name": "Preparatory cleanup for libipa rework.", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5486/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/24591/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/24591/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 DD669C3264\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 11 Oct 2025 16:03:50 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 40635603E0;\n\tSat, 11 Oct 2025 18:03:47 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EDD1C603F6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 11 Oct 2025 18:03:42 +0200 (CEST)", "from charm.hippo-penny.ts.net\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 93001C6E;\n\tSat, 11 Oct 2025 18:02:06 +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=\"jyqlr67w\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1760198526;\n\tbh=vZE+O3/GeB6WLj0YL/jTDfnqXpcuUbtztkh+G5cjnzg=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=jyqlr67wHDUw8iajAtLFUKdJrrXBF5V5Kn5b44R9X0Ps1BFpYNR77IyGswrBFf9w/\n\tDSmCJHnSp64FFuhYnhyAoyKSDrXthRwMipWBxcFVFAjFOP4fOzdI+plFKkH0cpCI9z\n\tZU8hwTLANPci4zHSyMb5CcabQVLrexF/2hgVmN4w=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "libcamera devel <libcamera-devel@lists.libcamera.org>", "Cc": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "Subject": "[RFC PATCH 3/7] ipa: mali-c55: Confine blacklevel config", "Date": "Sat, 11 Oct 2025 17:03:31 +0100", "Message-ID": "<20251011160335.50578-4-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.51.0", "In-Reply-To": "<20251011160335.50578-1-kieran.bingham@ideasonboard.com>", "References": "<20251011160335.50578-1-kieran.bingham@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": "Move the black level handling into the blc module.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/ipa/mali-c55/algorithms/blc.cpp | 20 +++++++++++++-------\n src/ipa/mali-c55/ipa_context.h | 1 -\n src/ipa/mali-c55/mali-c55.cpp | 10 ----------\n 3 files changed, 13 insertions(+), 18 deletions(-)", "diff": "diff --git a/src/ipa/mali-c55/algorithms/blc.cpp b/src/ipa/mali-c55/algorithms/blc.cpp\nindex 85642c0435a2..1fdd00ccc2ea 100644\n--- a/src/ipa/mali-c55/algorithms/blc.cpp\n+++ b/src/ipa/mali-c55/algorithms/blc.cpp\n@@ -64,17 +64,23 @@ int BlackLevelCorrection::init([[maybe_unused]] IPAContext &context,\n int BlackLevelCorrection::configure(IPAContext &context,\n \t\t\t\t [[maybe_unused]] const IPACameraSensorInfo &configInfo)\n {\n+\tif (!context.camHelper->blackLevel().has_value())\n+\t\treturn 0;\n+\n+\t/*\n+\t * The black level from CameraSensorHelper is a 16-bit value.\n+\t * The Mali-C55 ISP expects 20-bit settings, so we shift it to\n+\t * the appropriate width\n+\t */\n+\tuint32_t blackLevel = context.camHelper->blackLevel().value() << 4;\n+\n \t/*\n \t * If no Black Levels were passed in through tuning data then we could\n \t * use the value from the CameraSensorHelper if one is available.\n \t */\n-\tif (context.configuration.sensor.blackLevel &&\n-\t !(offset00_ + offset01_ + offset10_ + offset11_)) {\n-\t\toffset00_ = context.configuration.sensor.blackLevel;\n-\t\toffset01_ = context.configuration.sensor.blackLevel;\n-\t\toffset10_ = context.configuration.sensor.blackLevel;\n-\t\toffset11_ = context.configuration.sensor.blackLevel;\n-\t}\n+\tif (blackLevel &&\n+\t !(offset00_ + offset01_ + offset10_ + offset11_))\n+\t\toffset00_ = offset01_ = offset10_ = offset11_ = blackLevel;\n \n \treturn 0;\n }\ndiff --git a/src/ipa/mali-c55/ipa_context.h b/src/ipa/mali-c55/ipa_context.h\nindex bfa805c7b93f..6dd8e5b0edfc 100644\n--- a/src/ipa/mali-c55/ipa_context.h\n+++ b/src/ipa/mali-c55/ipa_context.h\n@@ -31,7 +31,6 @@ struct IPASessionConfiguration {\n \tstruct {\n \t\tBayerFormat::Order bayerOrder;\n \t\tutils::Duration lineDuration;\n-\t\tuint32_t blackLevel;\n \t} sensor;\n };\n \ndiff --git a/src/ipa/mali-c55/mali-c55.cpp b/src/ipa/mali-c55/mali-c55.cpp\nindex 0751513dc584..27f6501085b9 100644\n--- a/src/ipa/mali-c55/mali-c55.cpp\n+++ b/src/ipa/mali-c55/mali-c55.cpp\n@@ -190,16 +190,6 @@ void IPAMaliC55::updateSessionConfiguration(const IPACameraSensorInfo &info,\n \tcontext_.configuration.agc.defaultExposure = defExposure;\n \tcontext_.configuration.agc.minAnalogueGain = context_.camHelper->gain(minGain);\n \tcontext_.configuration.agc.maxAnalogueGain = context_.camHelper->gain(maxGain);\n-\n-\tif (context_.camHelper->blackLevel().has_value()) {\n-\t\t/*\n-\t\t * The black level from CameraSensorHelper is a 16-bit value.\n-\t\t * The Mali-C55 ISP expects 20-bit settings, so we shift it to\n-\t\t * the appropriate width\n-\t\t */\n-\t\tcontext_.configuration.sensor.blackLevel =\n-\t\t\tcontext_.camHelper->blackLevel().value() << 4;\n-\t}\n }\n \n void IPAMaliC55::updateControls(const IPACameraSensorInfo &sensorInfo,\n", "prefixes": [ "RFC", "3/7" ] }