{"id":18735,"url":"https://patchwork.libcamera.org/api/patches/18735/?format=json","web_url":"https://patchwork.libcamera.org/patch/18735/","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":"<20230614121332.15484-1-naush@raspberrypi.com>","date":"2023-06-14T12:13:32","name":"[libcamera-devel] pipeline: rpi: Do not return an error from pipeline config file handling","commit_ref":"0d1e402e1b6d0fce1e0003bf3deebb21594d5906","pull_url":null,"state":"accepted","archived":false,"hash":"41946c2fda283fa96e1bb088f074c134af25fb5e","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18735/mbox/","series":[{"id":3923,"url":"https://patchwork.libcamera.org/api/series/3923/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3923","date":"2023-06-14T12:13:32","name":"[libcamera-devel] pipeline: rpi: Do not return an error from pipeline config file handling","version":1,"mbox":"https://patchwork.libcamera.org/series/3923/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/18735/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18735/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 73A1DBD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 14 Jun 2023 12:13:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ECA7861E4D;\n\tWed, 14 Jun 2023 14:13:36 +0200 (CEST)","from mail-wr1-x435.google.com (mail-wr1-x435.google.com\n\t[IPv6:2a00:1450:4864:20::435])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8E2BC61E4A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 14 Jun 2023 14:13:35 +0200 (CEST)","by mail-wr1-x435.google.com with SMTP id\n\tffacd0b85a97d-30e412a852dso4674814f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 14 Jun 2023 05:13:35 -0700 (PDT)","from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\ti7-20020adffc07000000b0030631a599a0sm18275129wrr.24.2023.06.14.05.13.33\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 14 Jun 2023 05:13:33 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1686744816;\n\tbh=jyOG+pkUuiM5ZSdAKjBHTFewwH3mA4DXdIhU0OMg1sc=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=tFVWWHZzvEXhJietgJoaibQslF/LoFA03A7iKTuGo2GTOqpNpDRJ5LT5oL02W3Xpc\n\tqGrtgEV4DEn6AS5vQUzApmf7s3YjnEfiX7KsH0r1lE92l3F01dD4YBuRpBX0q2ELsR\n\twwmQZbFSpRvMM+JMsOKUkRQPWat1HE5Osf9jd1UnADBjm7dJ1WQRv1EzdTTEkzde5a\n\tBQZiC4c1l8f8g0sz3JFKYqX7mF3cbKjLlWogJPZvfy7C+SKCwlDI8PchjfO1fdAGsp\n\t+DRICYrqGg1oqeFDlzOPiOBhXM1wRnC/4fVZlI1mX6hH0bHj4qz1s9TKSY+U1JYKdn\n\t+u7B6SSnyecyA==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1686744815; x=1689336815;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=F+FlLXeWk9PioJLrs78mtuIXRBwYuREBf/c9qXacqZk=;\n\tb=h3Ff6HsvmBocODsO4v4qIRp93bD2u9okAuho9M0JhoRXLZr45L5FMnyYu2NEu7LIoa\n\toom1nt8bBr/0+c2QQmudEdIyJespAvDe4TD75QumsClNZZKmMrg2qsjOfjhPrlXzyUib\n\tyqBn2tTDs6qqRROr8v22LELMgeIUAFyG14pn+c/aKSCdxulFxoeXEBzHANQPZkvDVvFT\n\t3qq/TiBET4ReASNbDys4J2y7UeEIJRYFBumGP8s76s8JBkE1jP1rnOhLSrVEfdJlRMOL\n\tLvSQRj9x4V1GhpH5xonSdRDqi94P5mMBbOlNGqH9GRJia4rnSuBN660/sSeqal8fEhri\n\tNgZA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"h3Ff6Hsv\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1686744815; x=1689336815;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=F+FlLXeWk9PioJLrs78mtuIXRBwYuREBf/c9qXacqZk=;\n\tb=ff3Y8qVFt3Wn9cZzO/NUPilWW4Q2xwPqyqQNICtAdXeBNBrySPbicfsr4Mhkqz32O9\n\tnYYwTbLSwVX0eTlBmcXb+3ek+iRo7idqY4QmkL54EAA8CXH532nuj31918tpa33GaBp8\n\t1slf1ocgF29Gx3RBK88ZJAbUGdGRXhNHhoGgf6VOPpvElrj2Josr3iKz59ePY5NR2b4U\n\thjq24bIdOZohZyU+Jdb1vDH+sBpXxrCZTQ5miuxJ/1GHbNwpen8/hXRY0gFwO/F0czix\n\tPGwcoV0feKC71ejBZKyzqDGffnJ0cbcuEdJ8AVu+Z+8XaljjJA/osYYQhrdsZ9WDl0RB\n\tOEgQ==","X-Gm-Message-State":"AC+VfDx77GnXczLgGC4pbyu2GzG/0Ly7qmuaVeBpJzSjcYBxXjWmErqQ\n\tk2juOa83Vv9o1bErIIUOemrEQZIzR03XGG5W2wmIsQ==","X-Google-Smtp-Source":"ACHHUZ7HLLuVwurCpoFwOxqR+pf76OcGG9YwIf9Ey3DdzAZinJ+CMJd4660M7YLib6HBaofjQ/B5og==","X-Received":"by 2002:adf:f68c:0:b0:30d:43ca:55ab with SMTP id\n\tv12-20020adff68c000000b0030d43ca55abmr7953002wrp.38.1686744814548; \n\tWed, 14 Jun 2023 05:13:34 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 14 Jun 2023 13:13:32 +0100","Message-Id":"<20230614121332.15484-1-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.34.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH] pipeline: rpi: Do not return an error\n\tfrom pipeline config file handling","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":"If a user provided pipeline config file is not present, or if the\nversion reported in the file is invalid, do not return with an error\nwhen creating the pipeline handler. Instead, log a warning message and\nreturn success with default pipeline config values used.\n\nThis now matches the behaviour when the pipeline config file could not\nbe parsed correctly, and we revert to default values.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 10 ++++++----\n 1 file changed, 6 insertions(+), 4 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\nindex 1e20fc2d8cb8..df7482920e75 100644\n--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n@@ -1093,8 +1093,9 @@ int CameraData::loadPipelineConfiguration()\n \tFile file(filename);\n \n \tif (!file.open(File::OpenModeFlag::ReadOnly)) {\n-\t\tLOG(RPI, Error) << \"Failed to open configuration file '\" << filename << \"'\";\n-\t\treturn -EIO;\n+\t\tLOG(RPI, Warning) << \"Failed to open configuration file '\" << filename << \"'\"\n+\t\t\t\t  << \", using defaults\";\n+\t\treturn 0;\n \t}\n \n \tLOG(RPI, Info) << \"Using configuration file '\" << filename << \"'\";\n@@ -1107,8 +1108,9 @@ int CameraData::loadPipelineConfiguration()\n \n \tstd::optional<double> ver = (*root)[\"version\"].get<double>();\n \tif (!ver || *ver != 1.0) {\n-\t\tLOG(RPI, Error) << \"Unexpected configuration file version reported\";\n-\t\treturn -EINVAL;\n+\t\tLOG(RPI, Warning) << \"Unexpected configuration file version reported: \"\n+\t\t\t\t  << *ver;\n+\t\treturn 0;\n \t}\n \n \tconst YamlObject &phConfig = (*root)[\"pipeline_handler\"];\n","prefixes":["libcamera-devel"]}