Show a patch.

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

{
    "id": 25393,
    "url": "https://patchwork.libcamera.org/api/patches/25393/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25393/",
    "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": "<20251209180954.332392-5-isaac.scott@ideasonboard.com>",
    "date": "2025-12-09T18:09:52",
    "name": "[RFC,4/6] pipeline: rkisp1: Add YUV bypass formats to list of 'raw' formats",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "1405d81443a1fd7bdacdf27891d67797145a6554",
    "submitter": {
        "id": 215,
        "url": "https://patchwork.libcamera.org/api/people/215/?format=api",
        "name": "Isaac Scott",
        "email": "isaac.scott@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/25393/mbox/",
    "series": [
        {
            "id": 5643,
            "url": "https://patchwork.libcamera.org/api/series/5643/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5643",
            "date": "2025-12-09T18:09:48",
            "name": "rkisp1: Add support for YUV bypass",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5643/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25393/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25393/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 E447EC326B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  9 Dec 2025 18:10:12 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DF1EF61435;\n\tTue,  9 Dec 2025 19:10:11 +0100 (CET)",
            "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 243C7606D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Dec 2025 19:10:07 +0100 (CET)",
            "from isaac-ThinkPad-T16-Gen-2.infra.iob\n\t(cpc90716-aztw32-2-0-cust408.18-1.cable.virginm.net [86.26.101.153])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6DB7163B;\n\tTue,  9 Dec 2025 19:10:06 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"JuhOnRNh\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1765303806;\n\tbh=SE28YWuqt35kw8fU9oenowgvuG20yoJVM4usMRiMnrI=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=JuhOnRNhu1LwzgJB+vVCJDTcrD/h1RwN2/knk2vJRrlzIrHpoLxq4qydZ8Xxs+QUQ\n\tbn/gDKfm0gTytJblsxPS7S1xZOHmAwTIspH32Lhf4+q2w6c06T2lmyyDc3W84PDQuH\n\taVcfl4BHoCzge2ii32p2rXSIPv7HJDQAzTk3V0oI=",
        "From": "Isaac Scott <isaac.scott@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Isaac Scott <isaac.scott@ideasonboard.com>",
        "Subject": "[RFC PATCH 4/6] pipeline: rkisp1: Add YUV bypass formats to list of\n\t'raw' formats",
        "Date": "Tue,  9 Dec 2025 18:09:52 +0000",
        "Message-ID": "<20251209180954.332392-5-isaac.scott@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20251209180954.332392-1-isaac.scott@ideasonboard.com>",
        "References": "<20251209180954.332392-1-isaac.scott@ideasonboard.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": "When ISP bypass is enabled, we need to be able to match YUV formats as\nYUV and RAW bypass should be handled the same way by the pipeline\nhandler. Add them.\n\nSigned-off-by: Isaac Scott <isaac.scott@ideasonboard.com>\n---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp     | 31 ++++++++++++++++----\n src/libcamera/sensor/camera_sensor_basic.cpp |  1 +\n 2 files changed, 26 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex ad0f3af34..0c8c15ea5 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -520,7 +520,9 @@ void RkISP1CameraData::metadataReady(unsigned int frame, const ControlList &meta\n namespace {\n \n /* Keep in sync with the supported raw formats in rkisp1_path.cpp. */\n-const std::map<PixelFormat, uint32_t> rawFormats = {\n+const std::map<PixelFormat, uint32_t> bypassFormats = {\n+\t{ formats::UYVY, MEDIA_BUS_FMT_UYVY8_1X16 },\n+\t{ formats::YUYV, MEDIA_BUS_FMT_YUYV8_1X16 },\n \t{ formats::SBGGR8, MEDIA_BUS_FMT_SBGGR8_1X8 },\n \t{ formats::SGBRG8, MEDIA_BUS_FMT_SGBRG8_1X8 },\n \t{ formats::SGRBG8, MEDIA_BUS_FMT_SGRBG8_1X8 },\n@@ -755,10 +757,27 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n \n \tstd::vector<unsigned int> mbusCodes;\n \n-\tif (isRaw) {\n-\t\tmbusCodes = { rawFormats.at(config_[0].pixelFormat) };\n+\tif (isRaw)\n+\t\tmbusCodes = { bypassFormats.at(config_[0].pixelFormat) };\n+\n+\t/* Select the sensor format. */\n+\tPixelFormat bypassFormat;\n+\tSize maxSize;\n+\n+\tfor (const StreamConfiguration &cfg : config_) {\n+\t\tconst PixelFormatInfo &info = PixelFormatInfo::info(cfg.pixelFormat);\n+\t\tif (info.colourEncoding == PixelFormatInfo::ColourEncodingRAW ||\n+\t\t    info.colourEncoding == PixelFormatInfo::ColourEncodingYUV)\n+\t\t\tbypassFormat = cfg.pixelFormat;\n+\n+\t\tmaxSize = std::max(maxSize, cfg.size);\n+\t}\n+\n+\tif (bypassFormat.isValid()) {\n+\t\tLOG(RkISP1, Info) << \"Using bypass format \" << bypassFormat;\n+\t\tmbusCodes = { bypassFormats.at(bypassFormat) };\n \t} else {\n-\t\tstd::transform(rawFormats.begin(), rawFormats.end(),\n+\t\tstd::transform(bypassFormats.begin(), bypassFormats.end(),\n \t\t\t       std::back_inserter(mbusCodes),\n \t\t\t       [](const auto &value) { return value.second; });\n \t}\n@@ -919,8 +938,8 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n \n \tconst PixelFormat &streamFormat = config->at(0).pixelFormat;\n \tconst PixelFormatInfo &info = PixelFormatInfo::info(streamFormat);\n-\tisRaw_ = info.colourEncoding == PixelFormatInfo::ColourEncodingRAW;\n-\tdata->usesDewarper_ = data->canUseDewarper_ && !isRaw_;\n+\tisIspBypassed_ = info.colourEncoding == PixelFormatInfo::ColourEncodingRAW;\n+\tdata->usesDewarper_ = data->canUseDewarper_ && !isIspBypassed_;\n \n \tTransform transform = config->combinedTransform();\n \tbool transposeAfterIsp = false;\ndiff --git a/src/libcamera/sensor/camera_sensor_basic.cpp b/src/libcamera/sensor/camera_sensor_basic.cpp\nindex 57213a1ab..9531fc192 100644\n--- a/src/libcamera/sensor/camera_sensor_basic.cpp\n+++ b/src/libcamera/sensor/camera_sensor_basic.cpp\n@@ -97,6 +97,7 @@ public:\n \tint setTestPatternMode(controls::draft::TestPatternModeEnum mode) override;\n \tconst CameraSensorProperties::SensorDelays &sensorDelays() override;\n \tBayerFormat::Order bayerOrder(Transform t) const override;\n+\tOrientation mountingOrientation() const override { return mountingOrientation_; }\n \n protected:\n \tstd::string logPrefix() const override;\n",
    "prefixes": [
        "RFC",
        "4/6"
    ]
}