Show a patch.

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

{
    "id": 11586,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/11586/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11586/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20210316144711.40778-2-jeanmichel.hautbois@ideasonboard.com>",
    "date": "2021-03-16T14:47:09",
    "name": "[libcamera-devel,v3,1/3] libcamera: ipu3: Move Imgu configuration to IPU3CameraData",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "1b538f733d3833924702aaf3a78b8edb25cd6aa2",
    "submitter": {
        "id": 75,
        "url": "https://patchwork.libcamera.org/api/1.1/people/75/?format=api",
        "name": "Jean-Michel Hautbois",
        "email": "jeanmichel.hautbois@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/11586/mbox/",
    "series": [
        {
            "id": 1796,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1796/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1796",
            "date": "2021-03-16T14:47:08",
            "name": "Prepare IPU3 pipeline to pass BDS to IPA",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/1796/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11586/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11586/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 85CAFBD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 16 Mar 2021 14:47:22 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 48A7068D50;\n\tTue, 16 Mar 2021 15:47:22 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0B0BE68D3F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Mar 2021 15:47:21 +0100 (CET)",
            "from localhost.localdomain (unknown\n\t[IPv6:2a01:e0a:169:7140:f840:1816:ba68:a009])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BC5688CF;\n\tTue, 16 Mar 2021 15:47:20 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"DEiH9TXd\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1615906040;\n\tbh=2uZo6Sqx0DIVCM906OwPvQX4ycTUHpD6n/jFrogHGzY=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=DEiH9TXdRrDMQRYSevrbnZD+MraRtKSagzE1ujCrGBbe7lsJVrf0qmd+hbMFHS7/m\n\tY427olYUrE2K62oxFmM6GoWlWtCSPFESCKNHaIoyDsi86rjUvdDAeIwURym71SoLH0\n\tE2wpomdGWui5BLxWrxddVPQwvs2n329I4rw3gzrs=",
        "From": "Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 16 Mar 2021 15:47:09 +0100",
        "Message-Id": "<20210316144711.40778-2-jeanmichel.hautbois@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20210316144711.40778-1-jeanmichel.hautbois@ideasonboard.com>",
        "References": "<20210316144711.40778-1-jeanmichel.hautbois@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v3 1/3] libcamera: ipu3: Move Imgu\n\tconfiguration to IPU3CameraData",
        "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": "The IPU3 IPA needs to know the BayerDownScaler (BDS) configuration to\ncalculate the statistics grids.\nThis patch makes it possible for PipelineHandlerIPU3::start() to access\nthe BDS configuration and later pass the rectangle to the IPU3 IPA\nconfigure method.\n\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n---\nv3:\n- remove bds argument which is in a separate patch\n- split in two patches ipa configure moving\nv2:\n- move pipe configuration calculation from validate to configure\n- move ipa configuration from start to configure\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 38 +++++++++++++---------------\n 1 file changed, 18 insertions(+), 20 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 2ea13ec9..65657dcc 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -97,11 +97,14 @@ public:\n \tStatus validate() override;\n \n \tconst StreamConfiguration &cio2Format() const { return cio2Configuration_; }\n-\tconst ImgUDevice::PipeConfig imguConfig() const { return pipeConfig_; }\n \n \t/* Cache the combinedTransform_ that will be applied to the sensor */\n \tTransform combinedTransform_;\n \n+\t/* Store the pipe configuration */\n+\tImgUDevice::PipeConfig pipeConfig_;\n+\tImgUDevice::Pipe pipe_;\n+\n private:\n \t/*\n \t * The IPU3CameraData instance is guaranteed to be valid as long as the\n@@ -111,7 +114,6 @@ private:\n \tconst IPU3CameraData *data_;\n \n \tStreamConfiguration cio2Configuration_;\n-\tImgUDevice::PipeConfig pipeConfig_;\n };\n \n class PipelineHandlerIPU3 : public PipelineHandler\n@@ -170,6 +172,7 @@ IPU3CameraConfiguration::IPU3CameraConfiguration(IPU3CameraData *data)\n CameraConfiguration::Status IPU3CameraConfiguration::validate()\n {\n \tStatus status = Valid;\n+\tpipe_ = {};\n \n \tif (config_.empty())\n \t\treturn Invalid;\n@@ -272,8 +275,7 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()\n \n \tLOG(IPU3, Debug) << \"CIO2 configuration: \" << cio2Configuration_.toString();\n \n-\tImgUDevice::Pipe pipe{};\n-\tpipe.input = cio2Configuration_.size;\n+\tpipe_.input = cio2Configuration_.size;\n \n \t/*\n \t * Adjust the configurations if needed and assign streams while\n@@ -349,15 +351,15 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()\n \t\t\t\tcfg->setStream(const_cast<Stream *>(&data_->outStream_));\n \t\t\t\tmainOutputAvailable = false;\n \n-\t\t\t\tpipe.main = cfg->size;\n+\t\t\t\tpipe_.main = cfg->size;\n \t\t\t\tif (yuvCount == 1)\n-\t\t\t\t\tpipe.viewfinder = pipe.main;\n+\t\t\t\t\tpipe_.viewfinder = pipe_.main;\n \n \t\t\t\tLOG(IPU3, Debug) << \"Assigned \" << cfg->toString()\n \t\t\t\t\t\t << \" to the main output\";\n \t\t\t} else {\n \t\t\t\tcfg->setStream(const_cast<Stream *>(&data_->vfStream_));\n-\t\t\t\tpipe.viewfinder = cfg->size;\n+\t\t\t\tpipe_.viewfinder = cfg->size;\n \n \t\t\t\tLOG(IPU3, Debug) << \"Assigned \" << cfg->toString()\n \t\t\t\t\t\t << \" to the viewfinder output\";\n@@ -373,16 +375,6 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()\n \t\t}\n \t}\n \n-\t/* Only compute the ImgU configuration if a YUV stream has been requested. */\n-\tif (yuvCount) {\n-\t\tpipeConfig_ = data_->imgu_->calculatePipeConfig(&pipe);\n-\t\tif (pipeConfig_.isNull()) {\n-\t\t\tLOG(IPU3, Error) << \"Failed to calculate pipe configuration: \"\n-\t\t\t\t\t << \"unsupported resolutions.\";\n-\t\t\treturn Invalid;\n-\t\t}\n-\t}\n-\n \treturn status;\n }\n \n@@ -576,11 +568,17 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)\n \t * stream has been requested: return here to skip the ImgU configuration\n \t * part.\n \t */\n-\tImgUDevice::PipeConfig imguConfig = config->imguConfig();\n-\tif (imguConfig.isNull())\n+\tif (config->pipe_.main.isNull() && config->pipe_.viewfinder.isNull())\n \t\treturn 0;\n \n-\tret = imgu->configure(imguConfig, &cio2Format);\n+\tconfig->pipeConfig_ = imgu->calculatePipeConfig(&config->pipe_);\n+\tif (config->pipeConfig_.isNull()) {\n+\t\tLOG(IPU3, Error) << \"Failed to calculate pipe configuration: \"\n+\t\t\t\t << \"unsupported resolutions.\";\n+\t\treturn CameraConfiguration::Invalid;\n+\t}\n+\n+\tret = imgu->configure(config->pipeConfig_, &cio2Format);\n \tif (ret)\n \t\treturn ret;\n \n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "1/3"
    ]
}