Patch Detail
Show a patch.
GET /api/1.1/patches/12396/?format=api
{ "id": 12396, "url": "https://patchwork.libcamera.org/api/1.1/patches/12396/?format=api", "web_url": "https://patchwork.libcamera.org/patch/12396/", "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": "<20210525053341.2574042-1-hiroh@chromium.org>", "date": "2021-05-25T05:33:41", "name": "[libcamera-devel] libcamera: V4L2Device: Fix a type mismatch of ControlValue", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "b4ff4a43f8f16469812ef0f04857f15d851d21a4", "submitter": { "id": 63, "url": "https://patchwork.libcamera.org/api/1.1/people/63/?format=api", "name": "Hirokazu Honda", "email": "hiroh@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/12396/mbox/", "series": [ { "id": 2058, "url": "https://patchwork.libcamera.org/api/1.1/series/2058/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2058", "date": "2021-05-25T05:33:41", "name": "[libcamera-devel] libcamera: V4L2Device: Fix a type mismatch of ControlValue", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2058/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/12396/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/12396/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 E65E7C3201\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 May 2021 05:33:51 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A763F6891F;\n\tTue, 25 May 2021 07:33:51 +0200 (CEST)", "from mail-pf1-x431.google.com (mail-pf1-x431.google.com\n\t[IPv6:2607:f8b0:4864:20::431])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2A72E602AC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 May 2021 07:33:50 +0200 (CEST)", "by mail-pf1-x431.google.com with SMTP id q67so5656865pfb.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 May 2021 22:33:50 -0700 (PDT)", "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:2:e5df:4bf4:810e:3bcb])\n\tby smtp.gmail.com with ESMTPSA id\n\tn6sm13279787pgm.79.2021.05.24.22.33.47\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 24 May 2021 22:33:48 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"lecC0HPS\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; h=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=zljd0JWTx6abxqSNQZ8auUlpjwYe65uXX31AdgmU3Xk=;\n\tb=lecC0HPSe+mwiApOlWe1PVi1V8+XDtHr+7Z1hf+/IFTxG9iTq4Sr33PdFCxfATbREe\n\tYwMQpziUWP+S1xxiUex1lZiYPiPYy1lDWPi8qdY8myuW9CSCYhDJdvlAwbMBKDpMPwMJ\n\toa7rAf6TR0qO4q+OQXO9oMdsEDze8CA4Ymdfg=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=zljd0JWTx6abxqSNQZ8auUlpjwYe65uXX31AdgmU3Xk=;\n\tb=VM1r7OjeT9eTzkHTgr90p/uDdpLT7UdcmxNzYbvYS8DtJd1azaaPDKHGbB/ET6lm5U\n\tFx0IXJpq3a3X2Ob/ukc9hq+D3NoNdxZ6nt2o6Cr4l3WIqXY1Xug6T1Mfo6ib4gvsieGr\n\t/RCYoVenT9GjyHnArcDq5YxenJEDiELvoDH9fM6+E/XBGEeV6VBWTt2PCmzjyOfWPmeA\n\td75lLw07TXyXnY6sCj7U07Eacmng+GTwx0pzN8ZueDWAaf4Zgq/R02RFaNUsuflaaKjR\n\tieLKYx8cp292IL30+YA8mxz2WeTHP7qSk7RAIEgdt9sNOWRWZVBlRIVB3yxPWtxJ865T\n\tTG0A==", "X-Gm-Message-State": "AOAM531+sAIc6J68gaucWBR8xw8qyzW0qiWbyAW1l98Pf6romBwn0oBd\n\tj85IhvN0P7miwAeMtgcgFMplz87LJtwrqw==", "X-Google-Smtp-Source": "ABdhPJwtQmuf5l2vpqa1RaEHoay2d8XI7x+ZMbO7COvRrVcnWhmZ+/AhfivfWfkMTCU3ZM3ZYiOF3w==", "X-Received": "by 2002:a63:5511:: with SMTP id\n\tj17mr17621302pgb.191.1621920828533; \n\tMon, 24 May 2021 22:33:48 -0700 (PDT)", "From": "Hirokazu Honda <hiroh@chromium.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 25 May 2021 14:33:41 +0900", "Message-Id": "<20210525053341.2574042-1-hiroh@chromium.org>", "X-Mailer": "git-send-email 2.31.1.818.g46aad6cb9e-goog", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] libcamera: V4L2Device: Fix a type\n\tmismatch of ControlValue", "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": "The commit (34bee5e8) of removing the controls order assumption\ndoesn't change the update ControlValue type in\nV4L2Device::updateControls(). However, this is wrong because the\nControlValue is set to a placeholder ControlValue in\nV4L2Device::getControls(), so the type is ControlTypeNone.\nWe should rather look up the type in V4L2Device::controls_ with a\nspecified id.\n\nFixes: 34bee5e8 (libcamera: V4L2Device: Remove the controls order assumption in updateControls())\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/libcamera/v4l2_device.cpp | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex 7f7e5b8f..cc4f52bf 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -621,7 +621,11 @@ void V4L2Device::updateControls(ControlList *ctrls,\n \t\tconst unsigned int id = v4l2Ctrl.id;\n \n \t\tControlValue value = ctrls->get(id);\n-\t\tswitch (value.type()) {\n+\n+\t\tauto iter = controls_.find(id);\n+\t\tASSERT(iter != controls_.end());\n+\t\tconst ControlType type = iter->first->type();\n+\t\tswitch (type) {\n \t\tcase ControlTypeInteger64:\n \t\t\tvalue.set<int64_t>(v4l2Ctrl.value64);\n \t\t\tbreak;\n", "prefixes": [ "libcamera-devel" ] }