Patch Detail
Show a patch.
GET /api/patches/19415/?format=api
{ "id": 19415, "url": "https://patchwork.libcamera.org/api/patches/19415/?format=api", "web_url": "https://patchwork.libcamera.org/patch/19415/", "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": "<20240117144242.9903-3-laurent.pinchart@ideasonboard.com>", "date": "2024-01-17T14:42:35", "name": "[libcamera-devel,2/2] libcamera: v4l2_subdevice: Enable streams API when supported", "commit_ref": "0d99f2de13faccf199e6c9e806702cb21d0b6c24", "pull_url": null, "state": "accepted", "archived": false, "hash": "ce78b321d04f664e5614fee87ea655aa85f548e0", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/19415/mbox/", "series": [ { "id": 4144, "url": "https://patchwork.libcamera.org/api/series/4144/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4144", "date": "2024-01-17T14:42:33", "name": "libcamera: Enable V4L2 subdev streams support", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4144/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/19415/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/19415/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 3195DC323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 17 Jan 2024 14:42:47 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D837F628BA;\n\tWed, 17 Jan 2024 15:42:46 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 51258628B6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Jan 2024 15:42:42 +0100 (CET)", "from pendragon.ideasonboard.com (89-27-53-110.bb.dnainternet.fi\n\t[89.27.53.110])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6DD897EC;\n\tWed, 17 Jan 2024 15:41:32 +0100 (CET)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1705502566;\n\tbh=gx2IqGOSyxJd6ItcxIWAxzYthLERK6fhd0alJ1r0AFQ=;\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=mzV3jkm7tJpgCePh+Na81HjDAnto0lAvV6aEIuPz5pc0kadp3XXJFDljvamOAUHsd\n\ty57V2rnT/Tl/2BiB0Tz2QaavPnnne3VjsApm4y52xLaR6ZQHAORRo3IEyMnHCbFzvo\n\trCR/RaEAMad1s1vDw0q0YxAfUKtlWgdqpeo/KeMPJB/aZQA6sWUfGHckrKAdDVOmnv\n\t9+taTbbFrOedsttQ/zOfFf8F/C3Y7i7jdnoC7XfRutLmvu7Mc9ij08PwknMVXjZW5n\n\taccgfG9CVNt1o2I4n9LMNnXgqX3QtwHf7S4nuXGhgoI6+1dPhD7SZP7DJHlDwJhcYN\n\tmQIRVxsGb2KPg==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1705502492;\n\tbh=gx2IqGOSyxJd6ItcxIWAxzYthLERK6fhd0alJ1r0AFQ=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=epGf+DCWShxlOHpo4POyZP+CaIeYXVksuiuXODXr1tOjMNi2qHIUfexcXObZtwihw\n\tFvgDmZkmFkuDX490Ym99i+iiMg89Lmvy+jC82e0tJe89HigutwV/gVZAU9iUox01DW\n\trDoKibo6DYJ2DPDZnpjE80OX4kXcZLQSODgfG6NI=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"epGf+DCW\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 17 Jan 2024 16:42:35 +0200", "Message-ID": "<20240117144242.9903-3-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20240117144242.9903-1-laurent.pinchart@ideasonboard.com>", "References": "<20240117144242.9903-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 2/2] libcamera: v4l2_subdevice: Enable\n\tstreams API when supported", "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": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The streams API needs to be enabled explictly by setting a subdev client\ncapability. Do so unconditionally for subdevs that expose streams\nsupport. We don't need any kernel version check to use the\nVIDIOC_SUBDEV_S_CLIENT_CAP ioctl, as it is guaranteed to be supported by\nkernels that support streams.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/v4l2_subdevice.cpp | 15 +++++++++++++++\n 1 file changed, 15 insertions(+)", "diff": "diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\nindex 15e8206a915c..75ad11e55272 100644\n--- a/src/libcamera/v4l2_subdevice.cpp\n+++ b/src/libcamera/v4l2_subdevice.cpp\n@@ -359,6 +359,21 @@ int V4L2Subdevice::open()\n \t\treturn ret;\n \t}\n \n+\t/* If the subdev supports streams, enable the streams API. */\n+\tif (caps_.hasStreams()) {\n+\t\tstruct v4l2_subdev_client_capability clientCaps{};\n+\t\tclientCaps.capabilities = V4L2_SUBDEV_CLIENT_CAP_STREAMS;\n+\n+\t\tret = ioctl(VIDIOC_SUBDEV_S_CLIENT_CAP, &clientCaps);\n+\t\tif (ret < 0) {\n+\t\t\tret = -errno;\n+\t\t\tLOG(V4L2, Error)\n+\t\t\t\t<< \"Unable to set client capabilities: \"\n+\t\t\t\t<< strerror(-ret);\n+\t\t\treturn ret;\n+\t\t}\n+\t}\n+\n \treturn 0;\n }\n \n", "prefixes": [ "libcamera-devel", "2/2" ] }