{"id":17525,"url":"https://patchwork.libcamera.org/api/patches/17525/?format=json","web_url":"https://patchwork.libcamera.org/patch/17525/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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-3-laurent.pinchart@ideasonboard.com>","date":"2022-10-04T22:29:01","name":"[libcamera-devel,v2,2/4] pipeline: ipu3: Set bytesused before queuing parameters buffer","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"3027397abe4c907ab390baa87e5891ffe217db28","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/17525/mbox/","series":[{"id":3531,"url":"https://patchwork.libcamera.org/api/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/17525/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17525/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 3BB5EBD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  4 Oct 2022 22:29:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E67F160ACA;\n\tWed,  5 Oct 2022 00:29:11 +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 2A8A760AC9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  5 Oct 2022 00:29:10 +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 A8B11997;\n\tWed,  5 Oct 2022 00:29:09 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664922551;\n\tbh=l48UoKpgn2xtn7SvJNa0pHvCj4usc5TCidd2hWVXZ8k=;\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=QUmUw5nzscAq6ajnbov2NBj7UPL5U4oPaZbx1LG9MFwQHao+1SKFhI8WVe762ASyt\n\tl/FSZWsedv3Pk8h0FysYfRHdSlGsB1xSrRZz9A7FwF45zqOgoSaWZFJ56IxnJN/MI/\n\tfOYgczGDbU5GU7BLmEmVSKHVARqPQNzseDF0nMYVOTm29SAYe88HAQfnQrfrpRiVp8\n\tpQxlVWreTVhwqxt1nsBN9PfLxuGinmOKajZH5ecPbw9tpCPyMwWo5ezaVom39XMvyi\n\tz9rNFiQTwXuVnoGCL/JzkK7LLml+YaMpm7l3BbDcGOwZmXYrOg0iUe5EMdHvme3W+5\n\trAJeQ6ZoGPkNQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1664922549;\n\tbh=l48UoKpgn2xtn7SvJNa0pHvCj4usc5TCidd2hWVXZ8k=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=D/XEdoVrjit3y4JsMyYMw1qOCu5GrLmH+bXmOdxfSQ2ngMUN/K6D76uztMxeKUKRd\n\tGJBCqN+3iqS3vz6f2invnVYWsN3OPNwRxeJWDEhdCJks7kwP9+4ou5ZmNEZzZ/DVSX\n\tnTbUXcKEn5gYX5N95Uky61jKJ8mbZ/y3QhxzFD+4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"D/XEdoVr\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Wed,  5 Oct 2022 01:29:01 +0300","Message-Id":"<20221004222903.6393-3-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 2/4] pipeline: ipu3: Set bytesused\n\tbefore queuing parameters 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":"The bytesused value for the parameters buffer is initialized to 0 and\nnever set. The V4L2 API specification indicates that, for an output\nvideo device, the driver will set the bytesused value to the size of the\nplane in that case. The videobuf2 framework does so, but considers this\nas deprecated and prints a warning:\n\n[   54.375534] use of bytesused == 0 is deprecated and will be removed in the future,\n[   54.388026] use the actual size instead.\n\nFix it by setting bytesused to the correct value before queuing the\nparameters buffer.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 4 ++++\n 1 file changed, 4 insertions(+)","diff":"diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 93219a6c1134..3b892d9671c5 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -11,6 +11,8 @@\n #include <queue>\n #include <vector>\n \n+#include <linux/intel-ipu3.h>\n+\n #include <libcamera/base/log.h>\n #include <libcamera/base/utils.h>\n \n@@ -1298,6 +1300,8 @@ void IPU3CameraData::paramsBufferReady(unsigned int id)\n \t\t\timgu_->viewfinder_->queueBuffer(outbuffer);\n \t}\n \n+\tinfo->paramBuffer->_d()->metadata().planes()[0].bytesused =\n+\t\tsizeof(struct ipu3_uapi_params);\n \timgu_->param_->queueBuffer(info->paramBuffer);\n \timgu_->stat_->queueBuffer(info->statBuffer);\n \timgu_->input_->queueBuffer(info->rawBuffer);\n","prefixes":["libcamera-devel","v2","2/4"]}