[{"id":22010,"web_url":"https://patchwork.libcamera.org/comment/22010/","msgid":"<CACGrz-M01zmqjue9GvZY5fXaaHZ9Z_kVYJda6B9JXt40UFGctg@mail.gmail.com>","date":"2022-01-11T20:54:14","subject":"Re: [libcamera-devel] [PATCH] v4l2: v4l2_camera_proxy: Zero flags\n\tin VIDIOC_REQBUFS","submitter":{"id":85,"url":"https://patchwork.libcamera.org/api/people/85/","name":"Vedant Paranjape","email":"vedantparanjape160201@gmail.com"},"content":"Hi Laurent,\nThis patch fixed the build issue.\n\nOn Wed, Jan 12, 2022 at 1:59 AM Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> The V4L2 compatibility layer doesn't support any of the VIDIOC_REQBUFS\n> flags. They are all correctly ignored, but also need to be zeroed\n> before returning to indicate that they haven't been taken into account.\n>\n> This fixes a v4l2-compliance failure:\n>\n> Buffer ioctls (Input 0):\n>                 fail: ../../utils/v4l2-compliance/v4l2-test-buffers.cpp(682): coherent\n>         test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL\n>\n> Fixes: aa4533639971 (\"include: linux: Update kernel headers to version v5.16-rc7\")\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nTested-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\n\n> ---\n>  src/v4l2/v4l2_camera_proxy.cpp | 1 +\n>  1 file changed, 1 insertion(+)\n>\n> diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\n> index 4d529bc29a4d..1802d90bf30b 100644\n> --- a/src/v4l2/v4l2_camera_proxy.cpp\n> +++ b/src/v4l2/v4l2_camera_proxy.cpp\n> @@ -469,6 +469,7 @@ int V4L2CameraProxy::vidioc_reqbufs(V4L2CameraFile *file, struct v4l2_requestbuf\n>                 return -EBUSY;\n>\n>         arg->capabilities = V4L2_BUF_CAP_SUPPORTS_MMAP;\n> +       arg->flags = 0;\n>         memset(arg->reserved, 0, sizeof(arg->reserved));\n>\n>         if (arg->count == 0) {\n>\n> base-commit: eff9de397ac37e948e5ca603814fcaba9bcd8df5\n> --\n> Regards,\n>\n> Laurent Pinchart\n>\n\nRegards,\nVedant Paranjape","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 91361BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 11 Jan 2022 20:54:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6534A60921;\n\tTue, 11 Jan 2022 21:54:28 +0100 (CET)","from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com\n\t[IPv6:2607:f8b0:4864:20::b36])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5C41B60217\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 11 Jan 2022 21:54:27 +0100 (CET)","by mail-yb1-xb36.google.com with SMTP id g14so509658ybs.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 11 Jan 2022 12:54:27 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"mo3VzAvG\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=SXtDPRISSa3KCgax1iTFZAmKnIkORIbsqpCMgqYhRlo=;\n\tb=mo3VzAvGgWVN9utsKEGU7ESxgbBntALyIfBfQ2nGmctuKJ+FbO6CpYWTiJK/xIAhDH\n\tTFNNPTaIyrZTlKfm9S3tH4llMN1w/CCab0Qdzj944BllX2QJOegpz+xyQS0SrsIP4NoG\n\tZEHyOgbNbkt2PIIYg1KRPiXOz6/L6SwBt79xgwMl58dCBqeGZknCZhouhPOYMYcKa4nf\n\tVHGenC5kaBdqZGZ1fHMMBoFqjmT18euyJPNEwF6iVVQ6KrkP89Mkk4CYRjVAN+6kUCGe\n\t5O2aXyWvCy2ZGHX29ZEz4mJrmhzNU2Sw+Mk+Z5FFLOgrFHeWStpcAM/Ck7rs6fq1VUFj\n\tUuLg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=SXtDPRISSa3KCgax1iTFZAmKnIkORIbsqpCMgqYhRlo=;\n\tb=GVZt/yey5LBq4bR7Y4LuK4kTn8otxyp0h0tgy/8fkV8YsyTxjidf9N/AuYvEu8pOid\n\tZH2QyMExQUo8q6B9JgaqEOuqlbeWVAxgXzbOfjxCxYk2m487ZIguGIqZl8asUmU4bl3e\n\t2WkwMbzHFNWZwVokpr6YXo/WTBiVJtwV2qFV5CsMcKTI512hqG1hpHs5Un5ntxXsvFEr\n\t95auoshmfBQaFnRsIM2we2jXOfrBUjNUkK3mlPAX0rXet6GZMovHxOc2GnpRLZob5F4N\n\tBCeD/rMIGE/PhW5hdn0rDBeNIEyqsH34JgX7MEmgVxLJfDATtTsW4REzEO8msRatR7Pt\n\tk15Q==","X-Gm-Message-State":"AOAM530BzY5X+BO6vHaMldwX6Rl4kfNuOwLia1ZNFbKzuim7hLTacKP8\n\tavAprB0zMQTvk7yG/wDj9QcRy0ulqBChkUx/xDoeI4cHQ74=","X-Google-Smtp-Source":"ABdhPJzcx5Rzi762Dlfx/UEGMkbhczr36jANWPOsIHzLK1IhmeV7PJM7ldrumbzuCUFnKyabfo9Lh8sM2JwACWt6Ze8=","X-Received":"by 2002:a05:6902:708:: with SMTP id\n\tk8mr9673034ybt.641.1641934466075; \n\tTue, 11 Jan 2022 12:54:26 -0800 (PST)","MIME-Version":"1.0","References":"<20220111202838.586-1-laurent.pinchart@ideasonboard.com>","In-Reply-To":"<20220111202838.586-1-laurent.pinchart@ideasonboard.com>","From":"Vedant Paranjape <vedantparanjape160201@gmail.com>","Date":"Wed, 12 Jan 2022 02:24:14 +0530","Message-ID":"<CACGrz-M01zmqjue9GvZY5fXaaHZ9Z_kVYJda6B9JXt40UFGctg@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] v4l2: v4l2_camera_proxy: Zero flags\n\tin VIDIOC_REQBUFS","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>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":22034,"web_url":"https://patchwork.libcamera.org/comment/22034/","msgid":"<20220114110800.GH4255@pyrite.rasen.tech>","date":"2022-01-14T11:08:00","subject":"Re: [libcamera-devel] [PATCH] v4l2: v4l2_camera_proxy: Zero flags\n\tin VIDIOC_REQBUFS","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Laurent,\n\nOn Tue, Jan 11, 2022 at 10:28:38PM +0200, Laurent Pinchart wrote:\n> The V4L2 compatibility layer doesn't support any of the VIDIOC_REQBUFS\n> flags. They are all correctly ignored, but also need to be zeroed\n> before returning to indicate that they haven't been taken into account.\n> \n> This fixes a v4l2-compliance failure:\n> \n> Buffer ioctls (Input 0):\n>                 fail: ../../utils/v4l2-compliance/v4l2-test-buffers.cpp(682): coherent\n>         test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL\n> \n> Fixes: aa4533639971 (\"include: linux: Update kernel headers to version v5.16-rc7\")\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  src/v4l2/v4l2_camera_proxy.cpp | 1 +\n>  1 file changed, 1 insertion(+)\n> \n> diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\n> index 4d529bc29a4d..1802d90bf30b 100644\n> --- a/src/v4l2/v4l2_camera_proxy.cpp\n> +++ b/src/v4l2/v4l2_camera_proxy.cpp\n> @@ -469,6 +469,7 @@ int V4L2CameraProxy::vidioc_reqbufs(V4L2CameraFile *file, struct v4l2_requestbuf\n>  \t\treturn -EBUSY;\n>  \n>  \targ->capabilities = V4L2_BUF_CAP_SUPPORTS_MMAP;\n> +\targ->flags = 0;\n>  \tmemset(arg->reserved, 0, sizeof(arg->reserved));\n>  \n>  \tif (arg->count == 0) {\n> \n> base-commit: eff9de397ac37e948e5ca603814fcaba9bcd8df5\n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","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 4152DBF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 14 Jan 2022 11:08:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 90FE5604F8;\n\tFri, 14 Jan 2022 12:08:09 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 650526017F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 14 Jan 2022 12:08:08 +0100 (CET)","from pyrite.rasen.tech (h175-177-042-148.catv02.itscom.jp\n\t[175.177.42.148])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 385B6A2A;\n\tFri, 14 Jan 2022 12:08:05 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"KnLPi/cF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1642158488;\n\tbh=KD3RlUewnBjEqmh8ezlQ7Th6Wtyi4uo4ZOpjUvawXKg=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=KnLPi/cFK0jrYn38jQE0bx/UHbi97WL3NHMSksWApur97B5l4XuBrCYjU+DWR/Akm\n\tW04r82e0Vbcc61uAODrXJaOXOalYca6cxXkFFGc0ctlazHi5jYNXSNlRDQGru55GE1\n\tfuCIlRdfE6cbDAVyhmdydiMBNmmmhrZVpyfpMbEw=","Date":"Fri, 14 Jan 2022 20:08:00 +0900","From":"paul.elder@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20220114110800.GH4255@pyrite.rasen.tech>","References":"<20220111202838.586-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20220111202838.586-1-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] v4l2: v4l2_camera_proxy: Zero flags\n\tin VIDIOC_REQBUFS","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>","Cc":"libcamera-devel@lists.libcamera.org,\n\tVedant Paranjape <vedantparanjape160201@gmail.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]