Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3535416pxf; Mon, 15 Mar 2021 11:44:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3ixnsR4dctsLPhK1rEFRLcInc2hRUh5WXGXXXrzTuRFIcfq77wjNfzfvfNls1UVDCumnx X-Received: by 2002:aa7:c9c8:: with SMTP id i8mr31120292edt.193.1615833872098; Mon, 15 Mar 2021 11:44:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615833872; cv=none; d=google.com; s=arc-20160816; b=EMKw508322Hyp6F04NMDoz4bSbn1nx2ypojS6twWPJi+Ez0PHEnzaxeXAHmbAIY8M0 iIoibLvuEWK4Q3Km2pqz/5oWbEJPwsBsOQpKGjoCQSmAUfQXwaF4GN7IpN1CoK+C6jtx NPfQj6e4AD0QoETT8um2oNCidP/NTwJYukS3zaabXY5Kpy788ikloOCi5jb9x/3Gi57i ODDFufvm04mi0g+sk26EOHWJW6dvV1qQmPzqZR27h6bZGdBRu42sDInh+rBJY/C2ryld tVQFa1roH4yPVA4W02ToPsgkesgUrZ2RnCaIqcixEXQx0FFXT6Ke0gexiohPa/OFbHWU NPgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=pfFjLIspJMD6JWhPLQLwaYmctbTWBrYbT3cxyzN10po=; b=po+THSaUrKY6tdfqXfmMwV+10ygsIUq2bf0GGyLbBbjcpCZUhHGZbM9/hrAzXQTvXi 2NJqyjFKYIuxy79kYCP3yA1JJ9kNj5FiBUzdO4QXNLxC+ueEsBisF+LHlzxITwNCwyMz gSJAEYPZx84Vx/tsgvLQxeUDPenXRnylhmhySDqN5lJJhMY9p3FOX9Id79qRHMscZxiS FJJS+vPgHu8W/L3pDsP4gzJfLX1YICBw+X/VreIB75Q/bnWRSs54oFHhQ7TmMBiZTxBB NWqsCWcWWYnubvu75DMcvLLdRZAilSzSsnyol60TTK+j5adEM4QooxyaXksXvr8xtFS+ kvpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=W+0qM46e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d15si9592818edr.357.2021.03.15.11.44.09; Mon, 15 Mar 2021 11:44:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=W+0qM46e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229614AbhCORge (ORCPT + 99 others); Mon, 15 Mar 2021 13:36:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232763AbhCORgN (ORCPT ); Mon, 15 Mar 2021 13:36:13 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E45A3C06174A for ; Mon, 15 Mar 2021 10:36:12 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id si25so11968456ejb.1 for ; Mon, 15 Mar 2021 10:36:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pfFjLIspJMD6JWhPLQLwaYmctbTWBrYbT3cxyzN10po=; b=W+0qM46epmi/4IREYm3kaETWt2RjH/hJxIPDMLbTLeDDKfRErmpluus3BR+QU7YfdT LroVhM/C+UzqdQuvXdYCykd4uTBqHcl2hQJ54H+EUYF56QVE5iP0/vX8aC/aRxBHFazj Vn/4SIL1SUfpiYQ8gySAJMfwQPKfYVf74jGtc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pfFjLIspJMD6JWhPLQLwaYmctbTWBrYbT3cxyzN10po=; b=FWg+EB/NSUg2AbyNQlToTCK4kcKng4zwi7JUMvnnptD5frdMwXBOgNfYuKI54emvkl H7P9efyeZLhXF9LZQY3cTdz8QVGhL89FUuNSrwWl1HUI5zBXrxMGkhL6I5QXPcW4yvzB 8bfqPLjlPNftK17mKYft6/uhbrDbYMKvwvx7XQSpvwWpEKEctkNGEHHfAcleUB3U1rrV 6LPw7Qr7T5+wz9Y6cTQ+aRk8K6IrQB7hSSK5ngnXPp+Bp69lmEhT+OFJ+xRL2Vy2/eJS tow7oQPkplae8fLCyVPgAT2l8SwkzWD0YUtWHyAvokXP72Oumo/ivN1Q8FXt6hOE27I0 lklw== X-Gm-Message-State: AOAM532RQ6Qdnds1rHB+9CcJCoMrvANDH2dBhFNWp8ZvAzuqYB6Y3HdK ZapH9ajMX1LdyFw6TxuwSw/B/w== X-Received: by 2002:a17:906:1a44:: with SMTP id j4mr25244493ejf.401.1615829771736; Mon, 15 Mar 2021 10:36:11 -0700 (PDT) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id a3sm8109239ejv.40.2021.03.15.10.36.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 10:36:11 -0700 (PDT) From: Ricardo Ribalda To: Laurent Pinchart , Mauro Carvalho Chehab , Hans Verkuil , Sergey Senozhatsky , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Subject: [PATCH v4 00/11] uvcvideo: Fix v4l2-compliance errors Date: Mon, 15 Mar 2021 18:35:58 +0100 Message-Id: <20210315173609.1547857-1-ribalda@chromium.org> X-Mailer: git-send-email 2.31.0.rc2.261.g7f71774620-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v4l2-compliance -m /dev/media0 -a -f Total for uvcvideo device /dev/media0: 8, Succeeded: 6, Failed: 2, Warnings: 0 Total for uvcvideo device /dev/video0: 54, Succeeded: 50, Failed: 4, Warnings: 2 Total for uvcvideo device /dev/video1: 46, Succeeded: 46, Failed: 0, Warnings: 0 Grand Total for uvcvideo device /dev/media0: 108, Succeeded: 102, Failed: 6, Warnings: 2 After fixing all of them we go down to: Total for uvcvideo device /dev/media0: 8, Succeeded: 8, Failed: 0, Warnings: 0 Total for uvcvideo device /dev/video0: 54, Succeeded: 54, Failed: 0, Warnings: 3 Total for uvcvideo device /dev/video1: 46, Succeeded: 46, Failed: 0, Warnings: 0 Grand Total for uvcvideo device /dev/media0: 108, Succeeded: 108, Failed: 0, Warnings: 3 With Hans patch we can also pass v4l2-compliance -s, but it is a WIP. Changelog v3 (Thanks to Hans and Laurent) - Return -EACCES on inactive controls - Change unique name of the entities - Increase metadata buffer size Hans Verkuil (1): uvc: use vb2 ioctl and fop helpers Ricardo Ribalda (10): media: v4l2-ioctl: Fix check_ext_ctrls media: uvcvideo: Set capability in s_param media: uvcvideo: Return -EIO for control errors media: uvcvideo: set error_idx to count on EACCESS media: uvcvideo: refactor __uvc_ctrl_add_mapping media: uvcvideo: Add support for V4L2_CTRL_TYPE_CTRL_CLASS media: uvcvideo: Use dev->name for querycap() media: uvcvideo: Set unique vdev name based in type media: uvcvideo: Increase the size of UVC_METADATA_BUF_SIZE media: uvcvideo: Return -EACCES to inactive controls drivers/media/usb/uvc/uvc_ctrl.c | 154 +++++++++++++-- drivers/media/usb/uvc/uvc_driver.c | 22 ++- drivers/media/usb/uvc/uvc_metadata.c | 8 +- drivers/media/usb/uvc/uvc_queue.c | 131 ------------- drivers/media/usb/uvc/uvc_v4l2.c | 283 +++------------------------ drivers/media/usb/uvc/uvc_video.c | 5 + drivers/media/usb/uvc/uvcvideo.h | 36 +--- drivers/media/v4l2-core/v4l2-ioctl.c | 25 ++- 8 files changed, 210 insertions(+), 454 deletions(-) -- 2.31.0.rc2.261.g7f71774620-goog