Show a patch.

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

{
    "id": 21787,
    "url": "https://patchwork.libcamera.org/api/patches/21787/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/21787/",
    "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": "<20241031094957.18471-7-naush@raspberrypi.com>",
    "date": "2024-10-31T09:49:56",
    "name": "[v4,6/7] pipeline: rpi: Pass ISP output index into platformSetIspCrop()",
    "commit_ref": "7154247b86d46bb538be8fedfd436749d72171c8",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "9fbf745d22b344ba15962149d4393a911d6abc0b",
    "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/21787/mbox/",
    "series": [
        {
            "id": 4760,
            "url": "https://patchwork.libcamera.org/api/series/4760/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4760",
            "date": "2024-10-31T09:49:50",
            "name": "Raspberry Pi: Add controls::rpi::ScalerCrops",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/4760/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/21787/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/21787/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 967ADC330D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 31 Oct 2024 09:52:57 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 79F5A653BA;\n\tThu, 31 Oct 2024 10:52:55 +0100 (CET)",
            "from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com\n\t[IPv6:2a00:1450:4864:20::32e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C19ED653B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 31 Oct 2024 10:52:46 +0100 (CET)",
            "by mail-wm1-x32e.google.com with SMTP id\n\t5b1f17b1804b1-4315b957ae8so840205e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 31 Oct 2024 02:52:46 -0700 (PDT)",
            "from naush-laptop.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4327d6983c2sm19789835e9.42.2024.10.31.02.52.45\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 31 Oct 2024 02:52:45 -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=\"SBro7SQL\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1730368366; x=1730973166;\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=KemNgYMBW8186eLynbOGC1vQGWAH0T0PqLUvHvsVvSM=;\n\tb=SBro7SQLZlnSTSI/wNKPWehrMz8MkjH3roMTcXUfOHX/4xn+T3GMek0/dzKzJBuicZ\n\tW5QjyKMpyYUZv6lK1lIK0FP6amTclI6uxzb0HzpMuAbSyZVKSqfqRu2ZYkv1ToTLnxik\n\tiTqJ2LnCdV9ULtXBHw9AE3U6bu/QjpqiLm3hbyWxm4LTL1Mf8eNZfH8bdxhDxWENXa5Z\n\t7vUCLbwatgiMplCAQtbMtk1nmAqiQlRz3KesJdeGaewkfBTcv5D73+rzVOm1H4CvqZRT\n\tJOa3NG/gxLSET74Y7v3G/YbXp1bpDGLbpK+ZU4MiWTYS52JsfuObwzAmK+H/XQ5vKWpn\n\t8ZMw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1730368366; x=1730973166;\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=KemNgYMBW8186eLynbOGC1vQGWAH0T0PqLUvHvsVvSM=;\n\tb=OzT6oSq/rPaA50x4LscwZ0jsIfnmvvm8apUrbVGr9zNnyJ1E5q4+XUdJ4/yqiLMB4z\n\t6ZB7SNwWTrrk21AGtUgO/ndAXydOreYwbPnSWBmURHmhttLZNDTFUKQJokK0/Qo4oGR4\n\tX+SWtogP4x2M2N5YHoiWKKVVDp8Zue/oFIVkkHWAKoU8JLA2RX8P8doDvvlHNkric+4i\n\t3lB6mIUUOZo3QLMj0KR5Xoc9eWvWkatCYUtI6AcU8XACiQ+FcWbd1quieBYWxUU3pL7K\n\tkqqJS7k29AgjFI3jlrwMd/yKXqYFQf4l/WWotzj/9QQTteZ2SwXo70IiHMUAkw1GzaGo\n\tdaqw==",
        "X-Gm-Message-State": "AOJu0Yxk9lXCGibzVYZjITGJwlJmVFzkR//ZsP3cJ/8+LajClwNbF0bc\n\t24Ej+/5i/8DanRdPcBul2xSUdDjhLDYnL9r7k2H2/UqlwcopoHZ6hUt6ZSyd2Bj44FF02ZGdZ0m\n\ti",
        "X-Google-Smtp-Source": "AGHT+IEzAw/J1YRG6wiA44boXhNlJSqttOw0iEQtR2qF9W2XLUsukVSZZ9XzGhDnUVhpMjcvlZtNTA==",
        "X-Received": "by 2002:a05:600c:3b9e:b0:430:52ec:1e2a with SMTP id\n\t5b1f17b1804b1-4319ad3ea5cmr72784735e9.7.1730368365924; \n\tThu, 31 Oct 2024 02:52:45 -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>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "Subject": "[PATCH v4 6/7] pipeline: rpi: Pass ISP output index into\n\tplatformSetIspCrop()",
        "Date": "Thu, 31 Oct 2024 09:49:56 +0000",
        "Message-Id": "<20241031094957.18471-7-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20241031094957.18471-1-naush@raspberrypi.com>",
        "References": "<20241031094957.18471-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>\nReviewed-by: Jacopo Mondi <jacopo.mondi@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 9912796ec472..aae0c2f35888 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": [
        "v4",
        "6/7"
    ]
}