{"id":18648,"url":"https://patchwork.libcamera.org/api/1.1/patches/18648/?format=json","web_url":"https://patchwork.libcamera.org/patch/18648/","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":"<20230523120208.31292-1-naush@raspberrypi.com>","date":"2023-05-23T12:02:08","name":"[libcamera-devel] pipeline: rpi: ipa_base: Parse config files after platformRegister()","commit_ref":"58f38082e14c79a16b0b6373c14b0e56c8ac15bc","pull_url":null,"state":"accepted","archived":false,"hash":"1f78214a6ae0bbaccaf49480c0f2d333f40e2464","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/1.1/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18648/mbox/","series":[{"id":3886,"url":"https://patchwork.libcamera.org/api/1.1/series/3886/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3886","date":"2023-05-23T12:02:08","name":"[libcamera-devel] pipeline: rpi: ipa_base: Parse config files after platformRegister()","version":1,"mbox":"https://patchwork.libcamera.org/series/3886/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/18648/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18648/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 6E7FAC3284\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 May 2023 12:03:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E2E2F60547;\n\tTue, 23 May 2023 14:03:11 +0200 (CEST)","from mail-wm1-x334.google.com (mail-wm1-x334.google.com\n\t[IPv6:2a00:1450:4864:20::334])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 36CCF603F7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 May 2023 14:03:10 +0200 (CEST)","by mail-wm1-x334.google.com with SMTP id\n\t5b1f17b1804b1-3f6077660c6so13270635e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 May 2023 05:03:10 -0700 (PDT)","from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tm25-20020a7bcb99000000b003f195d540d9sm14812282wmi.14.2023.05.23.05.03.08\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 23 May 2023 05:03:08 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1684843391;\n\tbh=BmkQ9qQ/CHIAiw1xSO/GUnoAcYxGMj0SiR0LmskiuWg=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=eM3tQ1x4Nty9rs+f4zpjl0GjewJelZUgf3bDvERfLTSj32IGjthIJuymKGGuGyQys\n\tjn2STTzeQmQfh5L6/sBOOGUDX/3Yhun++t5o0eAP5Yo0gOTW4ohAUrN6NMCJ9ZzJjU\n\tHNV8N8mgh/rV4fsD6LpkdupR94l1k3wOHR8f2v/oFBXEkL00Lp1o9SULSoHUdKxFkJ\n\tPa+RC1WONs7MC+955ZKYDxoi1+MpG5wyQrxonnLlDquvnG4TUyNtBUPVbiiyU+1ScB\n\ts/0fpE2LonT+yyyDgdx2RaSrbZk/yXXE6jJ+qSVqoG7XEeGrYc7uIREI6zm9FBIzeh\n\t4eyFDEbt2imkg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1684843389; x=1687435389;\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=wWGe67/4cMA3iQ1Mj72JNeiBeZrSUZvEyrlncu9VBHk=;\n\tb=Lj5VYsWHg9Kj9Z9Ynq6NNnM9hNW0xwP4n34Lcfp1x8NFOSw0Yjm15GfEayca31/w1j\n\tTAJvjhv4Q3Wg3fMktgwcQTMXoBy04EcUjQI0qO8UuMg1SZjJqNn+pbW4W6u86xZN9Cgs\n\tu2H5kmOwIA9UGRDoyS3GRrJMfs/6+5q6MuDgdmbnRvxFEBZd05+UGJr/uk4H7yH5iV55\n\tBnU/aOmaP1NBs609fxp8mFmvu3er8ofHmjqhghZ954Ud5JH0JP1oCIiUoXq6MWtuuw4z\n\tgntg9ZB4jlAJfEoe7/5SZWlGtESIV3oJwBt/tmlA9WPoVcDUJnqkwdmpJP39NJDkJZ0S\n\tI48Q=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"Lj5VYsWH\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1684843389; x=1687435389;\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=wWGe67/4cMA3iQ1Mj72JNeiBeZrSUZvEyrlncu9VBHk=;\n\tb=UoXbgS6N2jqTWHA1aPhNvzmO8AYsHHWuDmDYAqCmNOEdX/a9lETzfN559Cvrpot7qD\n\tktNtIEpzSgo0Q/j7/7E6RJnVfnEGr0eBqz9SNNZGTKe4SIE2HVjACzFxCsf8UaMHZMpR\n\t7lnWRnOBqLIO0+WrW1ysB6ClYKSe97etR9KnJiiZLF7P1S/94l7eWWMepJWSkV/GZfJN\n\t8hD7GkWjt/lVLsYqZTenpc7T83lMdH5gR2a4Sq1oKU4tWoxGZJeH6/02c2KfU5coeJHA\n\tWf4kVR+yAzjKphpb/0YOpde4N5ODYq/W5UgVP25gcObHOIZ5r2Lh5yn78M3qXmC5OFsD\n\tpABg==","X-Gm-Message-State":"AC+VfDynsy4+VbPxsm+k3CxUMDPDg7/0ZwbdW8wK6Z6iZibih047PVFz\n\thl/0ax32PhYLLLv7TJM05H+rOQLCz3cua8GcOwXcdw==","X-Google-Smtp-Source":"ACHHUZ4E7wgkuNlZ4fYH4on9hRcvz6o9VNhbqBqpA7DgER4JqWlTSf2Jh3JcFwmPtGiobrg6uArlsg==","X-Received":"by 2002:a05:600c:204:b0:3f6:106:35b6 with SMTP id\n\t4-20020a05600c020400b003f6010635b6mr6439765wmi.37.1684843389418; \n\tTue, 23 May 2023 05:03:09 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 23 May 2023 13:02:08 +0100","Message-Id":"<20230523120208.31292-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: ipa_base: Parse config\n\tfiles after platformRegister()","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 uses a pipeline handler config file where a custom timeout\nvalue is specified, it would lead to a segmentation fault when\nloadPipelineConfiguration() tried to access the as yet uninitialised\nV4L2VideoDevice object.\n\nTo fix this, parse the pipeline handler config file only after fully\ninitialising and registering the pipeline handler and V4L2VideoDevice\nobjects.\n\nFixes: 6c71ee1f15305 (\"pipeline: raspberrypi: Introduce PipelineHandlerBase class\")\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 8 ++++----\n 1 file changed, 4 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 ba1797bcfef0..3bb5ec531e4f 100644\n--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n@@ -888,16 +888,16 @@ int PipelineHandlerBase::registerCamera(std::unique_ptr<RPi::CameraData> &camera\n \t}\n \tdata->nativeBayerOrder_ = bayerFormat.order;\n \n+\tret = platformRegister(cameraData, frontend, backend);\n+\tif (ret)\n+\t\treturn ret;\n+\n \tret = data->loadPipelineConfiguration();\n \tif (ret) {\n \t\tLOG(RPI, Error) << \"Unable to load pipeline configuration\";\n \t\treturn ret;\n \t}\n \n-\tret = platformRegister(cameraData, frontend, backend);\n-\tif (ret)\n-\t\treturn ret;\n-\n \t/* Setup the general IPA signal handlers. */\n \tdata->frontendDevice()->dequeueTimeout.connect(data, &RPi::CameraData::cameraTimeout);\n \tdata->frontendDevice()->frameStart.connect(data, &RPi::CameraData::frameStarted);\n","prefixes":["libcamera-devel"]}