Show a patch.

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

{
    "id": 16790,
    "url": "https://patchwork.libcamera.org/api/patches/16790/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16790/",
    "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": "<20220726124549.1646-18-naush@raspberrypi.com>",
    "date": "2022-07-26T12:45:49",
    "name": "[libcamera-devel,17/17] ipa: raspberrypi: agc: Fix log message prefixes",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "f21d74f27ace87b727701463b0b9d20cf0950e6b",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/16790/mbox/",
    "series": [
        {
            "id": 3325,
            "url": "https://patchwork.libcamera.org/api/series/3325/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3325",
            "date": "2022-07-26T12:45:32",
            "name": "Raspberry Pi IPA code refactor",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3325/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16790/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16790/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 996D9C3275\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 26 Jul 2022 12:46:20 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 544356331E;\n\tTue, 26 Jul 2022 14:46:20 +0200 (CEST)",
            "from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com\n\t[IPv6:2a00:1450:4864:20::32f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 87E2363328\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Jul 2022 14:46:14 +0200 (CEST)",
            "by mail-wm1-x32f.google.com with SMTP id id17so8680588wmb.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Jul 2022 05:46:14 -0700 (PDT)",
            "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\ty17-20020adfd091000000b0021e87ec980bsm5948460wrh.84.2022.07.26.05.46.13\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 26 Jul 2022 05:46:13 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658839580;\n\tbh=DxE8dBo/rv4Rlcp2pPCH5zov6CAseOL8fxWnuweXAKw=;\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=ld+dT/iiw5UqZJKwDk3tC8MCg2ByEiM3jwtFURvE2DkZqnlMtCQyTfk52Nmki1kOX\n\t/LenHkmXUnRgtsRZ3aoiPXf68mMT6r5l5Ra3xpWnhEAO6PyC+M4Xhrqj/CP31x9kKM\n\t76hhFi+f7wQ4zfv3MSPgfLvaMMasqBvTjqXoDA++UEFn7D7MtQTBusJJZoyCAPi+L+\n\tpVd5ruH4/xoAoTxKs2z0vbhNKyGk5QNpvHKhFEh49E4Xkj8Hp9LCM/uWz2tU535cLQ\n\t19/w70vL9vJEYdxqwG3c7KFz8CsBqVU4Bk3Q6dvbgRioi289sOF3oaCcBmfAN/C4x/\n\tg1wd4NlLRsxuQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=bfohaqFOTzxAW86k8d/5H7qneDIMIk4WF0LigIcU0rE=;\n\tb=fV4gTfRanl/gF8KC2SO48GI/nb0tjLV75iutkmZdwUKdluoHHr8imfWu8LGexfK2lT\n\t+VxZtRjqhQ31Rvyv1NZ8hQcnUhlDeLmDv5r9mtY9OwMsh/VcxPN4kswhO1wSoAQBMBjn\n\tz9hNb8XK5q8X8C8XxTI9wRP4ufwfxepa9AxVWxS5wevwhLFBkD1iFIH2RmukfgLqAvj3\n\t9im1eKBvA/qGeR2EiirMtulFK7b5CvBeyuzW9eKNuToxPp56vJDEP4UiZ2/TA55Rd9/R\n\tnsNdnwDvZJc0sIZcZW+9yB6NLOl63eyQBLGSAEqnaEsQMrs0tRNBqNuH4xI+oGkXPHAN\n\t3vww=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"fV4gTfRa\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=bfohaqFOTzxAW86k8d/5H7qneDIMIk4WF0LigIcU0rE=;\n\tb=kkHn4k5Unq75M2SMAXvjKTWBpgqvu9MGVN/XFnGMKLQ6ApTbt40xBZ4Sw2blN1Eu1+\n\tfQkPV1pwXtjsx0eMSlEkBGCP8Q6Q4QzPG3aSJfPwLymnJOaUudaRa+oSWKpr71z9i4wE\n\t7wWtr1KtSLfto4H9xAg2svkT0NvF0qXodkLDRGIrTZwLRybrH7gSaFZ/iujA+bCWxdC0\n\tkLrB4oo5PMwmXVdXBNt9N5gExV80lV9hdFY4NGcOWOjj7CDBuKBzMQnGQ0eC5X0Ce4Dl\n\ts7SkdykTKgzGnT0UrLwiLpJnnUH59ddbZEIOYrfgF7Dtb4PmTYJauz1pQjVmHmauN/VE\n\tEJUg==",
        "X-Gm-Message-State": "AJIora/0EXxtl5jj5BKgCRweiYbdxB2+LVWNc4nmQO+NgEsXwcP7yBv6\n\tKb5Kv3uOj+so71DOFgnz4ABHE3v9SUPMoA==",
        "X-Google-Smtp-Source": "AGRyM1sSZi+gM9TeyZGfZBpYh160JZZU/REmuKoa0tsoN0P3WxZ5iyAgB59epX01VXwYkRLkm6qZKw==",
        "X-Received": "by 2002:a05:600c:3549:b0:3a3:16af:d280 with SMTP id\n\ti9-20020a05600c354900b003a316afd280mr23985072wmq.142.1658839574000; \n\tTue, 26 Jul 2022 05:46:14 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 26 Jul 2022 13:45:49 +0100",
        "Message-Id": "<20220726124549.1646-18-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220726124549.1646-1-naush@raspberrypi.com>",
        "References": "<20220726124549.1646-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 17/17] ipa: raspberrypi: agc: Fix log\n\tmessage prefixes",
        "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": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Naushir Patuck <naush@raspberrypi.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Remove \"Agc:\" as that gets prefixed by the logging system.\ns/AgcConfig/AgcMeteringMode/ and s/AgcConfig/AgcMeteringMode where appropriate.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/raspberrypi/controller/rpi/agc.cpp | 20 ++++++++++----------\n 1 file changed, 10 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp\nindex e0c174b6580d..adec8592626d 100644\n--- a/src/ipa/raspberrypi/controller/rpi/agc.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n@@ -35,11 +35,11 @@ void AgcMeteringMode::read(boost::property_tree::ptree const &params)\n \tint num = 0;\n \tfor (auto &p : params.get_child(\"weights\")) {\n \t\tif (num == AgcStatsSize)\n-\t\t\tLOG(RPiAgc, Fatal) << \"AgcConfig: too many weights\";\n+\t\t\tLOG(RPiAgc, Fatal) << \"AgcMeteringMode: too many weights\";\n \t\tweights[num++] = p.second.get_value<double>();\n \t}\n \tif (num != AgcStatsSize)\n-\t\tLOG(RPiAgc, Fatal) << \"AgcConfig: insufficient weights\";\n+\t\tLOG(RPiAgc, Fatal) << \"AgcMeteringMode: insufficient weights\";\n }\n \n static std::string\n@@ -79,10 +79,10 @@ void AgcExposureMode::read(boost::property_tree::ptree const &params)\n \tint numAgs = readList(gain, params.get_child(\"gain\"));\n \tif (numShutters < 2 || numAgs < 2)\n \t\tLOG(RPiAgc, Fatal)\n-\t\t\t<< \"AgcConfig: must have at least two entries in exposure profile\";\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\t\t<< \"AgcConfig: expect same number of exposure and gain entries in exposure profile\";\n+\t\t\t<< \"AgcExposureMode: expect same number of exposure and gain entries in exposure profile\";\n }\n \n static std::string\n@@ -464,7 +464,7 @@ void Agc::housekeepConfig()\n \tif (strcmp(meteringModeName_.c_str(), status_.meteringMode)) {\n \t\tauto it = config_.meteringModes.find(meteringModeName_);\n \t\tif (it == config_.meteringModes.end())\n-\t\t\tLOG(RPiAgc, Fatal) << \"Agc: no metering mode \" << meteringModeName_;\n+\t\t\tLOG(RPiAgc, Fatal) << \"No metering mode \" << meteringModeName_;\n \t\tmeteringMode_ = &it->second;\n \t\tcopyString(meteringModeName_, status_.meteringMode,\n \t\t\t   sizeof(status_.meteringMode));\n@@ -472,7 +472,7 @@ void Agc::housekeepConfig()\n \tif (strcmp(exposureModeName_.c_str(), status_.exposureMode)) {\n \t\tauto it = config_.exposureModes.find(exposureModeName_);\n \t\tif (it == config_.exposureModes.end())\n-\t\t\tLOG(RPiAgc, Fatal) << \"Agc: no exposure profile \" << exposureModeName_;\n+\t\t\tLOG(RPiAgc, Fatal) << \"No exposure profile \" << exposureModeName_;\n \t\texposureMode_ = &it->second;\n \t\tcopyString(exposureModeName_, status_.exposureMode,\n \t\t\t   sizeof(status_.exposureMode));\n@@ -481,7 +481,7 @@ void Agc::housekeepConfig()\n \t\tauto it =\n \t\t\tconfig_.constraintModes.find(constraintModeName_);\n \t\tif (it == config_.constraintModes.end())\n-\t\t\tLOG(RPiAgc, Fatal) << \"Agc: no constraint list \" << constraintModeName_;\n+\t\t\tLOG(RPiAgc, Fatal) << \"No constraint list \" << constraintModeName_;\n \t\tconstraintMode_ = &it->second;\n \t\tcopyString(constraintModeName_, status_.constraintMode,\n \t\t\t   sizeof(status_.constraintMode));\n@@ -498,7 +498,7 @@ void Agc::fetchCurrentExposure(Metadata *imageMetadata)\n \tDeviceStatus *deviceStatus =\n \t\timageMetadata->getLocked<DeviceStatus>(\"device.status\");\n \tif (!deviceStatus)\n-\t\tLOG(RPiAgc, Fatal) << \"Agc: no device metadata\";\n+\t\tLOG(RPiAgc, Fatal) << \"No device metadata\";\n \tcurrent_.shutter = deviceStatus->shutterSpeed;\n \tcurrent_.analogueGain = deviceStatus->analogueGain;\n \tAgcStatus *agcStatus =\n@@ -513,7 +513,7 @@ void Agc::fetchAwbStatus(Metadata *imageMetadata)\n \tawb_.gainG = 1.0;\n \tawb_.gainB = 1.0;\n \tif (imageMetadata->get(\"awb.status\", awb_) != 0)\n-\t\tLOG(RPiAgc, Debug) << \"Agc: no AWB status found\";\n+\t\tLOG(RPiAgc, Debug) << \"No AWB status found\";\n }\n \n static double computeInitialY(bcm2835_isp_stats *stats, AwbStatus const &awb,\n@@ -570,7 +570,7 @@ void Agc::computeGain(bcm2835_isp_stats *statistics, Metadata *imageMetadata,\n \tstruct LuxStatus lux = {};\n \tlux.lux = 400; /* default lux level to 400 in case no metadata found */\n \tif (imageMetadata->get(\"lux.status\", lux) != 0)\n-\t\tLOG(RPiAgc, Warning) << \"Agc: no lux level found\";\n+\t\tLOG(RPiAgc, Warning) << \"No lux level found\";\n \tHistogram h(statistics->hist[0].g_hist, NUM_HISTOGRAM_BINS);\n \tdouble evGain = status_.ev * config_.baseEv;\n \t/*\n",
    "prefixes": [
        "libcamera-devel",
        "17/17"
    ]
}