{"id":15532,"url":"https://patchwork.libcamera.org/api/patches/15532/?format=json","web_url":"https://patchwork.libcamera.org/patch/15532/","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":"<20220324105220.3250438-1-paul.elder@ideasonboard.com>","date":"2022-03-24T10:52:20","name":"[libcamera-devel] libcamera: rkisp1: Generate configuration from main path if only one role","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"8d50f969aba55614255ed8d60c9e29643578fb86","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/?format=json","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/15532/mbox/","series":[{"id":2993,"url":"https://patchwork.libcamera.org/api/series/2993/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2993","date":"2022-03-24T10:52:20","name":"[libcamera-devel] libcamera: rkisp1: Generate configuration from main path if only one role","version":1,"mbox":"https://patchwork.libcamera.org/series/2993/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/15532/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/15532/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 35E9CBD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 24 Mar 2022 10:52:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7C6C3604D5;\n\tThu, 24 Mar 2022 11:52:30 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E137A601F5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Mar 2022 11:52:29 +0100 (CET)","from pyrite.rasen.tech (h175-177-042-148.catv02.itscom.jp\n\t[175.177.42.148])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 990811844;\n\tThu, 24 Mar 2022 11:52:28 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648119150;\n\tbh=Ng2v11SpSfXzdLhF4e1u4bS4uQCk4myAo62c8i2AHtQ=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=dy4w+HGTmbc/qNvZAdcxqElQDhKowjaiHomS9u6bTtaMgBjzw/82rP9mL39QdphUg\n\t/B3yGheZpjyZxg5Bfms9CPCnrYyCDkY/CPRltnW/hr4m5ganvHGaXQnd4zL+rVTlOt\n\twSCxOlgu5/5OsxUP0yDHaOe0q+MPqnAc/t6B8hAWOefkVTbZvNaYIJYgd4UkO1vaeV\n\tYTyNnPXjiwuLXA3ZiaTGA8rJ4PT3gb41Mg+5Li+DNp7jux7jEGyBQAXM8p6DQtulUD\n\tu0CfdYjgS4iJIYxBMkJ2uleU5xDCQ1fzsGBCk4KYAB8tykInpAOixsOfw/UkRa3T0P\n\tPXWqmxO8dh7lw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648119149;\n\tbh=Ng2v11SpSfXzdLhF4e1u4bS4uQCk4myAo62c8i2AHtQ=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=mluzizETuSDbpRCjeUk7LEFaeeVTMO2efiSgpxawkEj20Db7FGUGzSes5mzzUxQpW\n\tBl+uXgsrMnp0nLnwQRffI4uIE05SLRs0h5MvmHPcnf3BA8qVjVQ4ZloAr+lX3rh3tF\n\tvZGoNIQaUF2ZIgbJ7s2G3C/ZEmoXZ/IU5zaLojJg="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"mluzizET\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 24 Mar 2022 19:52:20 +0900","Message-Id":"<20220324105220.3250438-1-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.30.2","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH] libcamera: rkisp1: Generate configuration\n\tfrom main path if only one role","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":"Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Paul Elder <paul.elder@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"The current logic for generating configurations assumes that we have\nmultiple roles. The consequence of this is that if only one role is\nrequested, and it is for viewfinder or recording, then the self path's\nconfiguration generator would be used instead of the main path's. This\nis what causes the default resolution on the rkisp1 pipeline handler to\nbe 1920x1920 (since it's the max resolution of the self path). Note that\nthe main path is still used for streaming, just that it is using self\npath's default configuraion (if it isn't changed by the application).\n\nThis patch skips all the logic for determining which path to assign to\nwhich role in the event that only one role is requested. In this case,\nwe simply generate the configuration from the math path. This makes the\ndefault resolution for a single stream 2592x1944.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 10 ++++++++++\n 1 file changed, 10 insertions(+)","diff":"diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex e6fc582b..6c39494e 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -515,6 +515,16 @@ CameraConfiguration *PipelineHandlerRkISP1::generateConfiguration(Camera *camera\n \tif (roles.empty())\n \t\treturn config;\n \n+\tif (roles.size() == 1) {\n+\t\tStreamConfiguration cfg = data->mainPath_->generateConfiguration(\n+\t\t\tdata->sensor_->resolution());\n+\n+\t\tconfig->addConfiguration(cfg);\n+\t\tconfig->validate();\n+\n+\t\treturn config;\n+\t}\n+\n \tbool mainPathAvailable = true;\n \tbool selfPathAvailable = true;\n \tfor (const StreamRole role : roles) {\n","prefixes":["libcamera-devel"]}