Show a patch.

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

{
    "id": 2230,
    "url": "https://patchwork.libcamera.org/api/patches/2230/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/2230/",
    "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": "<20191027125922.12219-1-jacopo@jmondi.org>",
    "date": "2019-10-27T12:59:22",
    "name": "[libcamera-devel,v2] ipa: Allow forcing usage of C API though environment",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "21f252bada0dd940445a2124e9dd503ba7fab67c",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": {
        "id": 15,
        "url": "https://patchwork.libcamera.org/api/users/15/?format=api",
        "username": "jmondi",
        "first_name": "Jacopo",
        "last_name": "Mondi",
        "email": "jacopo@jmondi.org"
    },
    "mbox": "https://patchwork.libcamera.org/patch/2230/mbox/",
    "series": [
        {
            "id": 557,
            "url": "https://patchwork.libcamera.org/api/series/557/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=557",
            "date": "2019-10-27T12:59:22",
            "name": "[libcamera-devel,v2] ipa: Allow forcing usage of C API though environment",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/557/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/2230/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/2230/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[217.70.183.200])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6FAF561376\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 27 Oct 2019 13:57:34 +0100 (CET)",
            "from uno.localdomain (143.121.2.93.rev.sfr.net [93.2.121.143])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay7-d.mail.gandi.net (Postfix) with ESMTPSA id C9E4920004;\n\tSun, 27 Oct 2019 12:57:33 +0000 (UTC)"
        ],
        "X-Originating-IP": "93.2.121.143",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sun, 27 Oct 2019 13:59:22 +0100",
        "Message-Id": "<20191027125922.12219-1-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.23.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2] ipa: Allow forcing usage of C API\n\tthough environment",
        "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>",
        "X-List-Received-Date": "Sun, 27 Oct 2019 12:57:34 -0000"
    },
    "content": "Parse the 'LIBCAMERA_IPA_FORCE_C_API' environment variable that allows\nforcing the usage of the IPA C API even if it's possible to short-circuit\nit through the ipa_context_ops get_interface() operation.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/ipa_context_wrapper.cpp | 10 +++++++++-\n 1 file changed, 9 insertions(+), 1 deletion(-)\n\n--\n2.23.0",
    "diff": "diff --git a/src/libcamera/ipa_context_wrapper.cpp b/src/libcamera/ipa_context_wrapper.cpp\nindex 736082e9b068..b178418eb9b8 100644\n--- a/src/libcamera/ipa_context_wrapper.cpp\n+++ b/src/libcamera/ipa_context_wrapper.cpp\n@@ -9,6 +9,8 @@\n\n #include <libcamera/controls.h>\n\n+#include \"utils.h\"\n+\n /**\n  * \\file ipa_context_wrapper.h\n  * \\brief Image Processing Algorithm context wrapper\n@@ -41,7 +43,13 @@ namespace libcamera {\n IPAContextWrapper::IPAContextWrapper(struct ipa_context *context)\n \t: ctx_(context)\n {\n-\tif (ctx_ && ctx_->ops->get_interface) {\n+\tint skipIntf = 0;\n+\tconst char *skipIntfEnv =\n+\t\t\tutils::secure_getenv(\"LIBCAMERA_IPA_FORCE_C_API\");\n+\tif (skipIntfEnv)\n+\t\tskipIntf = !!atoi(skipIntfEnv);\n+\n+\tif (!skipIntf && ctx_ && ctx_->ops->get_interface) {\n \t\tintf_ = reinterpret_cast<IPAInterface *>(ctx_->ops->get_interface(ctx_));\n \t\tintf_->queueFrameAction.connect(this, &IPAContextWrapper::queueFrameAction);\n \t} else {\n",
    "prefixes": [
        "libcamera-devel",
        "v2"
    ]
}