Show a patch.

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

{
    "id": 14052,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/14052/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14052/",
    "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": "<20211005085700.16708-2-david.plowman@raspberrypi.com>",
    "date": "2021-10-05T08:57:00",
    "name": "[libcamera-devel,v2,1/1] pipeline: raspberrypi: Create empty control lists correctly",
    "commit_ref": "962df634bd0afe12e6f38464f5e602cf1460c430",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "07562f3849ca6080045cd9e31ad9c62580ee4176",
    "submitter": {
        "id": 42,
        "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api",
        "name": "David Plowman",
        "email": "david.plowman@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/14052/mbox/",
    "series": [
        {
            "id": 2603,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2603/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2603",
            "date": "2021-10-05T08:56:59",
            "name": "Raspberry Pi: Create empty control lists correctly",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/2603/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/14052/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14052/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 22ED7C3243\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  5 Oct 2021 08:57:07 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E2EC9691BF;\n\tTue,  5 Oct 2021 10:57:06 +0200 (CEST)",
            "from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com\n\t[IPv6:2a00:1450:4864:20::42b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 27155691B6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  5 Oct 2021 10:57:05 +0200 (CEST)",
            "by mail-wr1-x42b.google.com with SMTP id t2so12456955wrb.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 05 Oct 2021 01:57:05 -0700 (PDT)",
            "from pi4-davidp.pitowers.org\n\t([2a00:1098:3142:14:1ce1:9965:4328:89c4])\n\tby smtp.gmail.com with ESMTPSA id\n\th18sm16508666wrs.75.2021.10.05.01.57.04\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 05 Oct 2021 01:57:04 -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=\"DU+Rur+J\"; 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:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=C6Q9gUAT8qKPbSNePbu6j+mP9BRvcQpY0uqUjKZufho=;\n\tb=DU+Rur+JNPi+aEbg/tNgrl/VtunmMfe9ucF8jpcxFE+XDkmFivaI/r7n13ZNDdV7rs\n\t3KMR7QQducKdPDz9VCNUPreu7UF49870zyM6Mg7L4OBPdED7GMx363QqooJ+oblNWY+U\n\tPUpabha06r+0wnCZvkxm6roNvs+tINQANztpLy+UzeMAgIUzDxctJxPvJciHXWsK5MaZ\n\tdtV4T9c2YKJ6pPo1AzXmg6muqgplNRUq5LuBnQHmh92ihPHPcu204Fqk9g+i0rRCCSGL\n\tlI9NozaEcP4QltAdQvAkpmQadX2e2V2UpkpP1yfCAc5ozQTB/+Do3y7Co0lxzXqQOJwP\n\tLuIA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=C6Q9gUAT8qKPbSNePbu6j+mP9BRvcQpY0uqUjKZufho=;\n\tb=D3bIRbOEmkBK4Ff/PE+JrEfABdDzIwts6G6id5slebJOJgHFBRnTTnYCG5wXHNb3DI\n\t3ANBBl8aNRJB2ewH42hGjvc86woKxDK2pkVj3W+TP0uS2SM0UYjba6xyOoo9Uf4e/ecX\n\tBLmekGZPjid0X7feTaKg4sUezVA6A40V3Xe4eftkz1Nm3mtPQTzu2hJeQ/uyeptVe3mk\n\t9f3bNxDLFj3gXLR0MmCgA2arK3pOwbZdNbgSUHW0Ugpd2LxpfVu7qAYuhG0qgxPXQQb/\n\tXgonWIQxFSPczk+DaVsfCthteyJGdsf1KwDmXoZRK/siQWq6XK6q34XB7d6ssO+4aSWG\n\ttkXw==",
        "X-Gm-Message-State": "AOAM532lOF1YE7uWZf5wEnaw4zoige+CIvySuayglipJM3OQyDX3+AAU\n\tj0q28gM3ikyf5skI0lv75hRKrR5NQsbdo3QS",
        "X-Google-Smtp-Source": "ABdhPJzjx9ffh+nJG7Vyo23heoM5jwcDYya5nqhzYthWuML2B0bYO6swl/VmhT9GZTSgh1EBBYKVhg==",
        "X-Received": "by 2002:a5d:64e5:: with SMTP id\n\tg5mr19688307wri.282.1633424224705; \n\tTue, 05 Oct 2021 01:57:04 -0700 (PDT)",
        "From": "David Plowman <david.plowman@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue,  5 Oct 2021 09:57:00 +0100",
        "Message-Id": "<20211005085700.16708-2-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20211005085700.16708-1-david.plowman@raspberrypi.com>",
        "References": "<20211005085700.16708-1-david.plowman@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 1/1] pipeline: raspberrypi: Create\n\tempty control lists correctly",
        "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 the pipeline handler start() method is supplied with a NULL list\nof controls, we send an empty control list to the IPA. When the IPA is\nrunning in isolated mode the control list goes through the data\nserializer, for which it must be marked correctly as a list of\n\"controls::controls\", otherwise the IPA process will abort.\n\nThe IPA has a similar problem returning a control list in its\nconfigure() method. We must be careful to initialise it properly even\nwhen empty.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/raspberrypi/raspberrypi.cpp                | 13 +++++++++----\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp |  3 ++-\n 2 files changed, 11 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 047123ab..fed82e22 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -389,21 +389,26 @@ int IPARPi::configure(const IPACameraSensorInfo &sensorInfo,\n \t/* Pass the camera mode to the CamHelper to setup algorithms. */\n \thelper_->SetCameraMode(mode_);\n \n+\t/*\n+\t * Initialise this ControlList correctly, even if empty, in case the IPA is\n+\t * running is isolation mode (passing the ControlList through the IPC layer).\n+\t */\n+\tControlList ctrls(sensorCtrls_);\n+\n \tif (firstStart_) {\n \t\t/* Supply initial values for frame durations. */\n \t\tapplyFrameDurations(defaultMinFrameDuration, defaultMaxFrameDuration);\n \n \t\t/* Supply initial values for gain and exposure. */\n-\t\tControlList ctrls(sensorCtrls_);\n \t\tAgcStatus agcStatus;\n \t\tagcStatus.shutter_time = defaultExposureTime;\n \t\tagcStatus.analogue_gain = defaultAnalogueGain;\n \t\tapplyAGC(&agcStatus, ctrls);\n-\n-\t\tASSERT(controls);\n-\t\t*controls = std::move(ctrls);\n \t}\n \n+\tASSERT(controls);\n+\t*controls = std::move(ctrls);\n+\n \treturn 0;\n }\n \ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 0bdfa727..1634ca98 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -825,7 +825,8 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)\n \n \t/* Start the IPA. */\n \tipa::RPi::StartConfig startConfig;\n-\tdata->ipa_->start(controls ? *controls : ControlList{}, &startConfig);\n+\tdata->ipa_->start(controls ? *controls : ControlList{ controls::controls },\n+\t\t\t  &startConfig);\n \n \t/* Apply any gain/exposure settings that the IPA may have passed back. */\n \tif (!startConfig.controls.empty())\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "1/1"
    ]
}