From patchwork Tue Oct 27 21:24:43 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 28648 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 5DC01C324C for ; Tue, 27 Oct 2026 21:24:53 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7D28969056; Tue, 27 Oct 2026 22:24:51 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="fujJ7SxS"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7A95068F10 for ; Tue, 27 Oct 2026 22:24:49 +0100 (CET) Received: from killaraus.ideasonboard.com (2001-14ba-70f3-e800--a06.rev.dnainternet.fi [IPv6:2001:14ba:70f3:e800::a06]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0150E4BB for ; Tue, 27 Oct 2026 22:22:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1793136157; bh=IyDn3h635FaDSdbNyx0Iwdhb0VCmEZkc3FGF7YLCPsg=; h=From:To:Subject:Date:From; b=fujJ7SxSaud7Kwvi+0ZRAJxmedGXupnkS99EcgOZllbApyuUJ5cUTWbBJ66uUWTfS v/S0iyskB5hBdQ1gDceS97DwH0NpBycSIEPp4s8skNx5WPVtsfsHbzB6qeadYqggee 0MjLpTfBabAFemcCHLnLl1rIOJNGYDCMMeI0RLYM= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 0/4] v4l2: Fix v4l2-compliance errors Date: Tue, 27 Oct 2026 23:24:43 +0200 Message-ID: <20261027212447.2551591-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.55.0 MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello, This short series fixes v4l2-compliance errors that get triggered by libcamera returning buffers in the FrameMetadata::FrameError state. This is an untested code path in CI, hence the previously unnoticed errors. My UVC webcam marks the first buffer as erroneous, which allowed me to easily reproduce and fix the problems. It would be useful to add error injection in the virtual pipeline handler to test this in CI. Patches 1/4 and 2/4 fix two v4l2-compliance errors. Patch 3/4 and 4/4 fix additional errors I noticed during testing, not caught by v4l2-compliance. There are other issues reported by v4l2-compliance that I believe are bugs in v4l2-compliance. I have sent an RFC patch ([1]) to relax some of the checks. Based on the feedback, additional changes in v4l2-compat may still be required, but that shouldn't invalidate the patches in this series. [1] https://lore.kernel.org/linux-media/20261027191929.2528156-1-laurent.pinchart@ideasonboard.com/ Laurent Pinchart (4): v4l2: v4l2_camera_proxy: Clear PREPARED flag when queuing buffer v4l2: v4l2_camera_proxy: Set buffer field unconditionally v4l2: v4l2_camera_proxy: Clear ERROR flag when dequeuing or stopping streaming v4l2: v4l2_camera_proxy: Set DONE flag on error buffers src/v4l2/v4l2_camera_proxy.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) base-commit: efb7bed9b23568c9ff047b497a8b6e92e72d40e8 Tested-by: Jacopo Mondi