Show a patch.

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

{
    "id": 8902,
    "url": "https://patchwork.libcamera.org/api/patches/8902/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/8902/",
    "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": "<20200721092306.823447-1-naush@raspberrypi.com>",
    "date": "2020-07-21T09:23:06",
    "name": "[libcamera-devel] pipeline: raspberrypi: Set sensor default orientation before configure()",
    "commit_ref": "1e8c91b65695449c5246d17ba7dc439c8058b781",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "da0d02e2532a0085af910034a47dfa0d28aeab32",
    "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/8902/mbox/",
    "series": [
        {
            "id": 1121,
            "url": "https://patchwork.libcamera.org/api/series/1121/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1121",
            "date": "2020-07-21T09:23:06",
            "name": "[libcamera-devel] pipeline: raspberrypi: Set sensor default orientation before configure()",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1121/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/8902/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/8902/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 693EBC0109\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Jul 2020 09:23:15 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F381B60554;\n\tTue, 21 Jul 2020 11:23:14 +0200 (CEST)",
            "from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com\n\t[IPv6:2a00:1450:4864:20::42a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 00C2F60554\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Jul 2020 11:23:13 +0200 (CEST)",
            "by mail-wr1-x42a.google.com with SMTP id y3so3111754wrl.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Jul 2020 02:23:13 -0700 (PDT)",
            "from naushir-VirtualBox.patuck.local ([88.97.76.4])\n\tby smtp.gmail.com with ESMTPSA id\n\td10sm36178845wrx.66.2020.07.21.02.23.12\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 21 Jul 2020 02:23:12 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"SuVMnVwK\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=p2wlddraVn76v/Wg72ysvhuN3i4GO4rEQJQDS25MEqw=;\n\tb=SuVMnVwKRAFH0sFoVAapNQ+yvZgEfjHzWo7izkMMT1/zBQGMNdhgMRp5a2ly6pKxqO\n\twekA8/DrQFix5NxZjj5ht3VxKcbJxowLPOGYDkJ1TKreQc6gBV7OCYy1n3SZJZpIxTb6\n\taa+nnigYeikPfdS8VTn1FoUWNbCO9CIdozwWeTKHEk5CRteSP3kmHvJcZl27HB1m7ibw\n\tBqpJY1aupBQLEOSo8PRTMAPL8nNaGPV57vQzsGK1fXktiP7is+R1sSMOI/O8V+MPFmzD\n\tH1f/ja2279P81kF/4YsfWYgnZkmyFC1faP0WhZ9dBIFepPkP1Yvwcekm14PoQ4x1ZS8e\n\tswrA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=p2wlddraVn76v/Wg72ysvhuN3i4GO4rEQJQDS25MEqw=;\n\tb=SWx3M3d5Dd+ziFk08MZAeLncOdqDx2YS0TI0UZyi6+GMHhWV68oBkZnSJYyZkYU7Mq\n\tuwRn75Ubzl9Y5fiaVNRNeEUesEtom4njI2UAibRjQQR2VRD0rG8uX2k5sMh8F0Cc8hMX\n\tuYmcxpov6tVQ3Z4Z+r4e4DDdQR1e96LDjJFoh6BjqFjmyaEnULy6lb3ZoHrmi/45N39W\n\tfPD6jFH16mboCsulNsWfiQ4IWT64wuv3WnvMCnHlrxlP9pJchzI7G8b4eFvCicxdf2Ow\n\tGWiSfUwSxEDjg1QVOczuKR2iM7JqaFKlhYbn2YpG6TFBXRQp5TnexuLigjwJViULtgPs\n\tKxUw==",
        "X-Gm-Message-State": "AOAM531Og6V7mcdUYkUMU9n9eBLvo987N59JDSwOP/nywqmUyDlfedHM\n\tvlR9XE7plw77TAcVFrNkGvRZe8cfQl5rfg==",
        "X-Google-Smtp-Source": "ABdhPJwZfue/Zfyq74KLMFIJ7WnfBye31Ib4CaZMd2vfQzCMTsOArqhvZnh1JlJWKZ+wLDvttPATbQ==",
        "X-Received": "by 2002:adf:f8cb:: with SMTP id\n\tf11mr27351138wrq.358.1595323393340; \n\tTue, 21 Jul 2020 02:23:13 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 21 Jul 2020 10:23:06 +0100",
        "Message-Id": "<20200721092306.823447-1-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH] pipeline: raspberrypi: Set sensor default\n\torientation before configure()",
        "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 default sensor orientation must be set early on in match() to ensure\ngenerateConfiguration() and configure() return out the correct Bayer\nordering to the application. This is particularly important for RAW\ncapture streams.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex bf1c7714..e9084afd 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -962,6 +962,13 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n \t/* Initialize the camera properties. */\n \tdata->properties_ = data->sensor_->properties();\n \n+\t/* Configure the H/V flip controls based on the sensor rotation. */\n+\tControlList ctrls(data->unicam_[Unicam::Image].dev()->controls());\n+\tint32_t rotation = data->properties_.get(properties::Rotation);\n+\tctrls.set(V4L2_CID_HFLIP, static_cast<int32_t>(!!rotation));\n+\tctrls.set(V4L2_CID_VFLIP, static_cast<int32_t>(!!rotation));\n+\tdata->unicam_[Unicam::Image].dev()->setControls(&ctrls);\n+\n \t/*\n \t * List the available output streams.\n \t * Currently cannot do Unicam streams!\n@@ -1165,13 +1172,6 @@ int RPiCameraData::configureIPA()\n \t\t\t\t\t      { V4L2_CID_EXPOSURE, result.data[1] } });\n \t\t\tsensorMetadata_ = result.data[2];\n \t\t}\n-\n-\t\t/* Configure the H/V flip controls based on the sensor rotation. */\n-\t\tControlList ctrls(unicam_[Unicam::Image].dev()->controls());\n-\t\tint32_t rotation = sensor_->properties().get(properties::Rotation);\n-\t\tctrls.set(V4L2_CID_HFLIP, static_cast<int32_t>(!!rotation));\n-\t\tctrls.set(V4L2_CID_VFLIP, static_cast<int32_t>(!!rotation));\n-\t\tunicam_[Unicam::Image].dev()->setControls(&ctrls);\n \t}\n \n \tif (result.operation & RPI_IPA_CONFIG_SENSOR) {\n",
    "prefixes": [
        "libcamera-devel"
    ]
}