Show a patch.

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

{
    "id": 17549,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/17549/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17549/",
    "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": "<20221006131744.5179-9-naush@raspberrypi.com>",
    "date": "2022-10-06T13:17:42",
    "name": "[libcamera-devel,v2,08/10] ipa: raspberrypi: Add line length to DeviceStatus",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "f0a31b7765901aace763d3720307bfd8de9565ba",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/17549/mbox/",
    "series": [
        {
            "id": 3537,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3537/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3537",
            "date": "2022-10-06T13:17:34",
            "name": "Raspberry Pi: Horizontal blanking control",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/3537/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17549/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17549/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 A8A7FBD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  6 Oct 2022 13:18:03 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 619E362D17;\n\tThu,  6 Oct 2022 15:18:03 +0200 (CEST)",
            "from mail-wr1-x431.google.com (mail-wr1-x431.google.com\n\t[IPv6:2a00:1450:4864:20::431])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7525A62D0E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  6 Oct 2022 15:18:00 +0200 (CEST)",
            "by mail-wr1-x431.google.com with SMTP id bk15so2645600wrb.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 06 Oct 2022 06:18:00 -0700 (PDT)",
            "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tq18-20020a056000137200b0022cc7c32309sm17986049wrz.115.2022.10.06.06.17.59\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 06 Oct 2022 06:17:59 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665062283;\n\tbh=xNTg8MgDbCgc7QoFbf3h9gdIw6XzNr2e/f8yNDHlKGY=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=cDedvTxq2jtnO6+49Pay0Fir1W4/W7yDVCmMBy0MgnqxhLrw/LZeUtSS2CcqNPvi0\n\tlPNQrgz2Z90Ek4ceBWC8IuiS9x6YDXKlqUAt2QPOvLGMCr8T8zHu4DzLbXn2z+g93r\n\tiVSDArY2jgjFcZouGf18u0LWFS5PchYwAbPlyY96qazIr82Xd3+SJr6vneYGODLcEo\n\tiZjjxeikkdWqzv1o043tk7YlIUeWdXvhpPYtlY5bRfi226sR7rMyfeOYBf/Y7fX/hr\n\t75J3eN4lm4d+Yya/mEbzDGnCkp1DGP0gaPeGDBfs32kioL2BxlosXYJ5sCuse9ERKV\n\tCt4UxvoUzuhuw==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\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\tbh=EYXhUS5A+XqtUQmt61JKtz8Dby+AR9H2er9xdgsAi7Y=;\n\tb=NdoEIFPyLUZXHL9ZUGBg0SLLDunCZtHB1i3C1vRGincHYKNaNTXMI2QN+eBURFiDWX\n\tVLgcXmQQsU69Vc70cdZlpMoQGK9NDSR6uNkQQbVJd79ZJa7ddX4drXFB2lKOjJ29/VYO\n\tCW2lCib7RDUDv5as/xd1oBZZYcJfTb7sejHWc2hSzvhSLjdCzZHiirGxuXjOeMtFP0qT\n\tBZIh6GWzqdut82mHj2NKco3UkHv6g+gWevjWzvMqdDU8Knw+QfddPBt+X2nauPFbX1VV\n\tkZ4Kozq7y7exM5haCu+r9LI1Chy1ox245ErK+ll4yTxPyk41GQcmsiBp3h8LIyhfxcR7\n\t2RNA=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"NdoEIFPy\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\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;\n\tbh=EYXhUS5A+XqtUQmt61JKtz8Dby+AR9H2er9xdgsAi7Y=;\n\tb=YcZwjcJsqrlUbWKDPK3eQUsMCPP+vm6X2n4L+ZqeiwKXh1eIV6QlDkRThBymsxT9O5\n\t0PlewRdG/HDKgHzFV0BCbRllnQewkNdGAXHXxfxIAKplcMhJJbW6Md/Fb5u3wA3lmoD5\n\tHTgo5hcKZQT+Q4ENrPWQ+WQeAdbwjTF9O9HEpMzHLv6gjHOE/qRoCXLexsW7lyjW58ns\n\tucOTzJyh40wlFDE6r+/vEwZWrl2Q8hu2V7Rws0dWURveinY7Ht2jSakE2ooVK7sYvG6E\n\t2xOwMfDYPOoXW6GTrtsvqKvfATf/jdZ5VqmnAxUhhKLBpEI5/y1Oyj08twtpzB0HkZM/\n\tj6fw==",
        "X-Gm-Message-State": "ACrzQf3gKcbv/GY1aN/jMrl4uuChIunuOcvsiy7izPFqH3ZT9ylpUMru\n\tcfAXf2/cSFCUp007tFK7ME8gPxL7puALyw==",
        "X-Google-Smtp-Source": "AMsMyM4qxrv9oyeyPFk05yg59KneACuA8rpS6HGZzt89m3ROiQ8EGwcx946CgZ/dpzWaua6Osyxt/Q==",
        "X-Received": "by 2002:a05:6000:10cc:b0:22e:39a:efe4 with SMTP id\n\tb12-20020a05600010cc00b0022e039aefe4mr3287997wrx.256.1665062279903; \n\tThu, 06 Oct 2022 06:17:59 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu,  6 Oct 2022 14:17:42 +0100",
        "Message-Id": "<20221006131744.5179-9-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20221006131744.5179-1-naush@raspberrypi.com>",
        "References": "<20221006131744.5179-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 08/10] ipa: raspberrypi: Add line\n\tlength to DeviceStatus",
        "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>",
        "From": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Naushir Patuck <naush@raspberrypi.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add a lineLength field to the DeviceStatus structure to store the line length\nused for a particular frame.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nTested-by: Dave Stevenson <dave.stevenson@raspberrypi.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/raspberrypi/controller/device_status.cpp | 1 +\n src/ipa/raspberrypi/controller/device_status.h   | 4 +++-\n src/ipa/raspberrypi/raspberrypi.cpp              | 2 ++\n 3 files changed, 6 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/ipa/raspberrypi/controller/device_status.cpp b/src/ipa/raspberrypi/controller/device_status.cpp\nindex 2360a77bf1ea..c907efdd7511 100644\n--- a/src/ipa/raspberrypi/controller/device_status.cpp\n+++ b/src/ipa/raspberrypi/controller/device_status.cpp\n@@ -12,6 +12,7 @@ std::ostream &operator<<(std::ostream &out, const DeviceStatus &d)\n {\n \tout << \"Exposure: \" << d.shutterSpeed\n \t    << \" Frame length: \" << d.frameLength\n+\t    << \" Line length: \" << d.lineLength\n \t    << \" Gain: \" << d.analogueGain;\n \n \tif (d.aperture)\ndiff --git a/src/ipa/raspberrypi/controller/device_status.h b/src/ipa/raspberrypi/controller/device_status.h\nindex 8f74e21b0c6e..4384c2149589 100644\n--- a/src/ipa/raspberrypi/controller/device_status.h\n+++ b/src/ipa/raspberrypi/controller/device_status.h\n@@ -19,7 +19,7 @@\n struct DeviceStatus {\n \tDeviceStatus()\n \t\t: shutterSpeed(std::chrono::seconds(0)), frameLength(0),\n-\t\t  analogueGain(0.0)\n+\t\t  lineLength(std::chrono::seconds(0)), analogueGain(0.0)\n \t{\n \t}\n \n@@ -29,6 +29,8 @@ struct DeviceStatus {\n \tlibcamera::utils::Duration shutterSpeed;\n \t/* frame length given in number of lines */\n \tuint32_t frameLength;\n+\t/* line length for the current frame */\n+\tlibcamera::utils::Duration lineLength;\n \tdouble analogueGain;\n \t/* 1.0/distance-in-metres, or 0 if unknown */\n \tstd::optional<double> lensPosition;\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex b6289f151677..c8e15f2b04d1 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -1108,7 +1108,9 @@ void IPARPi::fillDeviceStatus(const ControlList &sensorControls)\n \tint32_t exposureLines = sensorControls.get(V4L2_CID_EXPOSURE).get<int32_t>();\n \tint32_t gainCode = sensorControls.get(V4L2_CID_ANALOGUE_GAIN).get<int32_t>();\n \tint32_t vblank = sensorControls.get(V4L2_CID_VBLANK).get<int32_t>();\n+\tint32_t hblank = sensorControls.get(V4L2_CID_HBLANK).get<int32_t>();\n \n+\tdeviceStatus.lineLength = helper_->hblankToLineLength(hblank);\n \tdeviceStatus.shutterSpeed = helper_->exposure(exposureLines, mode_.minLineLength);\n \tdeviceStatus.analogueGain = helper_->gain(gainCode);\n \tdeviceStatus.frameLength = mode_.height + vblank;\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "08/10"
    ]
}