Show a patch.

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

{
    "id": 9380,
    "url": "https://patchwork.libcamera.org/api/patches/9380/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/9380/",
    "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": "<20200825170801.17513-1-laurent.pinchart@ideasonboard.com>",
    "date": "2020-08-25T17:08:01",
    "name": "[libcamera-devel] libcamera: pipeline: vimc: Fix configuration validation",
    "commit_ref": "3bce337fbe5caeab6064e1969fb2fd0c537d57db",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "74da8b75d84e796a7bd1a47f62c22b65f7a1cdd2",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/9380/mbox/",
    "series": [
        {
            "id": 1241,
            "url": "https://patchwork.libcamera.org/api/series/1241/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1241",
            "date": "2020-08-25T17:08:01",
            "name": "[libcamera-devel] libcamera: pipeline: vimc: Fix configuration validation",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1241/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/9380/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/9380/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 A7A77BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 Aug 2020 17:08:30 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1F81361EA0;\n\tTue, 25 Aug 2020 19:08:30 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D1A316037C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Aug 2020 19:08:27 +0200 (CEST)",
            "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 53A4F9A5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Aug 2020 19:08:26 +0200 (CEST)"
        ],
        "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=\"q0IavTVF\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1598375306;\n\tbh=X4CtMqxuMoEM0bb7cRICz5K1lYrEaFYQVC41Odu+Qhk=;\n\th=From:To:Subject:Date:From;\n\tb=q0IavTVFerZ0edi5AAJkLJiUlb8qWgq28SIO1AhfqmfW1V/qOZZVqeZSST+p04q1m\n\tojgdVrpsHJnsXOYQC6O69/G5e6IKLKVCRVdV/nr/vFeRy76go1eBKhnafa6tn7inAH\n\tn6Lll2XxFVS03D3xkhQKb6JjElc13Xx9XzNw3XYo=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 25 Aug 2020 20:08:01 +0300",
        "Message-Id": "<20200825170801.17513-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH] libcamera: pipeline: vimc: Fix\n\tconfiguration validation",
        "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 sensor aligns the width and height to multiples of two pixels, and\nthe scaler has a x3 hardcoded factor. The output size must thus be\naligned to 6 pixels, not 3. Fix it.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/pipeline/vimc/vimc.cpp | 10 +++++++---\n 1 file changed, 7 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\nindex 7e237650b448..d192670bbc8f 100644\n--- a/src/libcamera/pipeline/vimc/vimc.cpp\n+++ b/src/libcamera/pipeline/vimc/vimc.cpp\n@@ -149,11 +149,15 @@ CameraConfiguration::Status VimcCameraConfiguration::validate()\n \t/* Clamp the size based on the device limits. */\n \tconst Size size = cfg.size;\n \n-\t/* The scaler hardcodes a x3 scale-up ratio. */\n+\t/*\n+\t * The scaler hardcodes a x3 scale-up ratio, and the sensor output size\n+\t * is aligned to two pixels in both directions. The output width and\n+\t * height thus have to be multiples of 6.\n+\t */\n \tcfg.size.width = std::max(48U, std::min(4096U, cfg.size.width));\n \tcfg.size.height = std::max(48U, std::min(2160U, cfg.size.height));\n-\tcfg.size.width -= cfg.size.width % 3;\n-\tcfg.size.height -= cfg.size.height % 3;\n+\tcfg.size.width -= cfg.size.width % 6;\n+\tcfg.size.height -= cfg.size.height % 6;\n \n \tif (cfg.size != size) {\n \t\tLOG(VIMC, Debug)\n",
    "prefixes": [
        "libcamera-devel"
    ]
}