Patch Detail
Show a patch.
GET /api/1.1/patches/17400/?format=api
{ "id": 17400, "url": "https://patchwork.libcamera.org/api/1.1/patches/17400/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17400/", "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": "<20220926095737.30506-4-naush@raspberrypi.com>", "date": "2022-09-26T09:57:33", "name": "[libcamera-devel,v3,3/7] tests: delayed_controls: Add cookie value test", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "14737abaa69b0cd62da4b9aebcc19644929c2355", "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/17400/mbox/", "series": [ { "id": 3503, "url": "https://patchwork.libcamera.org/api/1.1/series/3503/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3503", "date": "2022-09-26T09:57:30", "name": "Raspberry Pi AGC digital gain fixes", "version": 3, "mbox": "https://patchwork.libcamera.org/series/3503/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17400/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17400/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 D0D01BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 26 Sep 2022 09:58:07 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8BF2F62253;\n\tMon, 26 Sep 2022 11:58:07 +0200 (CEST)", "from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com\n\t[IPv6:2a00:1450:4864:20::32d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 839C76224C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Sep 2022 11:58:06 +0200 (CEST)", "by mail-wm1-x32d.google.com with SMTP id t4so4096237wmj.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Sep 2022 02:58:06 -0700 (PDT)", "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tp22-20020a05600c419600b003a4efb794d7sm10160671wmh.36.2022.09.26.02.57.50\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 26 Sep 2022 02:57:58 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664186287;\n\tbh=uLP2iD4+d5hVVPRB9S50teMWW/Bbnhk3D9hEpEiufrw=;\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=gZoPdW1Uj/N+lWBjZnIuadezR5Ee+mhINOpg0cEHEOZturP3jd2DktL/5VQHADniE\n\tvQvgzqbikQjsPlRCP08Hmgi87CEhcWKeSKu/exQn4Z6bvpuwgaqVdyUYSOKrFjlt7d\n\tDsBoZ34BJkbNoRI13TvRU0OR0XE7NsTr1h509aHdMFiE8TdPio8xp4WxIlLwi0xoWg\n\tHbeHcgzuMRusBJNLaUXPvOZGh6795zFC6kBQpeQsevAJwcnUQf3FXcrgWd+ZxJZUym\n\tw3NWCGUI7BA2P56PBo5nQndMA9IkTb8ru0NBproro2clcxkyxGRM2se6yfQjoENyWf\n\tV0Kxo6g2d8DEA==", "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=+T3xcs+sb+8OgweMkuTstG9ZLZCS0dNJ3UIDGexYQRk=;\n\tb=Y/1mNWKXlqbDzZ+r3C97EjXz+av7TmfW9xc7mTPLvP3CvKKbptZPIJtkN3t/78TIuo\n\tmRIW8mk+eIdHHlx9nk0H14jMYZ3WehA1dKs3bkHz3+eSxcIQapAnf/6Wci0+anmq07d5\n\thCi69CR/L9ldwMa3duEat/89gUjc3CPLLXcUKNXgoXFKop7Ys+GjqVQSNPUaW0gORJW4\n\tVRutzjr0m+Sh7wUaozXzF/Sw/Y1DpjEbfDr09coqmUKeKGdgIb+Seq5AK34+1U95EwBZ\n\tz1kgV5patB3xMW6Xj27PHJFDyu/vvU2m8cI/kFnbX87cZIe7lMt+ij3hfSkEtB+0iW4C\n\tPgYQ==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"Y/1mNWKX\"; 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=+T3xcs+sb+8OgweMkuTstG9ZLZCS0dNJ3UIDGexYQRk=;\n\tb=8CW4KgXYOKL2Adk3ZNxoA3gSn2298i8IJr+Q7e6vYPTGDE6hDyibVVAcHikpHLMJp7\n\t45jA6pWDg2lyAHf0hXPjJPMk2nll1GceBqwVsV98vS7FbacCpIbL6I077WJSW/12OT7c\n\tfEbHJUtS1MNg6lWxpZeoYaeb0fYaT/Y1yrUPStlf36AwiLToU/8J/DfgVP2/iYFRy3Vg\n\tzBd8r2u3aXSvqeRcM1U/Kh/KGz98vTUb7pWWHpQxMbVw7B0tvH4LD2by1+2VkWKVcBJR\n\t5KtXLWEkGYfOMzBmEXtGgYIppr0Tdb88z4cVt/eDKsvH/4qoPqHNyU+FwIaZcz50gCAq\n\tabEQ==", "X-Gm-Message-State": "ACrzQf25dObgqO8HACFyq0+47q7xqJwQSJYNsCPyWQKVAvWntpzn76MU\n\tDYSsfLw4X8/lex9mTvGV3uTsd49XMtvOXkt1", "X-Google-Smtp-Source": "AMsMyM6J+xTVibGdxWlfRSHWo70B/LmQpTY2zHVD5m68Wabl14HaQachvd+hHll/dUkWeY7/WR8D1A==", "X-Received": "by 2002:a05:600c:5486:b0:3b4:7e47:e19 with SMTP id\n\tiv6-20020a05600c548600b003b47e470e19mr14308168wmb.12.1664186286129; \n\tMon, 26 Sep 2022 02:58:06 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 26 Sep 2022 10:57:33 +0100", "Message-Id": "<20220926095737.30506-4-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220926095737.30506-1-naush@raspberrypi.com>", "References": "<20220926095737.30506-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3 3/7] tests: delayed_controls: Add\n\tcookie value test", "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 test for passing and returning cookie values in DelayedControls.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n---\n test/delayed_controls.cpp | 44 +++++++++++++++++++++++++++++++++++++++\n 1 file changed, 44 insertions(+)", "diff": "diff --git a/test/delayed_controls.cpp b/test/delayed_controls.cpp\nindex 322c545998b2..5cc7d3aed4fd 100644\n--- a/test/delayed_controls.cpp\n+++ b/test/delayed_controls.cpp\n@@ -267,6 +267,45 @@ protected:\n \t\treturn TestPass;\n \t}\n \n+\tint cookieValue()\n+\t{\n+\t\tstd::unordered_map<uint32_t, DelayedControls::ControlParams> delays = {\n+\t\t\t{ V4L2_CID_BRIGHTNESS, { 1, false } },\n+\t\t};\n+\t\tstd::unique_ptr<DelayedControls> delayed =\n+\t\t\tstd::make_unique<DelayedControls>(dev_.get(), delays);\n+\t\tControlList ctrls;\n+\n+\t\t/* Set a cookie to the reset value. */\n+\t\tconst unsigned int startCookie = 0x1234;\n+\t\tctrls.set(V4L2_CID_BRIGHTNESS, 1);\n+\t\tdev_->setControls(&ctrls);\n+\t\tdelayed->reset(startCookie);\n+\n+\t\t/* Trigger the first frame start event */\n+\t\tdelayed->applyControls(0);\n+\n+\t\tfor (unsigned int i = 1; i < 100; i++) {\n+\t\t\tctrls.set(V4L2_CID_BRIGHTNESS, 1);\n+\t\t\tdelayed->push(ctrls, startCookie + i);\n+\n+\t\t\tdelayed->applyControls(i);\n+\n+\t\t\tauto [result, cookie] = delayed->get(i);\n+\t\t\tunsigned int expected = startCookie + i - 1;\n+\t\t\tif (cookie != expected) {\n+\t\t\t\tcerr << \"Failed cookie value\"\n+\t\t\t\t << \" frame \" << i\n+\t\t\t\t << \" expected cookie \" << expected\n+\t\t\t\t << \" got cookie \" << cookie\n+\t\t\t\t << endl;\n+\t\t\t\treturn TestFail;\n+\t\t\t}\n+\t\t}\n+\n+\t\treturn TestPass;\n+\t}\n+\n \tint run() override\n \t{\n \t\tint ret;\n@@ -291,6 +330,11 @@ protected:\n \t\tif (ret)\n \t\t\treturn ret;\n \n+\t\t/* Test cookie values. */\n+\t\tret = cookieValue();\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\n \t\treturn TestPass;\n \t}\n \n", "prefixes": [ "libcamera-devel", "v3", "3/7" ] }