Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4463634pxf; Tue, 16 Mar 2021 14:18:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgCXWqfLMYAY4B1VL+LXFChzFX6EJdhhT9bMbkynnV6aAnATYtKB5mWHuF3VjaXNXyj2nb X-Received: by 2002:a17:907:7785:: with SMTP id ky5mr20338826ejc.133.1615929503181; Tue, 16 Mar 2021 14:18:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615929503; cv=none; d=google.com; s=arc-20160816; b=fOf+k6KaRke46vLQmi1cQ2C3Xoel7gAoKbQ6IfZnEpT39b+mMpbKywwVuUuzX+Yf9g de39FWD3hFdsM3LA/Gso6QZ4sitCZJ4QLlkjSP7iRzHZXN+5nC1Mplq3xbGtnIgrMcXk CSJGKh8c8OAZ90D6v73bRUkWYr7pDDJA0ckF2dSzPY9uKhY80KLAxBN/VZLczH3forgG u0auH5Sm6hHNcsa9bzn0tfsk8oXzTzf3H4TcPnD8ps6eaHQxsJtE/UHH5rlUX724hAnD osMzEoc+TbEQUgrjYeHRfqX1wIfeubUYt0Uygx2WjykdfsodyZsBvHNMfOKuQgrn/pjC vnXg== 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=Ckk2erlqddqu+PG/7Bp2HBZ/AtQ6BgEsYvEVjbfanBw=; b=ZZw930jk4HQNSUkW5QbabXlVKshB5VtcyqQ2VYFUGK8lC+B+XKhga6fZk44twiEVA0 a4TA5LVsVAYmERH8sCEHnDrRJkdY7S9WbKIKzGxnoqlpj5ZqFEvIO5G6qQFNy1RoPaNZ 4aqk7l6CKs1TK9xu1HbRxDL6ErcvW89ZFC6crjRftqkB2TppPdOfusJUserLC7m9KaiT 1I2FZU8/eoS2mo56ulWEQQfxU7LDSqWP5q4YLhEeLZ9OvtAnPDfXtqEz4MXSpb82xSFk 9npF4MLDZsKGm9bJiFVbfVPgvWoLqpm36PgfSIe3W+YOEsauqD0gsV0/l0buv/ZmFWh4 19JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=F4cmoL2c; 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 b9si8852313edq.492.2021.03.16.14.18.00; Tue, 16 Mar 2021 14:18:23 -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=F4cmoL2c; 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 S232433AbhCPSBw (ORCPT + 99 others); Tue, 16 Mar 2021 14:01:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239540AbhCPSAM (ORCPT ); Tue, 16 Mar 2021 14:00:12 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D47EC061763 for ; Tue, 16 Mar 2021 11:00:11 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id r17so73663238ejy.13 for ; Tue, 16 Mar 2021 11:00:11 -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=Ckk2erlqddqu+PG/7Bp2HBZ/AtQ6BgEsYvEVjbfanBw=; b=F4cmoL2cuQ7J+/UksOxy2Cyk73iLpsXM2Lw2bkdu0FlxwBhibMbM7bdd/OrqU5UAHp 8+edCkQYZfQZzdpEZOSQ3rm2+upKBaeugDnkfNbmJ4xxRNwfCqM7uL1vjQW7RAa7fAFt +w33wVdBJnI6h+VhoT3mowWvdS/9K2eF9RSCU= 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=Ckk2erlqddqu+PG/7Bp2HBZ/AtQ6BgEsYvEVjbfanBw=; b=Yby2nBFbz1YT0JuYoCI2tpsopx/w6UQZWqKXL6mFi4U1wSPx5bmT/PBc87qkVOW3bm 8i2SOICr8y4Aa8ZzOdUlC5vOcmEIlUlyfbfm1gEVzacYAuvFUXoa8rdbu656I8QyPJSe qmDWbRaMYfAMpz4g11X33qhgI7z3eduxaGi2AgOEZS7Tf/g90DEeIyvdbzhInSbb42E3 SYZ+/fi2tvzA4iCpbjhIweoGQ3FiApvNYwXd0DfST0AeSk4t4FJvSUf2PE610rLNdFpl C2jxY5+XIvR3xxKo6FMP7Sn201aG0uN9lvxBDrBD73MaRQS5xrb7U4GbB+17mMxpohGT Sgwg== X-Gm-Message-State: AOAM530uhtdoXlSU38ZHLRnqS4G2IixiSM1eFdUUtQ9WyBcbuyNqen9R B5I/q7rgW6bPnWLtBBOFJIfqzw== X-Received: by 2002:a17:906:2db2:: with SMTP id g18mr31466097eji.73.1615917607893; Tue, 16 Mar 2021 11:00:07 -0700 (PDT) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id c19sm10953182edu.20.2021.03.16.11.00.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 11:00:07 -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, tfiga@chromium.org Cc: Ricardo Ribalda Subject: [PATCH v5 00/13] uvcvideo: Fix v4l2-compliance errors Date: Tue, 16 Mar 2021 18:59:50 +0100 Message-Id: <20210316180004.1605727-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: 0 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: 0 YES, NO MORE WARNINGS :) Note that we depend on: https://patchwork.linuxtv.org/project/linux-media/patch/20210315172531.101694-1-ribalda@chromium.org/ With Hans patch we can also pass v4l2-compliance -s. Changelog from v4 (Thanks to Hans and Laurent) - Use framework names for controls - Check the control flags before accessing them - Drop meta headers instead of returning error - Fix error_idx handling in v4l2-ioctl Hans Verkuil (1): uvc: use vb2 ioctl and fop helpers Ricardo Ribalda (12): media: v4l2-ioctl: Fix check_ext_ctrls media: uvcvideo: Set capability in s_param media: uvcvideo: Return -EIO for control errors media: uvcvideo: Check controls flags before accessing them 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 media: uvcvideo: Use control names from framework media: v4l2-ioctl: Set error_idx to the right value drivers/media/usb/uvc/uvc_ctrl.c | 209 +++++++++++---- drivers/media/usb/uvc/uvc_driver.c | 22 +- drivers/media/usb/uvc/uvc_metadata.c | 8 +- drivers/media/usb/uvc/uvc_queue.c | 143 ---------- drivers/media/usb/uvc/uvc_v4l2.c | 373 ++++++--------------------- drivers/media/usb/uvc/uvc_video.c | 13 +- drivers/media/usb/uvc/uvcvideo.h | 41 +-- drivers/media/v4l2-core/v4l2-ioctl.c | 40 ++- 8 files changed, 303 insertions(+), 546 deletions(-) -- 2.31.0.rc2.261.g7f71774620-goog