Show a patch.

GET /api/1.1/patches/16819/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 16819,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/16819/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16819/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20220727023816.30008-8-laurent.pinchart@ideasonboard.com>",
    "date": "2022-07-27T02:38:09",
    "name": "[libcamera-devel,v7,07/14] ipa: raspberrypi: Replace Fatal log by error propagation",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "57da74cda240233c2f5e010f35ac4e64ac69d502",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/16819/mbox/",
    "series": [
        {
            "id": 3331,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3331/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3331",
            "date": "2022-07-27T02:38:02",
            "name": "Replace boost JSON parser with libyaml in Raspberry Pi IPA",
            "version": 7,
            "mbox": "https://patchwork.libcamera.org/series/3331/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16819/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16819/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 C4DBEBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 27 Jul 2022 02:38:31 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 523656332F;\n\tWed, 27 Jul 2022 04:38:31 +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 4AD0563325\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Jul 2022 04:38:26 +0200 (CEST)",
            "from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D8A0856D;\n\tWed, 27 Jul 2022 04:38:25 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658889511;\n\tbh=B2W9uXKQJikhxUM8xy+8cNGQA6jiCxgAksDwLjCzH6g=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=1Q1PJ8Cc/Ef5GHFZ1dbst4tdMhXCDEHP2pO9jpz0osIZxNg4mP2LdVPXXT4Ov9vzS\n\thiz7OJEGeSoCi/rUVitdg5VNMGzlweWxn+evnUBmsce/6CilNpR9phQACs7h++Hqgl\n\tlfutax0iVRUttlZ44x8Q6snA9io84kPPOIs4w2aJfucZOJytkPxQpOz4Ig61F8/yHB\n\tNgISyxXjBm+GSZlRTvd1TeZuNk1t0eGXq/miLuQF836qh0Wt/ma73Jx0FF9yAVXdpb\n\tsWkhcK9oY/u5INWl1b82mIlcWQDXBZsWbOKPBSfjqgaIJLIzusPdlqyeJ7t/Te0hBQ\n\tQzWW6ubIZDZHw==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1658889506;\n\tbh=B2W9uXKQJikhxUM8xy+8cNGQA6jiCxgAksDwLjCzH6g=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=N9hdvLBb9Dti+PiPMjaQ2MpFysMahlrUKZkSaxlez379oLd5H+UsJHJ/OdK44/+12\n\tYXIvvJmUkrEwJYtGGpTjA/26RndZMZ/trST/hqzmnRJb4DT89kEWhJybiafoaKF7ux\n\tRGmPNMVBius+oO83taKlhYGr5EVneX1Fl+CmmxW8="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"N9hdvLBb\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed, 27 Jul 2022 05:38:09 +0300",
        "Message-Id": "<20220727023816.30008-8-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.35.1",
        "In-Reply-To": "<20220727023816.30008-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20220727023816.30008-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v7 07/14] ipa: raspberrypi: Replace Fatal\n\tlog by error propagation",
        "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>",
        "From": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Replace the Fatal log messages that cause an abort during tuning data\nread with Error messages and proper error propagation to the caller.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/raspberrypi/controller/rpi/agc.cpp  | 36 ++++++++++----\n src/ipa/raspberrypi/controller/rpi/alsc.cpp | 52 ++++++++++++++-------\n src/ipa/raspberrypi/controller/rpi/awb.cpp  | 42 +++++++++++------\n src/ipa/raspberrypi/controller/rpi/ccm.cpp  | 24 ++++++----\n src/ipa/raspberrypi/controller/rpi/dpc.cpp  |  6 ++-\n src/ipa/raspberrypi/controller/rpi/geq.cpp  |  6 ++-\n 6 files changed, 113 insertions(+), 53 deletions(-)",
    "diff": "diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp\nindex 93f966a1d5ce..153493f8b8e2 100644\n--- a/src/ipa/raspberrypi/controller/rpi/agc.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n@@ -34,13 +34,20 @@ static constexpr unsigned int PipelineBits = 13; /* seems to be a 13-bit pipelin\n int AgcMeteringMode::read(boost::property_tree::ptree const &params)\n {\n \tint num = 0;\n+\n \tfor (auto &p : params.get_child(\"weights\")) {\n-\t\tif (num == AgcStatsSize)\n-\t\t\tLOG(RPiAgc, Fatal) << \"AgcMeteringMode: too many weights\";\n+\t\tif (num == AgcStatsSize) {\n+\t\t\tLOG(RPiAgc, Error) << \"AgcMeteringMode: too many weights\";\n+\t\t\treturn -EINVAL;\n+\t\t}\n \t\tweights[num++] = p.second.get_value<double>();\n \t}\n-\tif (num != AgcStatsSize)\n-\t\tLOG(RPiAgc, Fatal) << \"AgcMeteringMode: insufficient weights\";\n+\n+\tif (num != AgcStatsSize) {\n+\t\tLOG(RPiAgc, Error) << \"AgcMeteringMode: insufficient weights\";\n+\t\treturn -EINVAL;\n+\t}\n+\n \treturn 0;\n }\n \n@@ -85,12 +92,19 @@ int AgcExposureMode::read(boost::property_tree::ptree const &params)\n {\n \tint numShutters = readList(shutter, params.get_child(\"shutter\"));\n \tint numAgs = readList(gain, params.get_child(\"gain\"));\n-\tif (numShutters < 2 || numAgs < 2)\n-\t\tLOG(RPiAgc, Fatal)\n+\n+\tif (numShutters < 2 || numAgs < 2) {\n+\t\tLOG(RPiAgc, Error)\n \t\t\t<< \"AgcExposureMode: must have at least two entries in exposure profile\";\n-\tif (numShutters != numAgs)\n-\t\tLOG(RPiAgc, Fatal)\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (numShutters != numAgs) {\n+\t\tLOG(RPiAgc, Error)\n \t\t\t<< \"AgcExposureMode: expect same number of exposure and gain entries in exposure profile\";\n+\t\treturn -EINVAL;\n+\t}\n+\n \treturn 0;\n }\n \n@@ -120,8 +134,10 @@ int AgcConstraint::read(boost::property_tree::ptree const &params)\n \tstd::string boundString = params.get<std::string>(\"bound\", \"\");\n \ttransform(boundString.begin(), boundString.end(),\n \t\t  boundString.begin(), ::toupper);\n-\tif (boundString != \"UPPER\" && boundString != \"LOWER\")\n-\t\tLOG(RPiAgc, Fatal) << \"AGC constraint type should be UPPER or LOWER\";\n+\tif (boundString != \"UPPER\" && boundString != \"LOWER\") {\n+\t\tLOG(RPiAgc, Error) << \"AGC constraint type should be UPPER or LOWER\";\n+\t\treturn -EINVAL;\n+\t}\n \tbound = boundString == \"UPPER\" ? Bound::UPPER : Bound::LOWER;\n \tqLo = params.get<double>(\"q_lo\");\n \tqHi = params.get<double>(\"q_hi\");\ndiff --git a/src/ipa/raspberrypi/controller/rpi/alsc.cpp b/src/ipa/raspberrypi/controller/rpi/alsc.cpp\nindex b36277696a52..49aaf6b74603 100644\n--- a/src/ipa/raspberrypi/controller/rpi/alsc.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/alsc.cpp\n@@ -53,11 +53,17 @@ char const *Alsc::name() const\n static int generateLut(double *lut, boost::property_tree::ptree const &params)\n {\n \tdouble cstrength = params.get<double>(\"corner_strength\", 2.0);\n-\tif (cstrength <= 1.0)\n-\t\tLOG(RPiAlsc, Fatal) << \"Alsc: corner_strength must be > 1.0\";\n+\tif (cstrength <= 1.0) {\n+\t\tLOG(RPiAlsc, Error) << \"corner_strength must be > 1.0\";\n+\t\treturn -EINVAL;\n+\t}\n+\n \tdouble asymmetry = params.get<double>(\"asymmetry\", 1.0);\n-\tif (asymmetry < 0)\n-\t\tLOG(RPiAlsc, Fatal) << \"Alsc: asymmetry must be >= 0\";\n+\tif (asymmetry < 0) {\n+\t\tLOG(RPiAlsc, Error) << \"asymmetry must be >= 0\";\n+\t\treturn -EINVAL;\n+\t}\n+\n \tdouble f1 = cstrength - 1, f2 = 1 + sqrt(cstrength);\n \tdouble R2 = X * Y / 4 * (1 + asymmetry * asymmetry);\n \tint num = 0;\n@@ -78,13 +84,19 @@ static int readLut(double *lut, boost::property_tree::ptree const &params)\n {\n \tint num = 0;\n \tconst int maxNum = XY;\n+\n \tfor (auto &p : params) {\n-\t\tif (num == maxNum)\n-\t\t\tLOG(RPiAlsc, Fatal) << \"Alsc: too many entries in LSC table\";\n+\t\tif (num == maxNum) {\n+\t\t\tLOG(RPiAlsc, Error) << \"Too many entries in LSC table\";\n+\t\t\treturn -EINVAL;\n+\t\t}\n \t\tlut[num++] = p.second.get_value<double>();\n \t}\n-\tif (num < maxNum)\n-\t\tLOG(RPiAlsc, Fatal) << \"Alsc: too few entries in LSC table\";\n+\n+\tif (num < maxNum) {\n+\t\tLOG(RPiAlsc, Error) << \"Too few entries in LSC table\";\n+\t\treturn -EINVAL;\n+\t}\n \treturn 0;\n }\n \n@@ -96,24 +108,30 @@ static int readCalibrations(std::vector<AlscCalibration> &calibrations,\n \t\tdouble lastCt = 0;\n \t\tfor (auto &p : params.get_child(name)) {\n \t\t\tdouble ct = p.second.get<double>(\"ct\");\n-\t\t\tif (ct <= lastCt)\n-\t\t\t\tLOG(RPiAlsc, Fatal)\n-\t\t\t\t\t<< \"Alsc: entries in \" << name << \" must be in increasing ct order\";\n+\t\t\tif (ct <= lastCt) {\n+\t\t\t\tLOG(RPiAlsc, Error)\n+\t\t\t\t\t<< \"Entries in \" << name << \" must be in increasing ct order\";\n+\t\t\t\treturn -EINVAL;\n+\t\t\t}\n \t\t\tAlscCalibration calibration;\n \t\t\tcalibration.ct = lastCt = ct;\n \t\t\tboost::property_tree::ptree const &table =\n \t\t\t\tp.second.get_child(\"table\");\n \t\t\tint num = 0;\n \t\t\tfor (auto it = table.begin(); it != table.end(); it++) {\n-\t\t\t\tif (num == XY)\n-\t\t\t\t\tLOG(RPiAlsc, Fatal)\n-\t\t\t\t\t\t<< \"Alsc: too many values for ct \" << ct << \" in \" << name;\n+\t\t\t\tif (num == XY) {\n+\t\t\t\t\tLOG(RPiAlsc, Error)\n+\t\t\t\t\t\t<< \"Too many values for ct \" << ct << \" in \" << name;\n+\t\t\t\t\treturn -EINVAL;\n+\t\t\t\t}\n \t\t\t\tcalibration.table[num++] =\n \t\t\t\t\tit->second.get_value<double>();\n \t\t\t}\n-\t\t\tif (num != XY)\n-\t\t\t\tLOG(RPiAlsc, Fatal)\n-\t\t\t\t\t<< \"Alsc: too few values for ct \" << ct << \" in \" << name;\n+\t\t\tif (num != XY) {\n+\t\t\t\tLOG(RPiAlsc, Error)\n+\t\t\t\t\t<< \"Too few values for ct \" << ct << \" in \" << name;\n+\t\t\t\treturn -EINVAL;\n+\t\t\t}\n \t\t\tcalibrations.push_back(calibration);\n \t\t\tLOG(RPiAlsc, Debug)\n \t\t\t\t<< \"Read \" << name << \" calibration for ct \" << ct;\ndiff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp\nindex a9e776a344a1..10c49c126341 100644\n--- a/src/ipa/raspberrypi/controller/rpi/awb.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n@@ -46,16 +46,22 @@ static int readCtCurve(Pwl &ctR, Pwl &ctB,\n \tfor (auto it = params.begin(); it != params.end(); it++) {\n \t\tdouble ct = it->second.get_value<double>();\n \t\tassert(it == params.begin() || ct != ctR.domain().end);\n-\t\tif (++it == params.end())\n-\t\t\tLOG(RPiAwb, Fatal) << \"AwbConfig: incomplete CT curve entry\";\n+\t\tif (++it == params.end()) {\n+\t\t\tLOG(RPiAwb, Error) << \"AwbConfig: incomplete CT curve entry\";\n+\t\t\treturn -EINVAL;\n+\t\t}\n \t\tctR.append(ct, it->second.get_value<double>());\n-\t\tif (++it == params.end())\n-\t\t\tLOG(RPiAwb, Fatal) << \"AwbConfig: incomplete CT curve entry\";\n+\t\tif (++it == params.end()) {\n+\t\t\tLOG(RPiAwb, Error) << \"AwbConfig: incomplete CT curve entry\";\n+\t\t\treturn -EINVAL;\n+\t\t}\n \t\tctB.append(ct, it->second.get_value<double>());\n \t\tnum++;\n \t}\n-\tif (num < 2)\n-\t\tLOG(RPiAwb, Fatal) << \"AwbConfig: insufficient points in CT curve\";\n+\tif (num < 2) {\n+\t\tLOG(RPiAwb, Error) << \"AwbConfig: insufficient points in CT curve\";\n+\t\treturn -EINVAL;\n+\t}\n \treturn 0;\n }\n \n@@ -78,12 +84,16 @@ int AwbConfig::read(boost::property_tree::ptree const &params)\n \t\t\tret = prior.read(p.second);\n \t\t\tif (ret)\n \t\t\t\treturn ret;\n-\t\t\tif (!priors.empty() && prior.lux <= priors.back().lux)\n-\t\t\t\tLOG(RPiAwb, Fatal) << \"AwbConfig: Prior must be ordered in increasing lux value\";\n+\t\t\tif (!priors.empty() && prior.lux <= priors.back().lux) {\n+\t\t\t\tLOG(RPiAwb, Error) << \"AwbConfig: Prior must be ordered in increasing lux value\";\n+\t\t\t\treturn -EINVAL;\n+\t\t\t}\n \t\t\tpriors.push_back(prior);\n \t\t}\n-\t\tif (priors.empty())\n-\t\t\tLOG(RPiAwb, Fatal) << \"AwbConfig: no AWB priors configured\";\n+\t\tif (priors.empty()) {\n+\t\t\tLOG(RPiAwb, Error) << \"AwbConfig: no AWB priors configured\";\n+\t\t\treturn ret;\n+\t\t}\n \t}\n \tif (params.get_child_optional(\"modes\")) {\n \t\tfor (auto &p : params.get_child(\"modes\")) {\n@@ -93,8 +103,10 @@ int AwbConfig::read(boost::property_tree::ptree const &params)\n \t\t\tif (defaultMode == nullptr)\n \t\t\t\tdefaultMode = &modes[p.first];\n \t\t}\n-\t\tif (defaultMode == nullptr)\n-\t\t\tLOG(RPiAwb, Fatal) << \"AwbConfig: no AWB modes configured\";\n+\t\tif (defaultMode == nullptr) {\n+\t\t\tLOG(RPiAwb, Error) << \"AwbConfig: no AWB modes configured\";\n+\t\t\treturn -EINVAL;\n+\t\t}\n \t}\n \tminPixels = params.get<double>(\"min_pixels\", 16.0);\n \tminG = params.get<uint16_t>(\"min_G\", 32);\n@@ -103,8 +115,10 @@ int AwbConfig::read(boost::property_tree::ptree const &params)\n \tcoarseStep = params.get<double>(\"coarse_step\", 0.2);\n \ttransversePos = params.get<double>(\"transverse_pos\", 0.01);\n \ttransverseNeg = params.get<double>(\"transverse_neg\", 0.01);\n-\tif (transversePos <= 0 || transverseNeg <= 0)\n-\t\tLOG(RPiAwb, Fatal) << \"AwbConfig: transverse_pos/neg must be > 0\";\n+\tif (transversePos <= 0 || transverseNeg <= 0) {\n+\t\tLOG(RPiAwb, Error) << \"AwbConfig: transverse_pos/neg must be > 0\";\n+\t\treturn -EINVAL;\n+\t}\n \tsensitivityR = params.get<double>(\"sensitivity_r\", 1.0);\n \tsensitivityB = params.get<double>(\"sensitivity_b\", 1.0);\n \tif (bayes) {\ndiff --git a/src/ipa/raspberrypi/controller/rpi/ccm.cpp b/src/ipa/raspberrypi/controller/rpi/ccm.cpp\nindex f0110d38f548..9588e94adeb1 100644\n--- a/src/ipa/raspberrypi/controller/rpi/ccm.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/ccm.cpp\n@@ -44,12 +44,16 @@ int Matrix::read(boost::property_tree::ptree const &params)\n \tdouble *ptr = (double *)m;\n \tint n = 0;\n \tfor (auto it = params.begin(); it != params.end(); it++) {\n-\t\tif (n++ == 9)\n-\t\t\tLOG(RPiCcm, Fatal) << \"Ccm: too many values in CCM\";\n+\t\tif (n++ == 9) {\n+\t\t\tLOG(RPiCcm, Error) << \"Too many values in CCM\";\n+\t\t\treturn -EINVAL;\n+\t\t}\n \t\t*ptr++ = it->second.get_value<double>();\n \t}\n-\tif (n < 9)\n-\t\tLOG(RPiCcm, Fatal) << \"Ccm: too few values in CCM\";\n+\tif (n < 9) {\n+\t\tLOG(RPiCcm, Error) << \"Too few values in CCM\";\n+\t\treturn -EINVAL;\n+\t}\n \treturn 0;\n }\n \n@@ -78,13 +82,17 @@ int Ccm::read(boost::property_tree::ptree const &params)\n \t\tif (ret)\n \t\t\treturn ret;\n \t\tif (!config_.ccms.empty() &&\n-\t\t    ctCcm.ct <= config_.ccms.back().ct)\n-\t\t\tLOG(RPiCcm, Fatal) << \"Ccm: CCM not in increasing colour temperature order\";\n+\t\t    ctCcm.ct <= config_.ccms.back().ct) {\n+\t\t\tLOG(RPiCcm, Error) << \"CCM not in increasing colour temperature order\";\n+\t\t\treturn -EINVAL;\n+\t\t}\n \t\tconfig_.ccms.push_back(std::move(ctCcm));\n \t}\n \n-\tif (config_.ccms.empty())\n-\t\tLOG(RPiCcm, Fatal) << \"Ccm: no CCMs specified\";\n+\tif (config_.ccms.empty()) {\n+\t\tLOG(RPiCcm, Error) << \"No CCMs specified\";\n+\t\treturn -EINVAL;\n+\t}\n \n \treturn 0;\n }\ndiff --git a/src/ipa/raspberrypi/controller/rpi/dpc.cpp b/src/ipa/raspberrypi/controller/rpi/dpc.cpp\nindex be014a05fd41..def39bb7416a 100644\n--- a/src/ipa/raspberrypi/controller/rpi/dpc.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/dpc.cpp\n@@ -34,8 +34,10 @@ char const *Dpc::name() const\n int Dpc::read(boost::property_tree::ptree const &params)\n {\n \tconfig_.strength = params.get<int>(\"strength\", 1);\n-\tif (config_.strength < 0 || config_.strength > 2)\n-\t\tLOG(RPiDpc, Fatal) << \"Dpc: bad strength value\";\n+\tif (config_.strength < 0 || config_.strength > 2) {\n+\t\tLOG(RPiDpc, Error) << \"bad strength value\";\n+\t\treturn -EINVAL;\n+\t}\n \treturn 0;\n }\n \ndiff --git a/src/ipa/raspberrypi/controller/rpi/geq.cpp b/src/ipa/raspberrypi/controller/rpi/geq.cpp\nindex a74447877bf8..106f0a40dfc1 100644\n--- a/src/ipa/raspberrypi/controller/rpi/geq.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/geq.cpp\n@@ -39,8 +39,10 @@ int Geq::read(boost::property_tree::ptree const &params)\n {\n \tconfig_.offset = params.get<uint16_t>(\"offset\", 0);\n \tconfig_.slope = params.get<double>(\"slope\", 0.0);\n-\tif (config_.slope < 0.0 || config_.slope >= 1.0)\n-\t\tLOG(RPiGeq, Fatal) << \"Geq: bad slope value\";\n+\tif (config_.slope < 0.0 || config_.slope >= 1.0) {\n+\t\tLOG(RPiGeq, Error) << \"Bad slope value\";\n+\t\treturn -EINVAL;\n+\t}\n \n \tif (params.get_child_optional(\"strength\")) {\n \t\tint ret = config_.strength.read(params.get_child(\"strength\"));\n",
    "prefixes": [
        "libcamera-devel",
        "v7",
        "07/14"
    ]
}