Show a patch.

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

{
    "id": 21428,
    "url": "https://patchwork.libcamera.org/api/patches/21428/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/21428/",
    "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": "<20240930141415.8857-4-naush@raspberrypi.com>",
    "date": "2024-09-30T14:14:11",
    "name": "[v2,3/7] pipeline: rpi: Pass crop rectangle as a parameter to platformSetIspCrop()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "312bb601ff6d6fc1eca9aa0c6e12b167ab1789fc",
    "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/21428/mbox/",
    "series": [
        {
            "id": 4639,
            "url": "https://patchwork.libcamera.org/api/series/4639/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4639",
            "date": "2024-09-30T14:14:08",
            "name": "Raspberry Pi: Add controls::rpi::ScalerCrops",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4639/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/21428/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/21428/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 528B6C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 30 Sep 2024 14:14:09 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D41AF63521;\n\tMon, 30 Sep 2024 16:14:07 +0200 (CEST)",
            "from mail-wr1-x434.google.com (mail-wr1-x434.google.com\n\t[IPv6:2a00:1450:4864:20::434])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E370E63502\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 Sep 2024 16:14:00 +0200 (CEST)",
            "by mail-wr1-x434.google.com with SMTP id\n\tffacd0b85a97d-37cd5501ec1so243998f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 Sep 2024 07:14:00 -0700 (PDT)",
            "from naush-laptop.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-37cd56e65c3sm9142524f8f.60.2024.09.30.07.13.58\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 30 Sep 2024 07:13:59 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"eE3ePZKw\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1727705640; x=1728310440;\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=XrWcUJQsFkTVobFUCVSgV/d6Wx/qIdBspGHAklWbwc0=;\n\tb=eE3ePZKw+z+TbwGeH/fXbIWDm8FpLBJeUAJyeI4u9FWwy86y0xNhwaihWZq/evTbJU\n\thjHsCG6Ivg6sqPvudXo65jUY5VRXQtt8d5M1ku6l581Kj75NFow6xpGM/HQKi6fxtOQb\n\tpUD7E7PHngtyUVMBsOsxrAFs6TVtmjihw6e3XxrJF8yTunajRep8GJVN87RTlWo2F1Rq\n\te/0cxL+ouXDuHrkE4Anyy+WPMTYc/xZO0oS0xa667sWRhR5pfTKMuycdGhCuk5lRIEHB\n\tUQ7w+W3MfzP9PfETJUKB25TmkVsaRuIW7Y/dCRcrJjPydk1BAT+acaXMB3YpShXhXw0b\n\tO6sQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1727705640; x=1728310440;\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=XrWcUJQsFkTVobFUCVSgV/d6Wx/qIdBspGHAklWbwc0=;\n\tb=wLsWnGj+YS8adBCQvBmQO59D2aInFk22OZRC48Sg9sT8E1IccMh2ke33UIP7Q3L/6b\n\t/CrHik+9VLlIhKISxgxF838bISkMCPsN6V0ZlMGZ62RHpa1Tng4UEHiw3Uch6E3Bmx+i\n\tMd8A+eNbM02sqilyHISgyviaP9K+gXePP0BS5djJj5MQBLGCVBbrNC61JyyEKheB9cVu\n\tAbqKLRZLK1IH57Rku9UXMyx9lmIF6U6YqbtAupz0j14+RgqhMFmpdjpjYs5lcR56sp/Y\n\tokBsg80Vx0o3kKGwpUQXo/0GV5e7xuAaBmDPOkPfQGEYMbTRWLjy6sfnALVsjwr6zVQ1\n\tCquw==",
        "X-Gm-Message-State": "AOJu0Yw9CjC61leJ0SnfetU1m2txK/v8cEWI1vE2ZkgVs4rf4+Js+oSH\n\tS1IvaUUEY18oCIOy4jrsdBHjU4naPPrnkWvw3THEK6UyamcvPCl99At9wWfzuiSfuU1mVt8/5zc\n\tq",
        "X-Google-Smtp-Source": "AGHT+IFRVRJ3Wixy/fxnsnqXGcu3q3YbReZuKqMfk/9X82mwkcKJ/r50Mg2usG/e8/1K85/jc5XyEw==",
        "X-Received": "by 2002:a05:6000:1acb:b0:374:cef0:fd2a with SMTP id\n\tffacd0b85a97d-37cde3f8899mr2513893f8f.7.1727705639732; \n\tMon, 30 Sep 2024 07:13:59 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Naushir Patuck <naush@raspberrypi.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Subject": "[PATCH v2 3/7] pipeline: rpi: Pass crop rectangle as a parameter to\n\tplatformSetIspCrop()",
        "Date": "Mon, 30 Sep 2024 15:14:11 +0100",
        "Message-Id": "<20240930141415.8857-4-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240930141415.8857-1-naush@raspberrypi.com>",
        "References": "<20240930141415.8857-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": "This will be required when we program separate crop values to each ISP\noutput in a future commit.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 2 +-\n src/libcamera/pipeline/rpi/common/pipeline_base.h   | 2 +-\n src/libcamera/pipeline/rpi/vc4/vc4.cpp              | 7 ++++---\n 3 files changed, 6 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\nindex 11f1bfd4a5da..2de6111bacfd 100644\n--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n@@ -1314,7 +1314,7 @@ void CameraData::applyScalerCrop(const ControlList &controls)\n \n \t\tif (ispCrop != ispCrop_) {\n \t\t\tispCrop_ = ispCrop;\n-\t\t\tplatformSetIspCrop();\n+\t\t\tplatformSetIspCrop(ispCrop);\n \t\t}\n \t}\n }\ndiff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h\nindex 5161c16e518f..d65b695c30b5 100644\n--- a/src/libcamera/pipeline/rpi/common/pipeline_base.h\n+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h\n@@ -83,7 +83,7 @@ public:\n \n \tRectangle scaleIspCrop(const Rectangle &ispCrop) const;\n \tvoid applyScalerCrop(const ControlList &controls);\n-\tvirtual void platformSetIspCrop() = 0;\n+\tvirtual void platformSetIspCrop(const Rectangle &ispCrop) = 0;\n \n \tvoid cameraTimeout();\n \tvoid frameStarted(uint32_t sequence);\ndiff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\nindex e5b6ef2b37cd..0ea032293bc9 100644\n--- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n+++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n@@ -109,9 +109,10 @@ public:\n \tConfig config_;\n \n private:\n-\tvoid platformSetIspCrop() override\n+\tvoid platformSetIspCrop(const Rectangle &ispCrop) override\n \t{\n-\t\tisp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &ispCrop_);\n+\t\tRectangle crop = ispCrop;\n+\t\tisp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &crop);\n \t}\n \n \tint platformConfigure(const RPi::RPiCameraConfiguration *rpiConfig) override;\n@@ -707,7 +708,7 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi\n \tSize size = unicamFormat.size.boundedToAspectRatio(maxSize);\n \tispCrop_ = size.centeredTo(Rectangle(unicamFormat.size).center());\n \n-\tplatformSetIspCrop();\n+\tplatformSetIspCrop(ispCrop_);\n \n \treturn 0;\n }\n",
    "prefixes": [
        "v2",
        "3/7"
    ]
}