From patchwork Tue Jan 11 20:28:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 15273 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 584FDBE080 for ; Tue, 11 Jan 2022 20:29:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AB21E604F4; Tue, 11 Jan 2022 21:29:04 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="GyLHffOj"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5555F60217 for ; Tue, 11 Jan 2022 21:29:03 +0100 (CET) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 84DD0340; Tue, 11 Jan 2022 21:29:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1641932942; bh=5TGm/IdgBpWifpR6/yzltKe4g/W/T1jJr8iVnIZxvdg=; h=From:To:Cc:Subject:Date:From; b=GyLHffOj1IPQJgACHm8BnUaji8qmcUv94lhICg3LeJAkEO9IcB1ukGp0ldPtGEc45 RlDZnf5wqvPraRycJT06LehWvIZB7bhupOetYRk3ZuGqG95ZMvmtV8YvIos3bDpehr t+QHWa0xA+WKoSXx31/3V1u1iPGjGakWnu0q06+U= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Tue, 11 Jan 2022 22:28:38 +0200 Message-Id: <20220111202838.586-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] v4l2: v4l2_camera_proxy: Zero flags in VIDIOC_REQBUFS 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: , Cc: Vedant Paranjape Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The V4L2 compatibility layer doesn't support any of the VIDIOC_REQBUFS flags. They are all correctly ignored, but also need to be zeroed before returning to indicate that they haven't been taken into account. This fixes a v4l2-compliance failure: Buffer ioctls (Input 0): fail: ../../utils/v4l2-compliance/v4l2-test-buffers.cpp(682): coherent test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL Fixes: aa4533639971 ("include: linux: Update kernel headers to version v5.16-rc7") Signed-off-by: Laurent Pinchart Tested-by: Vedant Paranjape Reviewed-by: Paul Elder --- src/v4l2/v4l2_camera_proxy.cpp | 1 + 1 file changed, 1 insertion(+) base-commit: eff9de397ac37e948e5ca603814fcaba9bcd8df5 diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp index 4d529bc29a4d..1802d90bf30b 100644 --- a/src/v4l2/v4l2_camera_proxy.cpp +++ b/src/v4l2/v4l2_camera_proxy.cpp @@ -469,6 +469,7 @@ int V4L2CameraProxy::vidioc_reqbufs(V4L2CameraFile *file, struct v4l2_requestbuf return -EBUSY; arg->capabilities = V4L2_BUF_CAP_SUPPORTS_MMAP; + arg->flags = 0; memset(arg->reserved, 0, sizeof(arg->reserved)); if (arg->count == 0) {