Patch Detail
Show a patch.
GET /api/1.1/patches/16688/?format=api
{ "id": 16688, "url": "https://patchwork.libcamera.org/api/1.1/patches/16688/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16688/", "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": "<20220719121003.1829916-2-paul.elder@ideasonboard.com>", "date": "2022-07-19T12:10:02", "name": "[libcamera-devel,RFC,1/2] libcamera: v4l2_videodevice: Get formats even if no framesizes", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "8b06cda346dd86149ba8a1b34099cad81d4e58a9", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/1.1/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16688/mbox/", "series": [ { "id": 3300, "url": "https://patchwork.libcamera.org/api/1.1/series/3300/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3300", "date": "2022-07-19T12:10:01", "name": "rkisp1: Get supported formats from driver", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3300/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16688/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16688/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 BF615BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 19 Jul 2022 12:10:19 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 80BD763316;\n\tTue, 19 Jul 2022 14:10:19 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E4A686048A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Jul 2022 14:10:17 +0200 (CEST)", "from pyrite.rasen.tech (softbank036240121080.bbtec.net\n\t[36.240.121.80])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8A1C36EE;\n\tTue, 19 Jul 2022 14:10:16 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658232619;\n\tbh=vvfiO3dVc7gDxmenoyNqR0bmxkV4ZkX00sO8C3kTbeA=;\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=sPYeQZziu/yreZXRjVs8lwRvoZ6Sd6uCynmIXHDAlEJ0nSHN9rgLrfYtsSlvhfqUI\n\t3beuOkHpe2fqa5fFh7L5fGRnTM/aqufoY1Kua/dT+KuYcV6/KlqAjq3dsjEn5PMovy\n\t+amxr2rKWJub/Y7dyHex6B8rs2lAL5rKbcYpqcjFF01BhcFK6zpb51/PuO6CtswWMb\n\tommtrQiWQYpbkEowNTcHI6f5KV9GkQYBQaQ1dIj5BmHV/91RXscS4cyZ9LfeJZZajc\n\tQ76SRx41OqhJ/xbhgjSHnsDZT+mz08WcD8GXHaoUSsSCGvFNVO7Js3JH4qNV9Vv7E3\n\tJK4tGP5TOaznA==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1658232617;\n\tbh=vvfiO3dVc7gDxmenoyNqR0bmxkV4ZkX00sO8C3kTbeA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=RbTyibzRqmbyXysMO1R+I9TY90safXz/uBCGcdKnlhnf1K1ZaNPt7h288pYPaquUs\n\tE2fkrFLwTbxrArWDvTbd9q9CWU67WSfxvJ3rKPxPUkgXEDK/Zw6PnCvDxdujxxbv4I\n\tap/2SZd3A9yWVqCY4Z8NxLkt4OhOODem5QPcTvG0=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"RbTyibzR\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 19 Jul 2022 21:10:02 +0900", "Message-Id": "<20220719121003.1829916-2-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.30.2", "In-Reply-To": "<20220719121003.1829916-1-paul.elder@ideasonboard.com>", "References": "<20220719121003.1829916-1-paul.elder@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC PATCH 1/2] libcamera: v4l2_videodevice: Get\n\tformats even if no framesizes", "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": "Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>", "Reply-To": "Paul Elder <paul.elder@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "V4L2VideoDevice::formats() returns an empty list of formats if enumSizes\nfails, including if the driver doesn't implement ENUM_FRAMESIZES.\n\nAdd an optional ignoreSizes parameter to formats() so that it can still\nbe used when the pipeline handler knows that its driver doesn't\nimplement ENUM_FRAMESIZES.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n include/libcamera/internal/v4l2_videodevice.h | 2 +-\n src/libcamera/v4l2_videodevice.cpp | 12 ++++++++----\n 2 files changed, 9 insertions(+), 5 deletions(-)", "diff": "diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h\nindex 8525acbc..6cc9be85 100644\n--- a/include/libcamera/internal/v4l2_videodevice.h\n+++ b/include/libcamera/internal/v4l2_videodevice.h\n@@ -205,7 +205,7 @@ public:\n \tint getFormat(V4L2DeviceFormat *format);\n \tint tryFormat(V4L2DeviceFormat *format);\n \tint setFormat(V4L2DeviceFormat *format);\n-\tFormats formats(uint32_t code = 0);\n+\tFormats formats(uint32_t code = 0, bool ignoreSizes = false);\n \n \tint setSelection(unsigned int target, Rectangle *rect);\n \ndiff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex 63911339..b8bd4bc4 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -1045,14 +1045,18 @@ int V4L2VideoDevice::trySetFormatSingleplane(V4L2DeviceFormat *format, bool set)\n *\n * \\return A list of the supported video device formats\n */\n-V4L2VideoDevice::Formats V4L2VideoDevice::formats(uint32_t code)\n+V4L2VideoDevice::Formats V4L2VideoDevice::formats(uint32_t code, bool ignoreSizes)\n {\n \tFormats formats;\n \n \tfor (V4L2PixelFormat pixelFormat : enumPixelformats(code)) {\n-\t\tstd::vector<SizeRange> sizes = enumSizes(pixelFormat);\n-\t\tif (sizes.empty())\n-\t\t\treturn {};\n+\t\tstd::vector<SizeRange> sizes;\n+\n+\t\tif (!ignoreSizes) {\n+\t\t\tsizes = enumSizes(pixelFormat);\n+\t\t\tif (sizes.empty())\n+\t\t\t\treturn {};\n+\t\t}\n \n \t\tif (formats.find(pixelFormat) != formats.end()) {\n \t\t\tLOG(V4L2, Error)\n", "prefixes": [ "libcamera-devel", "RFC", "1/2" ] }