From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PULL_REQUEST,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41409C4CECE for ; Thu, 17 Oct 2019 06:53:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F651214E0 for ; Thu, 17 Oct 2019 06:53:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407839AbfJQGxz (ORCPT ); Thu, 17 Oct 2019 02:53:55 -0400 Received: from lb1-smtp-cloud8.xs4all.net ([194.109.24.21]:39149 "EHLO lb1-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389340AbfJQGxz (ORCPT ); Thu, 17 Oct 2019 02:53:55 -0400 Received: from [192.168.2.10] ([46.9.232.237]) by smtp-cloud8.xs4all.net with ESMTPA id KzfQiN66KPduvKzfTitN9r; Thu, 17 Oct 2019 08:53:51 +0200 To: Linux Media Mailing List Cc: Vandana B N From: Hans Verkuil Subject: [GIT PULL FOR v5.5 (v2)] vivid: add metadata capture/output support Message-ID: <1074d944-de6e-7483-3337-ca9acd1b1c55@xs4all.nl> Date: Thu, 17 Oct 2019 08:53:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfFHiaffoRcrQLLZJsAYkab8admDr4/xgPB4qVBNlExv7ti26SJMmpK7q+BL66ZvvUkoTs+DRU4/IaMMagSkbXrCerzwDwaQVOAIrYs/nQUf6kNrRqvxo Ef7Dmzs7GdM1WzH8RneNrMVMjjl8/J/tQVk51lPFzw0rvipNqJhu0YEEOcaci7kWKVPTGLSGo/pfDwNc/DLtE7qKnmggLfYi0b0= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This series adds vivid metadata capture and output support. While working on that it was discovered that the v4l2 core didn't correctly validate the ioctls in the case of the vivid driver that has a complex mix of V4L2 devices and various video inputs, each with different properties. Some other cleanups were also done in that code to simplify the logic and the ioctl validation for touch devices was also improved. Many thanks to Vandana for working on this as part of the Linux Kernel Mentorship Program. Note: the v4l2-compliance test will fail for the metadata output. To make that work this patch is needed: https://patchwork.linuxtv.org/patch/59480/ Once this series is merged I'll apply that patch as well to v4l-utils. Changes in v2: - Updated the "v4l2:Add vivid metadata doc" patch with new dual license Regards, Hans The following changes since commit 503e59365dd134b2c63864f14e2de0476284b003: media: i2c: ov2659: Switch to SPDX Licensing (2019-10-01 17:39:16 -0300) are available in the Git repository at: git://linuxtv.org/hverkuil/media_tree.git tags/br-v5.5f for you to fetch changes up to d1c35b1d11a00b4794a7f0fbce50d754bc72ed36: vivid: Add metadata output support (2019-10-17 08:50:14 +0200) ---------------------------------------------------------------- Tag branch ---------------------------------------------------------------- Hans Verkuil (3): v4l2-dev: simplify the SDR checks v4l2-dev: fix is_tch checks v4l2-dev: disable frequency and tuner ioctls for touch Vandana BN (5): v4l2-core: correctly validate video and metadata ioctls vivid: Add metadata capture support Documentation:media:v4l2:Add vivid metadata doc v4l2-core: Add new metadata format vivid: Add metadata output support Documentation/media/uapi/v4l/meta-formats.rst | 1 + Documentation/media/uapi/v4l/pixfmt-meta-vivid.rst | 60 +++++++++++++++ drivers/media/platform/vivid/Makefile | 2 +- drivers/media/platform/vivid/vivid-core.c | 197 ++++++++++++++++++++++++++++++++++++++++++++++-- drivers/media/platform/vivid/vivid-core.h | 24 ++++++ drivers/media/platform/vivid/vivid-ctrls.c | 75 ++++++++++++++++++ drivers/media/platform/vivid/vivid-kthread-cap.c | 54 +++++++++++-- drivers/media/platform/vivid/vivid-kthread-out.c | 49 +++++++++++- drivers/media/platform/vivid/vivid-meta-cap.c | 201 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/media/platform/vivid/vivid-meta-cap.h | 29 +++++++ drivers/media/platform/vivid/vivid-meta-out.c | 174 ++++++++++++++++++++++++++++++++++++++++++ drivers/media/platform/vivid/vivid-meta-out.h | 25 ++++++ drivers/media/platform/vivid/vivid-vid-cap.c | 5 +- drivers/media/platform/vivid/vivid-vid-out.c | 5 +- drivers/media/v4l2-core/v4l2-dev.c | 112 ++++++++++++++++----------- drivers/media/v4l2-core/v4l2-ioctl.c | 17 ++++- include/uapi/linux/videodev2.h | 1 + 17 files changed, 965 insertions(+), 66 deletions(-) create mode 100644 Documentation/media/uapi/v4l/pixfmt-meta-vivid.rst create mode 100644 drivers/media/platform/vivid/vivid-meta-cap.c create mode 100644 drivers/media/platform/vivid/vivid-meta-cap.h create mode 100644 drivers/media/platform/vivid/vivid-meta-out.c create mode 100644 drivers/media/platform/vivid/vivid-meta-out.h