{"id":20588,"url":"https://patchwork.libcamera.org/api/1.1/patches/20588/?format=json","web_url":"https://patchwork.libcamera.org/patch/20588/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20240704162035.15074-11-laurent.pinchart@ideasonboard.com>","date":"2024-07-04T16:20:34","name":"[v2,10/11] ipa: rkisp1: Add compand feature flag to ipa context","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"4b1b0e3410f5541857d3d5e449b97be2bca442a9","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/20588/mbox/","series":[{"id":4445,"url":"https://patchwork.libcamera.org/api/1.1/series/4445/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4445","date":"2024-07-04T16:20:24","name":"rkisp1: Support BLS on i.MX8MP","version":2,"mbox":"https://patchwork.libcamera.org/series/4445/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/20588/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/20588/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 C45AFBD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  4 Jul 2024 16:21:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1187963369;\n\tThu,  4 Jul 2024 18:21:24 +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 4FBBB63352\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  4 Jul 2024 18:21:06 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(117.145-247-81.adsl-dyn.isp.belgacom.be [81.247.145.117])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5B06D63D;\n\tThu,  4 Jul 2024 18:20:37 +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=\"KXLkJXvv\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1720110037;\n\tbh=aLm4s5+JKNz0BNDThPn/GHiW4M64IQkP4lSS3m2pS70=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=KXLkJXvvI3VSjZwICNZynI3A5slxA2/e0gKyY67ZRLXQ5mub6x5o0rkxA4A1xwEhf\n\t7L8jBB6KEf4XPRIxpkazrlTWU7nYuvkQ1jCTRaRXGuluYWkDZrrHPdxTAx24z3fCbI\n\thbL+ke7nOaPqCbgPwHjRrEe7b1ZjTzoC52PL2DIo=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tPaul Elder <paul.elder@ideasonboard.com>","Subject":"[PATCH v2 10/11] ipa: rkisp1: Add compand feature flag to ipa\n\tcontext","Date":"Thu,  4 Jul 2024 19:20:34 +0300","Message-ID":"<20240704162035.15074-11-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.44.2","In-Reply-To":"<20240704162035.15074-1-laurent.pinchart@ideasonboard.com>","References":"<20240704162035.15074-1-laurent.pinchart@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":"From: Paul Elder <paul.elder@ideasonboard.com>\n\nAdd a compand feature flag to the hardware settings section of the IPA\ncontext, so that we can act accordingly for black level subtraction, and\nto pave the way to skipping companding appropriately when support for it\nis added.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/ipa/rkisp1/ipa_context.h |  1 +\n src/ipa/rkisp1/rkisp1.cpp    | 14 +++++++++++++-\n 2 files changed, 14 insertions(+), 1 deletion(-)","diff":"diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\nindex 1d0e9030af1c..f5503ada7d8b 100644\n--- a/src/ipa/rkisp1/ipa_context.h\n+++ b/src/ipa/rkisp1/ipa_context.h\n@@ -31,6 +31,7 @@ struct IPAHwSettings {\n \tunsigned int numHistogramBins;\n \tunsigned int numHistogramWeights;\n \tunsigned int numGammaOutSamples;\n+\tbool compand;\n };\n \n struct IPASessionConfiguration {\ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex 1a89eabf10b4..083d5b08caff 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -93,6 +93,15 @@ const IPAHwSettings ipaHwSettingsV10{\n \tRKISP1_CIF_ISP_HIST_BIN_N_MAX_V10,\n \tRKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10,\n \tRKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10,\n+\tfalse,\n+};\n+\n+const IPAHwSettings ipaHwSettingsIMX8MP{\n+\tRKISP1_CIF_ISP_AE_MEAN_MAX_V10,\n+\tRKISP1_CIF_ISP_HIST_BIN_N_MAX_V10,\n+\tRKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10,\n+\tRKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10,\n+\ttrue,\n };\n \n const IPAHwSettings ipaHwSettingsV12{\n@@ -100,6 +109,7 @@ const IPAHwSettings ipaHwSettingsV12{\n \tRKISP1_CIF_ISP_HIST_BIN_N_MAX_V12,\n \tRKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12,\n \tRKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12,\n+\tfalse,\n };\n \n /* List of controls handled by the RkISP1 IPA */\n@@ -130,9 +140,11 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision,\n \t/* \\todo Add support for other revisions */\n \tswitch (hwRevision) {\n \tcase RKISP1_V10:\n-\tcase RKISP1_V_IMX8MP:\n \t\tcontext_.hw = &ipaHwSettingsV10;\n \t\tbreak;\n+\tcase RKISP1_V_IMX8MP:\n+\t\tcontext_.hw = &ipaHwSettingsIMX8MP;\n+\t\tbreak;\n \tcase RKISP1_V12:\n \t\tcontext_.hw = &ipaHwSettingsV12;\n \t\tbreak;\n","prefixes":["v2","10/11"]}