Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2210266imu; Thu, 29 Nov 2018 01:02:07 -0800 (PST) X-Google-Smtp-Source: AFSGD/Uav1RmqWT1syTACbXCn8+97kGx9CppjSmxQbQqSw/qyf7EJC6H3nJv0/WuTeMcmPXCViUz X-Received: by 2002:a63:6302:: with SMTP id x2mr506671pgb.183.1543482127113; Thu, 29 Nov 2018 01:02:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543482127; cv=none; d=google.com; s=arc-20160816; b=BWFQMlLDL9HHBkFKmt3SQYC1rzCbWHHMy+gh6ADgkmSWPrJBO4RNakaxhQU9OyjObH Pe+kzSo8iOqRY2R1limb1HCLXII+fZy9Vd+DsjPtAg56E0J1ZWExzRB4CvVUvtgpcQlW LaI8aeGTOgmsTHR7A6LN+rrZjkCJX3VBx94N8cCpP90RO7v1dzEA6v0hH7FPio1fxdnq WHd8j2NNoILsbEF2Uqp6Vq1S/7npO9n5XVP2uvPx95ceit1bqw7waPN/FAVxU3b9w1Ox lEwsVfV6GRq6lbv+vvwoJALCOZsG+2UJ+eU8fMq69XCippR/bN3fBMLMe2P59D8RgLac 1O2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=oEURAmJrnfIJ/pxjAHWRw+ixSqA0t7Meidmb8rHQgPY=; b=U+BrhcCZWvHs2iWe71BuQq1xeLTAloPR62T0cDMj2hA3uOMEoBgNoIX6FfclKu2SCU WKxp4b0XOw2aioAtqjdiOQAZCUBBZU8JDIWT1taleCA9jnpnVyH3/Etn6pWE9mmh46RB vFwq6cD2cF2VsLPOQ9oqm57RE6k7SHThhQ1XOQG/pIw6y0bZ6d6JFpNjACnJpDqUfAoI RuKeVSosBwIWsBvEoQ+MnkiZy1qXmDFIU6GApYEMNc2R+d/4Ue0gDnrx1O43pwpyOpWt Sx+tE0uDepxomyNBaJedXf9m/4gUMi3q8bES0u0ImmdWIjYyv8JnFEvu7A90wnq2qXc8 IeZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31si1438323pli.438.2018.11.29.01.01.50; Thu, 29 Nov 2018 01:02:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726772AbeK2UFx (ORCPT + 99 others); Thu, 29 Nov 2018 15:05:53 -0500 Received: from lb3-smtp-cloud8.xs4all.net ([194.109.24.29]:37169 "EHLO lb3-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726565AbeK2UFw (ORCPT ); Thu, 29 Nov 2018 15:05:52 -0500 Received: from [192.168.2.10] ([212.251.195.8]) by smtp-cloud8.xs4all.net with ESMTPA id SIC4gFfNREPjOSIC7gkzBX; Thu, 29 Nov 2018 10:01:12 +0100 Subject: Re: [PATCH] media: videodev2: add V4L2_FMT_FLAG_NO_SOURCE_CHANGE To: Maxime Jourdan , Mauro Carvalho Chehab Cc: Tomasz Figa , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org References: <20181004133739.19086-1-mjourdan@baylibre.com> From: Hans Verkuil Message-ID: <491c3f33-b51b-89cb-09f0-b48949d61efb@xs4all.nl> Date: Thu, 29 Nov 2018 10:01:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20181004133739.19086-1-mjourdan@baylibre.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfDatgp1e02SqPxY3jKkTQoUxDdeXMe05tle6zCjBPDM6HHLD/Qi0zdD+bAkuxUWlwW1bIEmJ02skJRXyEx41R8suCUJRqITaRmUrz0qk1z0c1bDhkRs7 A6hREMjNpoxxphmYExJcKtlVUurZdqtEJEzp5rKTtKxL9o/tpOeFz3+ka3e4aJz/XNqT7laFeBqC1uIjkt76lKnSAVyyD+7QAeT1eSfUF0vaL/+l5Fvgc/95 2nVit+FG4WpjosY0MHkglBKCoBf5fm4R2gIh8bqXFqWoN5ezmkknOOA8ULsfOzIByjYdkSEydNmqBsIIzl60er/GnaejG0Gtx7Zr5P4MVoUEfMpN6D2ktjvJ Y46Fx+Bw Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/04/2018 03:37 PM, Maxime Jourdan wrote: > When a v4l2 driver exposes V4L2_EVENT_SOURCE_CHANGE, some (usually > OUTPUT) formats may not be able to trigger this event. > > Add a enum_fmt format flag to tag those specific formats. I think I missed (or forgot) some discussion about this since I have no idea why this flag is needed. What's the use-case? Regards, Hans > > Signed-off-by: Maxime Jourdan > --- > Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 5 +++++ > include/uapi/linux/videodev2.h | 5 +++-- > 2 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst > index 019c513df217..e0040b36ac43 100644 > --- a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst > +++ b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst > @@ -116,6 +116,11 @@ one until ``EINVAL`` is returned. > - This format is not native to the device but emulated through > software (usually libv4l2), where possible try to use a native > format instead for better performance. > + * - ``V4L2_FMT_FLAG_NO_SOURCE_CHANGE`` > + - 0x0004 > + - The event ``V4L2_EVENT_SOURCE_CHANGE`` is not supported > + for this format. > + > > > Return Value > diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h > index 3a65951ca51e..a28acee1cb52 100644 > --- a/include/uapi/linux/videodev2.h > +++ b/include/uapi/linux/videodev2.h > @@ -723,8 +723,9 @@ struct v4l2_fmtdesc { > __u32 reserved[4]; > }; > > -#define V4L2_FMT_FLAG_COMPRESSED 0x0001 > -#define V4L2_FMT_FLAG_EMULATED 0x0002 > +#define V4L2_FMT_FLAG_COMPRESSED 0x0001 > +#define V4L2_FMT_FLAG_EMULATED 0x0002 > +#define V4L2_FMT_FLAG_NO_SOURCE_CHANGE 0x0004 > > /* Frame Size and frame rate enumeration */ > /* >