Show a patch.

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

{
    "id": 10763,
    "url": "https://patchwork.libcamera.org/api/patches/10763/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/10763/",
    "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": "<20201228165600.53987-4-jacopo@jmondi.org>",
    "date": "2020-12-28T16:55:58",
    "name": "[libcamera-devel,v2,3/5] libcamera: camera_sensor: Rename controls() method",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "f283bcdcde9b097c79b9d1c28bd43cdd6b7c0a92",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": {
        "id": 15,
        "url": "https://patchwork.libcamera.org/api/users/15/?format=api",
        "username": "jmondi",
        "first_name": "Jacopo",
        "last_name": "Mondi",
        "email": "jacopo@jmondi.org"
    },
    "mbox": "https://patchwork.libcamera.org/patch/10763/mbox/",
    "series": [
        {
            "id": 1558,
            "url": "https://patchwork.libcamera.org/api/series/1558/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1558",
            "date": "2020-12-28T16:55:55",
            "name": "libcamera: Calculate expoure time limits",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/1558/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/10763/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/10763/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 46CF6C0F1A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Dec 2020 16:55:55 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 21BDF615D5;\n\tMon, 28 Dec 2020 17:55:55 +0100 (CET)",
            "from relay11.mail.gandi.net (relay11.mail.gandi.net\n\t[217.70.178.231])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6794360111\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Dec 2020 17:55:51 +0100 (CET)",
            "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay11.mail.gandi.net (Postfix) with ESMTPSA id F1C3F100008;\n\tMon, 28 Dec 2020 16:55:50 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 28 Dec 2020 17:55:58 +0100",
        "Message-Id": "<20201228165600.53987-4-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.29.2",
        "In-Reply-To": "<20201228165600.53987-1-jacopo@jmondi.org>",
        "References": "<20201228165600.53987-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v2 3/5] libcamera: camera_sensor: Rename\n\tcontrols() method",
        "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 CameraSensor::controls() methods returns the information relative to\nthe V4L2 controls registered by the sensor sub-device driver. Its\ncurrent use is to inform the IPA module of two pipelines (RkISP1 and\nVIMC) about the V4L2 controls limits.\n\nThe CameraSensor class has a controls_ field, which is instead the\nControlInfoMap of libcamera controls registered by the CameraSensor\nclass and meant to be exported as Camera controls.\n\nTo prepare to register libcamera controls in the CameraSensor::controls_\ninfo map, and remove any ambiguity on the intended usage of\nCameraSensor::controls(), rename the method in\nCameraSensor::subdevControls() and update its users in the code base.\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n include/libcamera/internal/camera_sensor.h | 2 +-\n src/libcamera/camera_sensor.cpp            | 6 +++---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp   | 2 +-\n src/libcamera/pipeline/vimc/vimc.cpp       | 4 ++--\n 4 files changed, 7 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\nindex 0357b2a630f7..841c7f4bef0f 100644\n--- a/include/libcamera/internal/camera_sensor.h\n+++ b/include/libcamera/internal/camera_sensor.h\n@@ -57,7 +57,7 @@ public:\n \t\t\t\t      const Size &size) const;\n \tint setFormat(V4L2SubdeviceFormat *format);\n \n-\tconst ControlInfoMap &controls() const;\n+\tconst ControlInfoMap &subdevControls() const;\n \tControlList getControls(const std::vector<uint32_t> &ids);\n \tint setControls(ControlList *ctrls);\n \ndiff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex 18dc6d723e27..337d73c524bf 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -617,10 +617,10 @@ int CameraSensor::setFormat(V4L2SubdeviceFormat *format)\n }\n \n /**\n- * \\brief Retrieve the supported V4L2 controls and their information\n- * \\return A map of the V4L2 controls supported by the sensor\n+ * \\brief Retrieve the controls supported by the V4L2 subdev and their information\n+ * \\return A map of the V4L2 controls supported by the video subdevice\n  */\n-const ControlInfoMap &CameraSensor::controls() const\n+const ControlInfoMap &CameraSensor::subdevControls() const\n {\n \treturn subdev_->controls();\n }\ndiff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 5ce37febc1d7..628d1f39bfbd 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -906,7 +906,7 @@ int PipelineHandlerRkISP1::start(Camera *camera, [[maybe_unused]] ControlList *c\n \t}\n \n \tstd::map<unsigned int, const ControlInfoMap &> entityControls;\n-\tentityControls.emplace(0, data->sensor_->controls());\n+\tentityControls.emplace(0, data->sensor_->subdevControls());\n \n \tIPAOperationData ipaConfig;\n \tdata->ipa_->configure(sensorInfo, streamConfig, entityControls,\ndiff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\nindex 36325ffbbd7d..d5f6e8a453ff 100644\n--- a/src/libcamera/pipeline/vimc/vimc.cpp\n+++ b/src/libcamera/pipeline/vimc/vimc.cpp\n@@ -338,7 +338,7 @@ void PipelineHandlerVimc::stop(Camera *camera)\n \n int PipelineHandlerVimc::processControls(VimcCameraData *data, Request *request)\n {\n-\tControlList controls(data->sensor_->controls());\n+\tControlList controls(data->sensor_->subdevControls());\n \n \tfor (auto it : request->controls()) {\n \t\tunsigned int id = it.first;\n@@ -480,7 +480,7 @@ int VimcCameraData::init()\n \t\treturn -ENODEV;\n \n \t/* Initialise the supported controls. */\n-\tconst ControlInfoMap &controls = sensor_->controls();\n+\tconst ControlInfoMap &controls = sensor_->subdevControls();\n \tControlInfoMap::Map ctrls;\n \n \tfor (const auto &ctrl : controls) {\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "3/5"
    ]
}