Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2873907imu; Thu, 29 Nov 2018 11:36:23 -0800 (PST) X-Google-Smtp-Source: AFSGD/UsfDbfHksDwz+so8re4grDqdAbNSzPoqx0xPnc6NwXe4WP0pLNBSmkKP+BkkRz+gh7zOAu X-Received: by 2002:a63:3204:: with SMTP id y4mr2321299pgy.41.1543520183859; Thu, 29 Nov 2018 11:36:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543520183; cv=none; d=google.com; s=arc-20160816; b=vLOurvb9qSGXKEXYyGJyKkdS98GOAqOzPwXWML3UmbXmBjo6Bd0noQmr6YBqUPNx46 NKOUr7mUPJ9W37tEoj0WQo6UXFGaewQCNOpupuEMF1NuQD9R95KtedhwcysKRPQe1Fjz jSZ2vkzMVNA3l5RH21q02SBzmei/XbM3UvCNCqTVN6wGXr3z2OHWrhsu5rEwHrSVwDJR A9pYZBZ7ji5ZJrp3ParRYLlNni5xoP11PH2O1G7cuMq8qPiu2yGeDUOfXR6mq/4jNkcc io12/tgJKaeLDFf+WHfvHYoGpP0WK+IW8DZJJeSHF4EuBFNeyfoA6xHIegLDBwYD2MJD aTWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Ai97ARWKU+PjADMSFtwAVEbP+Zg5UtYx2CeNAnQNAxE=; b=mL/IzmsffOE8Hf2OMf0lrXqgeqRuH0FMuGhXNRuzppy0IxUqmZdVQhGqo7sfClz+5r t6maTpbQlzCrG8aEfkiQ4L+ZO5a+7PuqErATChySswzgcsVOQ75eH7Z/A1WssN0TAjoI U9F4Pjs8ol+iEse++mgFRp33oUvtUIFvBKzlpsQxxco50YKly4oyL9a63lf4sLnHRiCx YA1uMScK6WsZm+t/h6MnernBFS9gIeyxAUr66MIK+EthRp0IhmNFrTPG+nZIZt16SbUR pT1PZvrwpkOAEnu6WG/ZxQjHGg+b8RAhLth/NlCyrd+wxlU4oslS8L3Rv66tx1yo6BCu Ht2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YkWRcE9d; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o125-v6si2941318pfb.35.2018.11.29.11.36.09; Thu, 29 Nov 2018 11:36:23 -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; dkim=pass header.i=@chromium.org header.s=google header.b=YkWRcE9d; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726554AbeK3Gls (ORCPT + 99 others); Fri, 30 Nov 2018 01:41:48 -0500 Received: from mail-yb1-f195.google.com ([209.85.219.195]:38771 "EHLO mail-yb1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725788AbeK3Gls (ORCPT ); Fri, 30 Nov 2018 01:41:48 -0500 Received: by mail-yb1-f195.google.com with SMTP id u103-v6so1236351ybi.5 for ; Thu, 29 Nov 2018 11:35:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ai97ARWKU+PjADMSFtwAVEbP+Zg5UtYx2CeNAnQNAxE=; b=YkWRcE9drrWg1z5OE+zVOLxuf4zboSDAl1dPQFnq7AkWW5jSeUZgUKf9Roapj89hcJ +7Pa1gNuoPSljROExGdKzhT4kjTUwJfS33RaZwMIG41ufeXw0MqdHDsF7P6qSFG8/xfN rex6WxnOsUI0gFc/1JI6xIVBE/p37cj72iqhY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ai97ARWKU+PjADMSFtwAVEbP+Zg5UtYx2CeNAnQNAxE=; b=HALFxEPpi4CM4fOXjwARFlhVcFS/mMGoJlL5jwuZbCOYFcOp2iLgZeHSWukF2cwJvc ABQCGZ3VaFbKqijLD+zKruCwL8kx6PovyH10A7jPTZDcVkfqmFfjjTFJSMQvRw/xudcS NRwLCHI5ENKZEvq7vJiYaZYt4kqQyyV+xKrUgi30ObAdFOlSnNHiHXPvWp8sC7nCOo5W LqMPepvUVkccp1wbU4mV5B20EnhtO4gqXaaAdRhtqEkWOenAykbqjl5NJM/W0nL94tar zAB8h61xyOnX8G0Kf5J4jsA0pqa4E1/rSt6JB9OsL9cV3APj4I6jBnl8MyA7/1PiirmT VUbA== X-Gm-Message-State: AA+aEWZzIXPA0uOLu0M/2HlouguVauEkLNkcKOXwHV3i7MzVhdYO7Yqk t6OYeUvSdIT/Hk1D34KfNfGhGb8Rlwc= X-Received: by 2002:a25:b31d:: with SMTP id l29-v6mr2644015ybj.270.1543520116915; Thu, 29 Nov 2018 11:35:16 -0800 (PST) Received: from mail-yb1-f171.google.com (mail-yb1-f171.google.com. [209.85.219.171]) by smtp.gmail.com with ESMTPSA id c140sm1535924ywa.74.2018.11.29.11.35.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 11:35:15 -0800 (PST) Received: by mail-yb1-f171.google.com with SMTP id d18-v6so1236664yba.4 for ; Thu, 29 Nov 2018 11:35:15 -0800 (PST) X-Received: by 2002:a25:b3c6:: with SMTP id x6-v6mr2603311ybf.508.1543520115083; Thu, 29 Nov 2018 11:35:15 -0800 (PST) MIME-Version: 1.0 References: <20181004133739.19086-1-mjourdan@baylibre.com> <491c3f33-b51b-89cb-09f0-b48949d61efb@xs4all.nl> In-Reply-To: <491c3f33-b51b-89cb-09f0-b48949d61efb@xs4all.nl> From: Tomasz Figa Date: Thu, 29 Nov 2018 11:35:03 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] media: videodev2: add V4L2_FMT_FLAG_NO_SOURCE_CHANGE To: Hans Verkuil Cc: mjourdan@baylibre.com, Mauro Carvalho Chehab , Hans Verkuil , Linux Media Mailing List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 29, 2018 at 1:01 AM Hans Verkuil wrote: > > 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? As far as I remember, the hardware/firmware Maxime has been working with can't handle resolution changes for some coded formats. Perhaps we should explain that better in the commit message and documentation of the flag, though. Maxime, could you refresh my memory with the details? Best regards, Tomasz > > 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 */ > > /* > > >