Show a patch.

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

{
    "id": 25438,
    "url": "https://patchwork.libcamera.org/api/patches/25438/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25438/",
    "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": "<20251210005354.44726-22-bryan.odonoghue@linaro.org>",
    "date": "2025-12-10T00:53:49",
    "name": "[v7,21/26] ipa: libipa: module: Add createSelfEnumeratingAlgorithm",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "4e2525e5838b07710202a3e8a5066b69cd0ca25b",
    "submitter": {
        "id": 175,
        "url": "https://patchwork.libcamera.org/api/people/175/?format=api",
        "name": "Bryan O'Donoghue",
        "email": "bryan.odonoghue@linaro.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/25438/mbox/",
    "series": [
        {
            "id": 5645,
            "url": "https://patchwork.libcamera.org/api/series/5645/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5645",
            "date": "2025-12-10T00:53:28",
            "name": "Add GLES 2.0 GPUISP to libcamera",
            "version": 7,
            "mbox": "https://patchwork.libcamera.org/series/5645/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25438/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25438/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 59B6CC3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Dec 2025 00:55:09 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1436761491;\n\tWed, 10 Dec 2025 01:55:09 +0100 (CET)",
            "from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com\n\t[IPv6:2607:f8b0:4864:20::42a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D871B6149C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Dec 2025 01:55:07 +0100 (CET)",
            "by mail-pf1-x42a.google.com with SMTP id\n\td2e1a72fcca58-7bc248dc16aso5250025b3a.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 09 Dec 2025 16:55:07 -0800 (PST)",
            "from inspiron14p-linux (p96936b06.osaknt01.ap.so-net.ne.jp.\n\t[150.147.107.6]) by smtp.gmail.com with ESMTPSA id\n\t41be03b00d2f7-bf6875cc8eesm16057762a12.16.2025.12.09.16.55.04\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 09 Dec 2025 16:55:05 -0800 (PST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"sHwID5L6\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1765328106; x=1765932906;\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=4uTWF13ovZ62aTw8eKAGAg1ulpVTnbTayTqfUI1rApw=;\n\tb=sHwID5L6eVsP8ABmZ6lTq27qVKT4EuuRwgtJloHHb+FD1b0TvQ1hvr/vjqO9m0S3cn\n\tHYw47NZK4Z1ZzxnU32fBbYQeFfdFM8k+28rvAO5u6HoDElZg0rbExYpxK1kfAvuJ1Pne\n\tjAV7JhWZ4EN5thDs0Rvoz7EDfs1ncqNNGuNhs38WdxGnX10uU/txLwfiEWN1bHKmAbNy\n\tvCXAtWBOmTMubt5Z7YcB+7RhNIg/Y5ktcDXXCeFoQKbrREL6mMfqbHqhekR7ItF4jsF/\n\tQrGDJpCJ75OQkU36PawEWe8mzLWhRUoeCq4HpHvyxxLPEK06qHvDpomzhzze/FCXVSKu\n\tWo7w==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765328106; x=1765932906;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=4uTWF13ovZ62aTw8eKAGAg1ulpVTnbTayTqfUI1rApw=;\n\tb=Jdlrv5faE/IwDzsOzG9m+VGBrke5LfaFX7oy1k30feJCIbj7N2ctAykGnNBVB64DSe\n\tExbLZDucOg8Tas+w78TeWA3Zc+K3UoW0MGuXTU6njeeaSuTesLDpRrZVL2ZG9ifgbkdA\n\tD4fgBJrnk5+JPuAmhYbuvoO6F2h0m//LpUKKJpvOKmaD8BhG0LOH2hokA3wK9fv1vhqn\n\tdqgDUQusm+896XVtWSZaSgFruBNWE5Ik6qLRFTN/yfkPjUmdZ3ck7oE+rcIDGNyaUJ5+\n\th6jvCuYW1WCd+XtWsjxVuk5BpeitIa+376078H+XDInADOm8p3Jg+f2RB8b0kNMUZGFw\n\tFxfQ==",
        "X-Gm-Message-State": "AOJu0YxdJA5Dew/uoufCdViXt3i7TJ+2runvo5IFK51sGy5xkrNn6Ngm\n\t49EjGW1nCPJC1WgnZm8ud2iYRwXs+/nrEqdWFffI8QyayrdusR7aiIA11VHLuIKfhTJyCVZv8Ik\n\tPgVUA",
        "X-Gm-Gg": "ASbGncuxbeaspC9r3Sc921ro5jkBdcvCh6SbWiaqKyrDm1LZfs77/zgErVDxLKiv8TX\n\tLgZwQaoxJzeLIDzqOgXiFtN+E1o05/YH66ephM+9Y3VfaRYbI2cavM3hgMnkRWeGXTl4sxT43qR\n\t+5edeBxqEVnCHmfjr9vtyNk1IwutTebTNdKXjzA4dtXdYytvkvgXxnENSmcwRqpsrUL2Hja6CM3\n\tNyLQCGPMVkcg5CBCmHgED77Uwf0kAoYM4evbW/T8+S9PqvGucC4Tc4Ri+jQZ4GumI7egNqpQIin\n\trBCZTTaaOh6KmPzU64XmFpw4hsrc8LJBWVcGQ84EBeRrsqSAt+WvkWs7bkKdZ1k3dcPGocQj5jb\n\tt6GmxyfgHsapvMTSf13bvRxCIyF29F7hh2edtFwND89YvhbGB1PZAXR8o0WA2g+QMmgRXqsYEzK\n\tegGzBz0bOSlB78aJaDcQ7xBWJ6bOgf/r6d5/6uXsdid2EOioWYqz6eSiy8vLlvm7Cu",
        "X-Google-Smtp-Source": "AGHT+IE8Z+Wb1GRgaDF4g22WcxBQPsVvkNQvsYqfRqc1j4om1GWiQFh/HGLtISQhjrt3AKyHQ1iIuw==",
        "X-Received": "by 2002:a05:6a20:430d:b0:355:1add:c291 with SMTP id\n\tadf61e73a8af0-366e0ae858amr467038637.10.1765328106078; \n\tTue, 09 Dec 2025 16:55:06 -0800 (PST)",
        "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "pavel@ucw.cz,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "Subject": "[PATCH v7 21/26] ipa: libipa: module: Add\n\tcreateSelfEnumeratingAlgorithm",
        "Date": "Wed, 10 Dec 2025 00:53:49 +0000",
        "Message-ID": "<20251210005354.44726-22-bryan.odonoghue@linaro.org>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20251210005354.44726-1-bryan.odonoghue@linaro.org>",
        "References": "<20251210005354.44726-1-bryan.odonoghue@linaro.org>",
        "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": "Create an algorithm without having YAML data input.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/ipa/libipa/module.h | 45 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 45 insertions(+)",
    "diff": "diff --git a/src/ipa/libipa/module.h b/src/ipa/libipa/module.h\nindex c27af7718..c5767c6f3 100644\n--- a/src/ipa/libipa/module.h\n+++ b/src/ipa/libipa/module.h\n@@ -70,6 +70,51 @@ public:\n \t\tfactories().push_back(factory);\n \t}\n \n+\t/**\n+\t * \\fn int Module::createSelfEnumeratingAlgorithm(Context &context, const std::string &name)\n+\t * \\brief Create and initialise a self-enumerating algorithm by name\n+\t *\n+\t * This function creates an algorithm instance from the registered algorithm\n+\t * factories using only the algorithm name, without requiring YAML configuration\n+\t * data.\n+\t *\n+\t * This is useful for algorithms that don't require external configuration\n+\t * parameters and can self-configure or use default values.\n+\t *\n+\t * \\param[in] context The IPA context to pass to the algorithm's init function\n+\t * \\param[in] name The name of the algorithm to instantiate\n+\t *\n+\t * \\return 0 on success, negative errno value on failure:\n+\t *         -EINVAL if the algorithm is not found in the factory registry\n+\t *         Other negative values if algorithm initialisation fails\n+\t */\n+\tint createSelfEnumeratingAlgorithm(Context &context, const std::string &name)\n+\t{\n+\t\tYamlObject dummy;\n+\n+\t\tstd::unique_ptr<Algorithm<Module>> algo = createAlgorithm(name);\n+\t\tif (!algo) {\n+\t\t\tLOG(IPAModuleAlgo, Error)\n+\t\t\t\t<< \"Algorithm '\" << name << \"' not found\";\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\n+\t\tcontext.selfInitialising = true;\n+\n+\t\tint ret = algo->init(context, dummy);\n+\t\tif (ret) {\n+\t\t\tLOG(IPAModuleAlgo, Error)\n+\t\t\t\t<< \"Algorithm '\" << name << \"' failed to initialize\";\n+\t\t\treturn ret;\n+\t\t}\n+\n+\t\tLOG(IPAModuleAlgo, Debug)\n+\t\t\t<< \"Instantiated algorithm '\" << name << \"'\";\n+\n+\t\talgorithms_.push_back(std::move(algo));\n+\t\treturn 0;\n+\t}\n+\n private:\n \tint createAlgorithm(Context &context, const YamlObject &data)\n \t{\n",
    "prefixes": [
        "v7",
        "21/26"
    ]
}