Patch Detail
Show a patch.
GET /api/patches/4052/?format=api
{ "id": 4052, "url": "https://patchwork.libcamera.org/api/patches/4052/?format=api", "web_url": "https://patchwork.libcamera.org/patch/4052/", "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": "<20200616131244.70308-9-paul.elder@ideasonboard.com>", "date": "2020-06-16T13:12:37", "name": "[libcamera-devel,08/15] v4l2: v4l2_camera: Re-validate configuration after adjusted", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "bf74858b47b09c9a559a22ec9cb635a47e854370", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/4052/mbox/", "series": [ { "id": 1006, "url": "https://patchwork.libcamera.org/api/series/1006/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1006", "date": "2020-06-16T13:12:29", "name": "Support v4l2-compliance", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1006/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/4052/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/4052/checks/", "tags": {}, "headers": { "Return-Path": "<paul.elder@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6E22361F72\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Jun 2020 15:13:15 +0200 (CEST)", "from jade.flets-east.jp (unknown\n\t[IPv6:2400:4051:61:600:2807:bdfa:f6a:8e53])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 00D4DF9;\n\tTue, 16 Jun 2020 15:13:13 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"rijpeSy5\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1592313195;\n\tbh=X6Y22/HXPaFaIt3DLstO462rDuQfw/K1Wx07VMwjTHg=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=rijpeSy5wCwSAZWsMTYkAyMu3WpA936d5sogAOyvizDxSaqkJU1BJTiLC/7WvLeoF\n\tovtYwBGTtXj5GcuRAV//GUco4YYypkvj6kb0KcZQlPNKFRo/PiocoVkHhg+IzobvoP\n\t0FEZb87aWKJE00rnPvXD01zwvazo6OEbxDv8fgDg=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 16 Jun 2020 22:12:37 +0900", "Message-Id": "<20200616131244.70308-9-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20200616131244.70308-1-paul.elder@ideasonboard.com>", "References": "<20200616131244.70308-1-paul.elder@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 08/15] v4l2: v4l2_camera: Re-validate\n\tconfiguration after adjusted", "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>", "X-List-Received-Date": "Tue, 16 Jun 2020 13:13:16 -0000" }, "content": "If the camera configuration has been adjusted, validate it again to\nensure that it's valid, before configuring the camera with it.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n src/v4l2/v4l2_camera.cpp | 13 ++++++++++---\n 1 file changed, 10 insertions(+), 3 deletions(-)", "diff": "diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp\nindex 2557320..fdbf461 100644\n--- a/src/v4l2/v4l2_camera.cpp\n+++ b/src/v4l2/v4l2_camera.cpp\n@@ -119,11 +119,18 @@ int V4L2Camera::configure(StreamConfiguration *streamConfigOut,\n \t\tLOG(V4L2Compat, Debug) << \"Configuration invalid\";\n \t\treturn -EINVAL;\n \t}\n-\tif (validation == CameraConfiguration::Adjusted)\n+\tif (validation == CameraConfiguration::Adjusted) {\n \t\tLOG(V4L2Compat, Debug) << \"Configuration adjusted\";\n+\t\tvalidation = config_->validate();\n+\t\tif (validation != CameraConfiguration::Valid) {\n+\t\t\tLOG(V4L2Compat, Error)\n+\t\t\t\t<< \"Configuration adjusted but not valid\";\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t}\n \n-\tLOG(V4L2Compat, Debug) << \"Validated configuration is: \"\n-\t\t\t << streamConfig.toString();\n+\tLOG(V4L2Compat, Debug)\n+\t\t<< \"Validated configuration is: \" << streamConfig.toString();\n \n \tint ret = camera_->configure(config_.get());\n \tif (ret < 0)\n", "prefixes": [ "libcamera-devel", "08/15" ] }