Show a patch.

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

{
    "id": 16452,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/16452/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16452/",
    "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": "<20220630101702.45781-2-jeanmichel.hautbois@ideasonboard.com>",
    "date": "2022-06-30T10:16:58",
    "name": "[libcamera-devel,1/5] utils: ipu3: Introduce a parameters dump tool",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "518bd9b1ddd23a34d56b377d0a89abaaa9fdba9e",
    "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/16452/mbox/",
    "series": [
        {
            "id": 3237,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3237/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3237",
            "date": "2022-06-30T10:16:58",
            "name": "[libcamera-devel,1/5] utils: ipu3: Introduce a parameters dump tool",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3237/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16452/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16452/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 70610BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 Jun 2022 10:17:09 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4F99B65654;\n\tThu, 30 Jun 2022 12:17:08 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D381965633\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Jun 2022 12:17:06 +0200 (CEST)",
            "from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:4fb3:9c17:e136:8792])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6565D59D;\n\tThu, 30 Jun 2022 12:17:06 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656584228;\n\tbh=jLJmJyp1BuhktQk/QfbGplJz6qFqCEXCN3+sL6OJX6k=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=RwAEhY+npNUGoKkdlbwwlLzlJnwQWkO0R23sWBhRhn1G0Pt1drtQjo1qiVaW7wZL5\n\tWwpcqPQCunEByOxD2cFxrkfI/t8QhcL6ABrye6FAbaU+xM+cBbl0B8DCd6xciYxBYv\n\toqzlk/fVvggUP3DwCW5Nh9Y7efwvl3yeFSyUUb7XilUmJyvbyqUMOe140ZgLr5M5dn\n\tjpCjZ5iJhjapCtfYlU5MfSUHkCrnQKMO5IZqydVXUMldnAig3xlY0r6NDgYuvF+ZD+\n\t3axEqWTCuzKE6xSs7kw24/MEr1ZV0rwj6GSyYpb3lkUefaLwXxQ9I5Hg9MjgS6j4VR\n\txv7haLahca1xw==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1656584226;\n\tbh=jLJmJyp1BuhktQk/QfbGplJz6qFqCEXCN3+sL6OJX6k=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=mOnTLy7Hvrk3T6ahsfKgmqFxdFkFowV5N8Gf8XKDshyQaW2RukDxnB3ZAm1fxKf48\n\tc6w1VgVSxSz41wMeXMay3JJrOckSBiG5RCcU+RgYAN0uzl65txg/W21Uak6evGVzYM\n\tTsdZnVStYouI8w8Hp5GbNmxWYaUpyql/yDynDe/Q="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"mOnTLy7H\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 30 Jun 2022 12:16:58 +0200",
        "Message-Id": "<20220630101702.45781-2-jeanmichel.hautbois@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20220630101702.45781-1-jeanmichel.hautbois@ideasonboard.com>",
        "References": "<20220630101702.45781-1-jeanmichel.hautbois@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 1/5] utils: ipu3: Introduce a parameters\n\tdump tool",
        "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": "Jean-Michel Hautbois via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The parameters buffer for IPU3 contains a lot of structures, and is not\nvery easy to debug. This tool aims to ease the parsing of it, when it\nhas been stored as a binary raw file.\n\nThis commit introduces the parsing with the support of the AWB grid\nconfiguration.\n\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n---\n utils/ipu3/ipu3-dump-params.c | 74 +++++++++++++++++++++++++++++++++++\n utils/ipu3/meson.build        |  5 +++\n 2 files changed, 79 insertions(+)\n create mode 100644 utils/ipu3/ipu3-dump-params.c",
    "diff": "diff --git a/utils/ipu3/ipu3-dump-params.c b/utils/ipu3/ipu3-dump-params.c\nnew file mode 100644\nindex 00000000..9bd61593\n--- /dev/null\n+++ b/utils/ipu3/ipu3-dump-params.c\n@@ -0,0 +1,74 @@\n+/* SPDX-License-Identifier: GPL-2.0-or-later */\n+/*\n+ * ipu3-dump-params - Display IPU3 parameters buffer from a binary dump\n+ *\n+ * Copyright 2021 Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n+ */\n+#define _GNU_SOURCE\n+\n+#include <errno.h>\n+#include <fcntl.h>\n+#include <stdint.h>\n+#include <stdio.h>\n+#include <string.h>\n+#include <sys/stat.h>\n+#include <sys/types.h>\n+#include <unistd.h>\n+\n+#include <linux/intel-ipu3.h>\n+\n+static void usage(const char *argv0)\n+{\n+\tprintf(\"Usage: %s input-file\\n\", basename(argv0));\n+\tprintf(\"Display the IPU3 parameters buffer\\n\");\n+}\n+\n+static void displayGrid(struct ipu3_uapi_grid_config *grid, const char *gridName)\n+{\n+\tprintf(\"Configured %s grid [%d,%d]x[%d,%d] starting at (%d, %d)\\n\",\n+\t       gridName,\n+\t       grid->width,\n+\t       grid->block_width_log2,\n+\t       grid->height,\n+\t       grid->block_height_log2,\n+\t       grid->x_start,\n+\t       grid->y_start & ~IPU3_UAPI_GRID_Y_START_EN);\n+\n+\tprintf(\"Grid size is (%d x %d)\\n\",\n+\t       grid->width << grid->block_width_log2,\n+\t       grid->height << grid->block_height_log2);\n+}\n+\n+int main(int argc, char *argv[])\n+{\n+\tint in_fd;\n+\tint ret = 0;\n+\tstruct ipu3_uapi_params params;\n+\n+\tif (argc != 2) {\n+\t\tusage(argv[0]);\n+\t\treturn 1;\n+\t}\n+\n+\tin_fd = open(argv[1], O_RDONLY);\n+\tif (in_fd == -1) {\n+\t\tfprintf(stderr, \"Failed to open input file '%s': %s\\n\",\n+\t\t\targv[1], strerror(errno));\n+\t\treturn 1;\n+\t}\n+\n+start:\n+\tret = read(in_fd, &params, sizeof(params));\n+\tif (ret == -1 && errno == EINTR)\n+\t\tgoto start;\n+\n+\tprintf(\"Read parameters buffer of size %d\\n\", ret);\n+\n+\tprintf(\"\\n**** AWB parameters ****\\n\");\n+\tdisplayGrid(&params.acc_param.awb.config.grid, \"awb\");\n+\tdisplayGrid(&params.acc_param.awb_fr.grid_cfg, \"awb_fr\");\n+\n+\tclose(in_fd);\n+\n+\treturn ret ? 1 : 0;\n+}\ndiff --git a/utils/ipu3/meson.build b/utils/ipu3/meson.build\nindex 88049f58..b2d5577e 100644\n--- a/utils/ipu3/meson.build\n+++ b/utils/ipu3/meson.build\n@@ -1,3 +1,8 @@\n # SPDX-License-Identifier: CC0-1.0\n \n+includes = [\n+    libcamera_includes,\n+]\n+\n ipu3_unpack = executable('ipu3-unpack', 'ipu3-unpack.c')\n+ipu3_dump_params = executable('ipu3-dump-params', 'ipu3-dump-params.c', include_directories : libcamera_includes)\n",
    "prefixes": [
        "libcamera-devel",
        "1/5"
    ]
}