{"id":17527,"url":"https://patchwork.libcamera.org/api/1.1/patches/17527/?format=json","web_url":"https://patchwork.libcamera.org/patch/17527/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20221004222903.6393-5-laurent.pinchart@ideasonboard.com>","date":"2022-10-04T22:29:03","name":"[libcamera-devel,v2,4/4] libcamera: v4l2_videodevice: Warn if bytesused == 0 when queuing output buffer","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"4ad5621149ba0bfcba04ec51d7c1dec813bde1f5","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/17527/mbox/","series":[{"id":3531,"url":"https://patchwork.libcamera.org/api/1.1/series/3531/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3531","date":"2022-10-04T22:28:59","name":"libcamera: Fix kernel deprecation warning with output buffers","version":2,"mbox":"https://patchwork.libcamera.org/series/3531/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17527/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17527/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 4B1B7BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  4 Oct 2022 22:29:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E77D460AD5;\n\tWed,  5 Oct 2022 00:29:15 +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 AC5B960AC6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  5 Oct 2022 00:29:13 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2755AFA0;\n\tWed,  5 Oct 2022 00:29:13 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664922555;\n\tbh=vWH2LUYILonTvkpw4vveH6IDgHoiXjjT/zYq6vV3Q94=;\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=Vw0wIvkZg6svyzRFz5VrV8Ves0MTxy4aa9D4a+A/Y0GvVTM4tYiG3iA2XbXGh4A26\n\tN9/fj5p7HsQW9AfVKg/v39FQy7xknuENRR99IxnXKhd6DUTKIdBCSGa5SLhyxDaT+8\n\tH3/pNFoBDAJnwDuWS64S8lqrNMwGHuFEMasXRoRSSgK/e68fx0n7l2J1Ijw7uMYIBb\n\tVwl9AhLtRN95xURzUUWXWy+UQVdcuPCx1nAJTP+KPJ2GkxbQd7BXxCVCM+ZqfBUGCK\n\tSlX+0/7W+Pp/FuePUH/Co97mNcRfSlRcOlaRpVD45bjZmOZjmj77P6LKyLinQBBl6m\n\tmvUnaT4ZoQ3lg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1664922553;\n\tbh=vWH2LUYILonTvkpw4vveH6IDgHoiXjjT/zYq6vV3Q94=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=kBFiX4V71tk4LyFntzrK9fdPHbTx4lNHQ5ZaG++rnQzIpgKxKCROPM802BsgnQjhv\n\tWpSoPjZxoVihnymmx4KmBtSKfN+qmI7v4tw7JNeoDPDwHgoJ1qrbYzD0uTmXZIx3jU\n\tfcyQnI7wyHRysnOLMz3Wzsxw1FbVLZyboTmCvpZk="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"kBFiX4V7\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Wed,  5 Oct 2022 01:29:03 +0300","Message-Id":"<20221004222903.6393-5-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.35.1","In-Reply-To":"<20221004222903.6393-1-laurent.pinchart@ideasonboard.com>","References":"<20221004222903.6393-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 4/4] libcamera: v4l2_videodevice: Warn\n\tif bytesused == 0 when queuing output buffer","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":"V4L2 has deprecated queuing output buffers with bytesused set to 0. Warn\nif the caller attempts to do so.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/v4l2_videodevice.cpp | 5 +++++\n 1 file changed, 5 insertions(+)","diff":"diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex 4d846f6be7fa..e30858c9fa02 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -1623,6 +1623,11 @@ int V4L2VideoDevice::queueBuffer(FrameBuffer *buffer)\n \tif (V4L2_TYPE_IS_OUTPUT(buf.type)) {\n \t\tconst FrameMetadata &metadata = buffer->metadata();\n \n+\t\tfor (const auto &plane : metadata.planes()) {\n+\t\t\tif (!plane.bytesused)\n+\t\t\t\tLOG(V4L2, Warning) << \"byteused == 0 is deprecated\";\n+\t\t}\n+\n \t\tif (numV4l2Planes != planes.size()) {\n \t\t\t/*\n \t\t\t * If we have a multi-planar buffer with a V4L2\n","prefixes":["libcamera-devel","v2","4/4"]}