Show a patch.

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

{
    "id": 22311,
    "url": "https://patchwork.libcamera.org/api/patches/22311/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/22311/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20241213094602.2083174-7-naush@raspberrypi.com>",
    "date": "2024-12-13T09:38:29",
    "name": "[6/6] ipa: rpi: Provide the camera helper with the hardware configuration",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "351999f87eb88b1c92fef3bc68c77b226e4301b4",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/22311/mbox/",
    "series": [
        {
            "id": 4881,
            "url": "https://patchwork.libcamera.org/api/series/4881/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4881",
            "date": "2024-12-13T09:38:23",
            "name": "Raspberry Pi: Various changes",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4881/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/22311/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/22311/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 E0C9BC32EA\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 13 Dec 2024 09:46:20 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 73CFB67EEB;\n\tFri, 13 Dec 2024 10:46:19 +0100 (CET)",
            "from mail-wm1-x333.google.com (mail-wm1-x333.google.com\n\t[IPv6:2a00:1450:4864:20::333])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 649DB67EED\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Dec 2024 10:46:12 +0100 (CET)",
            "by mail-wm1-x333.google.com with SMTP id\n\t5b1f17b1804b1-4361aa6e517so1799315e9.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Dec 2024 01:46:12 -0800 (PST)",
            "from NAUSH-P-DELL.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4362557c502sm43989105e9.11.2024.12.13.01.46.11\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 13 Dec 2024 01:46:11 -0800 (PST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"RwrC66A6\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1734083172; x=1734687972;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=dMqIeHktniCC3ksS/cr/kuwcUfMRJ47Oehi3rhiipek=;\n\tb=RwrC66A698Fxt/oCp1Dxv+6qn8x8L9EGMuK1/8iqqDmQDpDYUZd0aU60zeOf5wfCHb\n\teqAuSnoIZl5BS3sSivFZP69G2v7q1lXK01XUzn9bjsoAlJNt57Z40P+L+Cx9IMoBNLho\n\tvTYqZHhppMc19l33PZAAG7nwgBeq3hequcicD9BW1n7fvSZsu07J84vmFY6kT1m/h2D9\n\tjGNWuYEPTsjojoMYE3eRAgemxlliy5kzi50aT6ej1nlUTAecJhrTjwui4tmMJpC2vuLk\n\t8/P/SFNSzwsISdrSP/UB2bpa0PxGja7nglSbhNMIu/gMoCcCHlwcxIL7FENAPCYWrnka\n\tHigg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1734083172; x=1734687972;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=dMqIeHktniCC3ksS/cr/kuwcUfMRJ47Oehi3rhiipek=;\n\tb=TIH7/OWyo+5DapEZfBSKvl2WijVciva2p4PdiA4eLhjlf2yDItLaN+3uVDFVcX/H36\n\tN3DUvvc5Phh1GL35GejvEt+WIYyi0/NacVxGVDfMxBlQESiG/470ArlepjeaF7MHCOio\n\tHtciLwOJ04xHdYUE+D8OTnihBIlh0i625LODnBzU7mDIufpxgMdM/U8HJ+E6DAEd3ShG\n\tHyF0GpvGVhrvqP8OtnYKy5ojyWGvdUszGA9PwMrECTi0RInqRP4jpWgey6EzDS1bprh0\n\tgU6bnlQK11iJWld5poPuDoaanFObf+/TlOr849HIZkkJMH2QJjPchRaXqNs9H6bS8rHO\n\tH5dQ==",
        "X-Gm-Message-State": "AOJu0YxDJJyZBc+k9iY2V/LBeFhEo+fn4n9NULoV+RdlU5YRG03fCn+t\n\tGvWH5WUWjoEKO5DW/62PMXj7XQZ0O5gjJx2jPvzhLAqEMMs0ApihUO6n+7UVeOQAoHyd8TrPfUn\n\t8",
        "X-Gm-Gg": "ASbGnctjsw8sFN31RzmA5ZhuNFLVqba3AsQMXA3tnROJ8zlC24zWDRCpbOKoAIvzyAB\n\tTtiBiCUyzfft9PGEAw/tPxISWF33Z09y8o5adfILxWOX9YPXo2+YexyYX5hXZlD93T080RJjuCM\n\t2dfp6WauFqoWV6PBmIrb9WHIjTMSp90raiPjgGgkQWEA3ic2LWCW/N+j6/hiERH8QOUWcy3UtfM\n\tsRL1Vqj5syi/d4OX885JocKcjRQWfsFWTOpzHQW9YHolq9KbKdrZkxeMQx2GifcGlXL9n0MUeP4",
        "X-Google-Smtp-Source": "AGHT+IHbxI9uKHgNhARwbk6XqNL9HGf/xOTOOAkFKuI6o61lV/O2/jHsjZeZwNMvuBP3IVCY41zmMg==",
        "X-Received": "by 2002:a05:600c:4ed4:b0:436:1b94:2de5 with SMTP id\n\t5b1f17b1804b1-4362aaa18damr5145315e9.5.1734083171674; \n\tFri, 13 Dec 2024 01:46:11 -0800 (PST)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Naushir Patuck <naush@raspberrypi.com>",
        "Subject": "[PATCH 6/6] ipa: rpi: Provide the camera helper with the hardware\n\tconfiguration",
        "Date": "Fri, 13 Dec 2024 09:38:29 +0000",
        "Message-ID": "<20241213094602.2083174-7-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20241213094602.2083174-1-naush@raspberrypi.com>",
        "References": "<20241213094602.2083174-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add a CamHelper::setHwConfig() helper used by the IPA to set the\nhardware configuartion in use by the pipeline. This will be needed by\nthe IMX500 camera helper in a future commit to determine if the\nmetadata buffer is strided.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/rpi/cam_helper/cam_helper.cpp | 5 +++++\n src/ipa/rpi/cam_helper/cam_helper.h   | 2 ++\n src/ipa/rpi/common/ipa_base.cpp       | 1 +\n 3 files changed, 8 insertions(+)",
    "diff": "diff --git a/src/ipa/rpi/cam_helper/cam_helper.cpp b/src/ipa/rpi/cam_helper/cam_helper.cpp\nindex 6493e88232a4..1422a02e9953 100644\n--- a/src/ipa/rpi/cam_helper/cam_helper.cpp\n+++ b/src/ipa/rpi/cam_helper/cam_helper.cpp\n@@ -156,6 +156,11 @@ void CamHelper::setCameraMode(const CameraMode &mode)\n \t}\n }\n \n+void CamHelper::setHwConfig(const Controller::HardwareConfig &hwConfig)\n+{\n+\thwConfig_ = hwConfig;\n+}\n+\n void CamHelper::getDelays(int &exposureDelay, int &gainDelay,\n \t\t\t  int &vblankDelay, int &hblankDelay) const\n {\ndiff --git a/src/ipa/rpi/cam_helper/cam_helper.h b/src/ipa/rpi/cam_helper/cam_helper.h\nindex 4a4ab5e68cba..fb7eb3202e79 100644\n--- a/src/ipa/rpi/cam_helper/cam_helper.h\n+++ b/src/ipa/rpi/cam_helper/cam_helper.h\n@@ -76,6 +76,7 @@ public:\n \tCamHelper(std::unique_ptr<MdParser> parser, unsigned int frameIntegrationDiff);\n \tvirtual ~CamHelper();\n \tvoid setCameraMode(const CameraMode &mode);\n+\tvoid setHwConfig(const Controller::HardwareConfig &hwConfig);\n \tvirtual void prepare(libcamera::Span<const uint8_t> buffer,\n \t\t\t     Metadata &metadata);\n \tvirtual void process(StatisticsPtr &stats, Metadata &metadata);\n@@ -108,6 +109,7 @@ protected:\n \n \tstd::unique_ptr<MdParser> parser_;\n \tCameraMode mode_;\n+\tController::HardwareConfig hwConfig_;\n \n private:\n \t/*\ndiff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\nindex b3656cbc730b..a7d27ef66ec4 100644\n--- a/src/ipa/rpi/common/ipa_base.cpp\n+++ b/src/ipa/rpi/common/ipa_base.cpp\n@@ -161,6 +161,7 @@ int32_t IpaBase::init(const IPASettings &settings, const InitParams &params, Ini\n \tlensPresent_ = params.lensPresent;\n \n \tcontroller_.initialise();\n+\thelper_->setHwConfig(controller_.getHardwareConfig());\n \n \t/* Return the controls handled by the IPA */\n \tControlInfoMap::Map ctrlMap = ipaControls;\n",
    "prefixes": [
        "6/6"
    ]
}