Show a patch.

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

{
    "id": 21431,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/21431/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/21431/",
    "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": "<20240930141415.8857-7-naush@raspberrypi.com>",
    "date": "2024-09-30T14:14:14",
    "name": "[v2,6/7] pipeline: rpi: Pass ISP output index into platformSetIspCrop()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "9fbf745d22b344ba15962149d4393a911d6abc0b",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/21431/mbox/",
    "series": [
        {
            "id": 4639,
            "url": "https://patchwork.libcamera.org/api/1.1/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/21431/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/21431/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 1D85CC32DC\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 30 Sep 2024 14:14:14 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 770D46351F;\n\tMon, 30 Sep 2024 16:14:13 +0200 (CEST)",
            "from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com\n\t[IPv6:2a00:1450:4864:20::32d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5CE6563515\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 Sep 2024 16:14:03 +0200 (CEST)",
            "by mail-wm1-x32d.google.com with SMTP id\n\t5b1f17b1804b1-42cae563348so6164465e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 Sep 2024 07:14:03 -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.14.01\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 30 Sep 2024 07:14:02 -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=\"HqFz9LL9\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1727705642; x=1728310442;\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=Zt0s6lzWL4fOCXcqP0tX9PfDzIzeRQYXMu6WNo5LCG0=;\n\tb=HqFz9LL93oQrvaG7jPvAovf7F3C+DI5Dg1IboBKzjpXw8ztm+juOjazVMMP8H9w0JR\n\tXz9i9z4Ld5Sp+ny+sdw8DuMpJ7aIGjfK49MecsfnQXEUXIEdumE+fjC5ZnjaQeAry8er\n\tFjiT0FX7c0IcVZH6sIh4T+0TAOnaMv8YUFWblpK8T8aak7knCd+5yJw0RVcsfZMuEXfA\n\tlxp/ZVK2LfcNiCcDYKKZtAtqdRsVKHSOt0waTs2D4BsLzW2SEtRmY9UwC4e9ouGioTkV\n\tUohE7L3EaTVILieiGR8yJefxyh/zDLEaFI+fqR/Y6WnWSKHY2kuU1syDpwWapkSNkOSL\n\tOPXw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1727705642; x=1728310442;\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=Zt0s6lzWL4fOCXcqP0tX9PfDzIzeRQYXMu6WNo5LCG0=;\n\tb=AhEUqnAfWivULBVUjmHaho4F80y/ZjVvo9mHmjTIh6XobA0bir+mQeYa2uKmOz7rH4\n\tdcQD7rm6palPEjVY1QRRKl5g1cy+UnvlkBOH4Suyt0JmBOewfFt6Qjkp/GxM0l9yMyqO\n\tDwBJgxYOjGxmXKASB7do1DEZvHuIXEDbZNhnhRMteG7703GmWZlj9hTcJxrcTTaDp463\n\t4FMXs/S+bY3FrQlmouy5yFLpYENiH9UP8SIaJPxPitf1mR3N73Jio4IN2z4R34NFULdV\n\tmmsbB3dySBcc/ffTLsw3FROh/3E6VeU83gj8vlnnID2g/aeJ8tGa++ATRG9NrLUYGV58\n\ttX0A==",
        "X-Gm-Message-State": "AOJu0YzhH6JVTen7Ydpm7W7M+QiwxsbM2+ADhAZX4o5MfNIOWmT94Ipa\n\tkzLNFwTvc7L3hqrTOL7OTP/jbR3Q8/osesdfjxbnouPsPtEJEreCOQJO/gmoEFTgIaErdGezGs/\n\tA",
        "X-Google-Smtp-Source": "AGHT+IEhfQLVZFkkE4E3I1TehvT+Hw6MtoPiqs8nHDnlXHLxpu4LBa13ZULcEhuNJFG+wil6kdSnVw==",
        "X-Received": "by 2002:a05:600c:4711:b0:42c:b995:20c2 with SMTP id\n\t5b1f17b1804b1-42f5e389525mr28924775e9.3.1727705642532; \n\tMon, 30 Sep 2024 07:14:02 -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 6/7] pipeline: rpi: Pass ISP output index into\n\tplatformSetIspCrop()",
        "Date": "Mon, 30 Sep 2024 15:14:14 +0100",
        "Message-Id": "<20240930141415.8857-7-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": "At this point, the index is unused, but will be in a future commit where\nwe can set different crops on each ISP output.\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              | 4 ++--\n 3 files changed, 4 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\nindex 220c7b962280..267e6bd9cd70 100644\n--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n@@ -1321,7 +1321,7 @@ void CameraData::applyScalerCrop(const ControlList &controls)\n \n \t\tif (ispCrop != cropParams.ispCrop) {\n \t\t\tcropParams.ispCrop = ispCrop;\n-\t\t\tplatformSetIspCrop(ispCrop);\n+\t\t\tplatformSetIspCrop(cropParams.ispIndex, 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 9d23a1994f00..3c47411f745a 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(const Rectangle &ispCrop) = 0;\n+\tvirtual void platformSetIspCrop(unsigned int index, 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 cfed214ddbd4..fd8d84b14f15 100644\n--- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n+++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n@@ -109,7 +109,7 @@ public:\n \tConfig config_;\n \n private:\n-\tvoid platformSetIspCrop(const Rectangle &ispCrop) override\n+\tvoid platformSetIspCrop([[maybe_unused]] unsigned int index, const Rectangle &ispCrop) override\n \t{\n \t\tRectangle crop = ispCrop;\n \t\tisp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &crop);\n@@ -707,7 +707,7 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi\n \tSize size = unicamFormat.size.boundedToAspectRatio(maxSize);\n \tRectangle ispCrop = size.centeredTo(Rectangle(unicamFormat.size).center());\n \n-\tplatformSetIspCrop(ispCrop);\n+\tplatformSetIspCrop(0, ispCrop);\n \t/*\n \t * Set the scaler crop to the value we are using (scaled to native sensor\n \t * coordinates).\n",
    "prefixes": [
        "v2",
        "6/7"
    ]
}