Show a patch.

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

{
    "id": 8613,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/8613/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/8613/",
    "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": "<20200704005227.21782-10-laurent.pinchart@ideasonboard.com>",
    "date": "2020-07-04T00:52:24",
    "name": "[libcamera-devel,v2,09/12] ipa: raspberrypi: Drop CameraHelper::GetOrientation()",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "53177d061c48cd27f6f04ac79dd5b6b8ee3ace99",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/8613/mbox/",
    "series": [
        {
            "id": 1081,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1081/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1081",
            "date": "2020-07-04T00:52:15",
            "name": "Support passing custom data to IPA configure()",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/1081/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/8613/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/8613/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 B0382C2E69\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  4 Jul 2020 00:52:44 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 79E1C60DD7;\n\tSat,  4 Jul 2020 02:52:44 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 81B2A60DD5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  4 Jul 2020 02:52:40 +0200 (CEST)",
            "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 123BB29E;\n\tSat,  4 Jul 2020 02:52:40 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"mMB/UJi3\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1593823960;\n\tbh=jY8vG4dyLHvHcEtgAxUiSJRn+TA/2dEmMNXPVbuI9lk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=mMB/UJi3EoX16I0wCqHBLo8o78GSYM802lxnHM1CH3Ho6enncOWLgnNetDyb3P19D\n\tgCmuXTTd5Q8GBJ/hGe61Ia6xf8gsAJ4f1hcLrsRlrG3/6Z+AgCO4HWfDJIf1uclqe5\n\tNwpGASCI2EtKcmEZk0ixWBtf6F06U9WL4/OXFgZ0=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sat,  4 Jul 2020 03:52:24 +0300",
        "Message-Id": "<20200704005227.21782-10-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20200704005227.21782-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20200704005227.21782-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v2 09/12] ipa: raspberrypi: Drop\n\tCameraHelper::GetOrientation()",
        "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 camera sensor orientation is now handled by the pipeline handler.\nDrop hardcoded per-sensor orientations from the IPA.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/raspberrypi/cam_helper.cpp        | 6 ------\n src/ipa/raspberrypi/cam_helper.hpp        | 7 -------\n src/ipa/raspberrypi/cam_helper_imx219.cpp | 7 -------\n src/ipa/raspberrypi/cam_helper_imx477.cpp | 7 -------\n src/ipa/raspberrypi/raspberrypi.cpp       | 6 ------\n 5 files changed, 33 deletions(-)",
    "diff": "diff --git a/src/ipa/raspberrypi/cam_helper.cpp b/src/ipa/raspberrypi/cam_helper.cpp\nindex a0c73f99390f..b1343eb2cf4e 100644\n--- a/src/ipa/raspberrypi/cam_helper.cpp\n+++ b/src/ipa/raspberrypi/cam_helper.cpp\n@@ -106,12 +106,6 @@ unsigned int CamHelper::MistrustFramesModeSwitch() const\n \treturn 0;\n }\n \n-CamTransform CamHelper::GetOrientation() const\n-{\n-\t/* Most sensors will be mounted the \"right\" way up? */\n-\treturn CamTransform_IDENTITY;\n-}\n-\n RegisterCamHelper::RegisterCamHelper(char const *cam_name,\n \t\t\t\t     CamHelperCreateFunc create_func)\n {\ndiff --git a/src/ipa/raspberrypi/cam_helper.hpp b/src/ipa/raspberrypi/cam_helper.hpp\nindex 6877f4735031..97ce3e92ac2f 100644\n--- a/src/ipa/raspberrypi/cam_helper.hpp\n+++ b/src/ipa/raspberrypi/cam_helper.hpp\n@@ -58,12 +58,6 @@ namespace RPi {\n //    (other than start-up), for which control algorithms should not run\n //    (for example, metadata may be unreliable).\n \n-// Bitfield to represent the default orientation of the camera.\n-typedef int CamTransform;\n-static constexpr CamTransform CamTransform_IDENTITY = 0;\n-static constexpr CamTransform CamTransform_HFLIP    = 1;\n-static constexpr CamTransform CamTransform_VFLIP    = 2;\n-\n class CamHelper\n {\n public:\n@@ -82,7 +76,6 @@ public:\n \tvirtual unsigned int HideFramesModeSwitch() const;\n \tvirtual unsigned int MistrustFramesStartup() const;\n \tvirtual unsigned int MistrustFramesModeSwitch() const;\n-\tvirtual CamTransform GetOrientation() const;\n protected:\n \tMdParser *parser_;\n \tCameraMode mode_;\ndiff --git a/src/ipa/raspberrypi/cam_helper_imx219.cpp b/src/ipa/raspberrypi/cam_helper_imx219.cpp\nindex 35c6597c2016..1b9ce382f330 100644\n--- a/src/ipa/raspberrypi/cam_helper_imx219.cpp\n+++ b/src/ipa/raspberrypi/cam_helper_imx219.cpp\n@@ -49,7 +49,6 @@ public:\n \tdouble Gain(uint32_t gain_code) const override;\n \tunsigned int MistrustFramesModeSwitch() const override;\n \tbool SensorEmbeddedDataPresent() const override;\n-\tCamTransform GetOrientation() const override;\n };\n \n CamHelperImx219::CamHelperImx219()\n@@ -86,12 +85,6 @@ bool CamHelperImx219::SensorEmbeddedDataPresent() const\n \treturn ENABLE_EMBEDDED_DATA;\n }\n \n-CamTransform CamHelperImx219::GetOrientation() const\n-{\n-\t/* Camera is \"upside down\" on this board. */\n-\treturn CamTransform_HFLIP | CamTransform_VFLIP;\n-}\n-\n static CamHelper *Create()\n {\n \treturn new CamHelperImx219();\ndiff --git a/src/ipa/raspberrypi/cam_helper_imx477.cpp b/src/ipa/raspberrypi/cam_helper_imx477.cpp\nindex 695444567bb2..a53b47c013cb 100644\n--- a/src/ipa/raspberrypi/cam_helper_imx477.cpp\n+++ b/src/ipa/raspberrypi/cam_helper_imx477.cpp\n@@ -38,7 +38,6 @@ public:\n \tuint32_t GainCode(double gain) const override;\n \tdouble Gain(uint32_t gain_code) const override;\n \tbool SensorEmbeddedDataPresent() const override;\n-\tCamTransform GetOrientation() const override;\n };\n \n CamHelperImx477::CamHelperImx477()\n@@ -61,12 +60,6 @@ bool CamHelperImx477::SensorEmbeddedDataPresent() const\n \treturn true;\n }\n \n-CamTransform CamHelperImx477::GetOrientation() const\n-{\n-\t/* Camera is \"upside down\" on this board. */\n-\treturn CamTransform_HFLIP | CamTransform_VFLIP;\n-}\n-\n static CamHelper *Create()\n {\n \treturn new CamHelperImx477();\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 860be22ddb5d..b40ca9e44776 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -215,7 +215,6 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n \t\tint gainDelay, exposureDelay, sensorMetadata;\n \t\thelper_->GetDelays(exposureDelay, gainDelay);\n \t\tsensorMetadata = helper_->SensorEmbeddedDataPresent();\n-\t\tRPi::CamTransform orientation = helper_->GetOrientation();\n \n \t\tIPAOperationData op;\n \t\top.operation = RPI_IPA_ACTION_SET_SENSOR_CONFIG;\n@@ -223,11 +222,6 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n \t\top.data.push_back(exposureDelay);\n \t\top.data.push_back(sensorMetadata);\n \n-\t\tControlList ctrls(unicam_ctrls_);\n-\t\tctrls.set(V4L2_CID_HFLIP, (int32_t) !!(orientation & RPi::CamTransform_HFLIP));\n-\t\tctrls.set(V4L2_CID_VFLIP, (int32_t) !!(orientation & RPi::CamTransform_VFLIP));\n-\t\top.controls.push_back(ctrls);\n-\n \t\tqueueFrameAction.emit(0, op);\n \t}\n \n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "09/12"
    ]
}