{"id":10990,"url":"https://patchwork.libcamera.org/api/patches/10990/?format=json","web_url":"https://patchwork.libcamera.org/patch/10990/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20210125184858.16339-2-david.plowman@raspberrypi.com>","date":"2021-01-25T18:48:54","name":"[libcamera-devel,v2,1/5] ipa: raspberrypi: controller: Replace Raspberry Pi debug with libcamera debug","commit_ref":"15d3970c0ce8a21e1344cc9f4d60bb5928ce293d","pull_url":null,"state":"accepted","archived":false,"hash":"c1ec4fc1ae38a62c7b1fcccaec801833a0424d6a","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/?format=json","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/10990/mbox/","series":[{"id":1606,"url":"https://patchwork.libcamera.org/api/series/1606/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1606","date":"2021-01-25T18:48:53","name":"Remove Raspberry Pi logging","version":2,"mbox":"https://patchwork.libcamera.org/series/1606/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/10990/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/10990/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 1EEA6BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 25 Jan 2021 18:49:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B044F682E6;\n\tMon, 25 Jan 2021 19:49:07 +0100 (CET)","from mail-ed1-x531.google.com (mail-ed1-x531.google.com\n\t[IPv6:2a00:1450:4864:20::531])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1008F682D1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 25 Jan 2021 19:49:05 +0100 (CET)","by mail-ed1-x531.google.com with SMTP id s11so16759020edd.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 25 Jan 2021 10:49:05 -0800 (PST)","from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\ty59sm11601836ede.59.2021.01.25.10.49.03\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 25 Jan 2021 10:49:03 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"dHKi1DuI\"; dkim-atps=neutral","DKIM-Signature":"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=Zi4fSpeVN5lxiGy5u0yXSb9pUfzZ83CfLgRG/iSQNTU=;\n\tb=dHKi1DuIBRDHVRouKDMOmY5XVBMTEscdAabJBB2BnQla0u6zX4Y4elDe1h38Dirl4a\n\twxDBY2CqG8O7jZDlsrVSAq0oX2RZivL56fulqyOsVPSviezKRtEtS5LSzUlk+3e7EYT1\n\tyqD2wnde3Bh2mbkt2dehlPYMraz8rmZTkffl+vhS3yUWh/7lbU9SVxGPOLR7bFLQd+bL\n\tgX+TrOE1oKUAfHe6Efj9VqVVOm0rfo94bkHmIla+0zXGb8/sqdBeHQKb/+HHWMVQyy8T\n\t3Z8+d02TzER6DzLv75Scr95H14bmGRLlzqgFxBtYoI8bnfOBeFQ6bfQAWBpH57VowPPM\n\tMqHw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\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=Zi4fSpeVN5lxiGy5u0yXSb9pUfzZ83CfLgRG/iSQNTU=;\n\tb=dFgRiBRQTQXr9oPE4b0aSFdIx4gf2clUY3w+IPIdE1wZSkMekT6L5M6XeP9M9kiUhh\n\tg7JdBNWLuVfv+enKyg/iShgbWDq6h2CnE9DVDazWoOmMQqPw+mYcjqbupYFuNUjqLEu4\n\tE9Pa4c4+W8D+RNiMlLx0EEipfwDlui+aGnDCePNi2gJVugLQZTFJMoJZcDbuK7eb3oFH\n\tih05es8ubnO3FCw7gPUXLLKXHzNsFUH0uronWD0X403xxsfFqwlsqp14nUaKU5O8DwkC\n\tqgAS1aPVcrZDKMfhtGfR7RLo+xsmSZXznf08AKveziPkyUTDQf/y31PpaXm4omCfbOYx\n\tnjfA==","X-Gm-Message-State":"AOAM531d16ANWFfodiAf+UltuWSIJkApFY6YUNkmBs1/UEA+xoKXAgGJ\n\tn8b+n+p5neHzDq/4p4XXxkeGjL4F/B7ug3+A","X-Google-Smtp-Source":"ABdhPJy9d02edsGAYsEv1JGszK34o8w7rK0qykDdRv85E4+hOLoteJjeEGH2nUR2iPRS9RQeVdn3fA==","X-Received":"by 2002:a50:b742:: with SMTP id\n\tg60mr1602165ede.113.1611600544425; \n\tMon, 25 Jan 2021 10:49:04 -0800 (PST)","From":"David Plowman <david.plowman@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 25 Jan 2021 18:48:54 +0000","Message-Id":"<20210125184858.16339-2-david.plowman@raspberrypi.com>","X-Mailer":"git-send-email 2.20.1","In-Reply-To":"<20210125184858.16339-1-david.plowman@raspberrypi.com>","References":"<20210125184858.16339-1-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH v2 1/5] ipa: raspberrypi: controller:\n\tReplace Raspberry Pi debug with libcamera debug","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>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Some unhelpful debug statements have been removed.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/ipa/raspberrypi/controller/controller.cpp | 19 +++++++------------\n 1 file changed, 7 insertions(+), 12 deletions(-)","diff":"diff --git a/src/ipa/raspberrypi/controller/controller.cpp b/src/ipa/raspberrypi/controller/controller.cpp\nindex 22461cc4..96b58359 100644\n--- a/src/ipa/raspberrypi/controller/controller.cpp\n+++ b/src/ipa/raspberrypi/controller/controller.cpp\n@@ -5,6 +5,8 @@\n  * controller.cpp - ISP controller\n  */\n \n+#include \"libcamera/internal/log.h\"\n+\n #include \"algorithm.hpp\"\n #include \"controller.hpp\"\n \n@@ -12,6 +14,9 @@\n #include <boost/property_tree/ptree.hpp>\n \n using namespace RPiController;\n+using namespace libcamera;\n+\n+LOG_DEFINE_CATEGORY(RPiController)\n \n Controller::Controller()\n \t: switch_mode_called_(false) {}\n@@ -27,7 +32,6 @@ Controller::~Controller() {}\n \n void Controller::Read(char const *filename)\n {\n-\tRPI_LOG(\"Controller starting\");\n \tboost::property_tree::ptree root;\n \tboost::property_tree::read_json(filename, root);\n \tfor (auto const &key_and_value : root) {\n@@ -36,10 +40,9 @@ void Controller::Read(char const *filename)\n \t\t\talgo->Read(key_and_value.second);\n \t\t\talgorithms_.push_back(AlgorithmPtr(algo));\n \t\t} else\n-\t\t\tRPI_LOG(\"WARNING: No algorithm found for \\\"\"\n-\t\t\t\t<< key_and_value.first << \"\\\"\");\n+\t\t\tLOG(RPiController, Warning)\n+\t\t\t\t<< \"No algorithm found for \\\"\" << key_and_value.first << \"\\\"\";\n \t}\n-\tRPI_LOG(\"Controller finished\");\n }\n \n Algorithm *Controller::CreateAlgorithm(char const *name)\n@@ -50,39 +53,31 @@ Algorithm *Controller::CreateAlgorithm(char const *name)\n \n void Controller::Initialise()\n {\n-\tRPI_LOG(\"Controller starting\");\n \tfor (auto &algo : algorithms_)\n \t\talgo->Initialise();\n-\tRPI_LOG(\"Controller finished\");\n }\n \n void Controller::SwitchMode(CameraMode const &camera_mode, Metadata *metadata)\n {\n-\tRPI_LOG(\"Controller starting\");\n \tfor (auto &algo : algorithms_)\n \t\talgo->SwitchMode(camera_mode, metadata);\n \tswitch_mode_called_ = true;\n-\tRPI_LOG(\"Controller finished\");\n }\n \n void Controller::Prepare(Metadata *image_metadata)\n {\n-\tRPI_LOG(\"Controller::Prepare starting\");\n \tassert(switch_mode_called_);\n \tfor (auto &algo : algorithms_)\n \t\tif (!algo->IsPaused())\n \t\t\talgo->Prepare(image_metadata);\n-\tRPI_LOG(\"Controller::Prepare finished\");\n }\n \n void Controller::Process(StatisticsPtr stats, Metadata *image_metadata)\n {\n-\tRPI_LOG(\"Controller::Process starting\");\n \tassert(switch_mode_called_);\n \tfor (auto &algo : algorithms_)\n \t\tif (!algo->IsPaused())\n \t\t\talgo->Process(stats, image_metadata);\n-\tRPI_LOG(\"Controller::Process finished\");\n }\n \n Metadata &Controller::GetGlobalMetadata()\n","prefixes":["libcamera-devel","v2","1/5"]}