Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4705897imm; Tue, 9 Oct 2018 04:06:43 -0700 (PDT) X-Google-Smtp-Source: ACcGV63cFCbVj9CCa5Wvb5BAiOPzaK+I0uuxylCD8PEsTUWbl3XdTtY4mXp/D9FKnALlsN/t248J X-Received: by 2002:a17:902:d88b:: with SMTP id b11-v6mr27941155plz.136.1539083203285; Tue, 09 Oct 2018 04:06:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539083203; cv=none; d=google.com; s=arc-20160816; b=mYmORAxSe/PyUfB0nhw6bm1QSYkb3lwOxXh7IrLw1fS1xD8jlCnu3JU1DoVvUbxhwx VMaDeFtaseZr92AM6qRDMxhJL9rnkiYIY7KPVaya9CmkgWDdm63PlVlQzGdUuAUqdmYc unS8f+DlIeanA9CcQqlpSJ5Cvw7uYRPzIOQVA4vpOgTFPYcQIF/z1EG9xz5ZU9DnU/Dv mIlJ1lXmiNo501OVZUMUGEQOdkUPmgD5b8qPwCm5iRDhI3qjZ87Umejjn6C2MQ5cc9fU /uqvf7JBZFktFRrUAKswjjs7RtzlMPJkU/FwhMsgenliwRxZt78IF6dkS9SiiZVERuVN MGfw== 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=vI2176wTydr9gQK6uMGzY7eFptfmtQQO88BpTrCjTQg=; b=Y12TSuNubTPD/ynBrQKpoNnJnAfwbIfHAJNBFaTX+c0llw2m9EQkfnVvM3+gdbzzOZ ZfL4Bv+5qNjIePXQl9oYzfMeaVT1PM+ouXnSuqU+wBuXAjFqSXE0ahIeLB52GdbGZ7kb 55fm6kmFCOaC44OjVk/gqm+XF81Kdk2itW+4Xh+/6OUeBpBI377oR8WRwhAQYRIWHzWw HcdKdMeIoQjBwymJ6AJKfDqvXOaiqOkWWZuXEh4o2EWS+yevcHsdYuSiZZZuBMuqHlAN Ldxqcduel4eW9P+FuCvUoP9F7jpZuVJ84JbvxbuOvtzrGX7BCbW7uIi7rFmFI9cyJmjp hFHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=X0eIJOvh; 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 w15-v6si19902373pgg.529.2018.10.09.04.06.28; Tue, 09 Oct 2018 04:06:43 -0700 (PDT) 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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=X0eIJOvh; 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 S1726636AbeJISVJ (ORCPT + 99 others); Tue, 9 Oct 2018 14:21:09 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:35536 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726103AbeJISVJ (ORCPT ); Tue, 9 Oct 2018 14:21:09 -0400 Received: by mail-wr1-f65.google.com with SMTP id w5-v6so1342486wrt.2 for ; Tue, 09 Oct 2018 04:04:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vI2176wTydr9gQK6uMGzY7eFptfmtQQO88BpTrCjTQg=; b=X0eIJOvhAyQT1HXxPKnw1Z5RvgrB7Capm/KIbHsQ31MRpBwZuZ2VgviQ4gFgEYWnpN 32KjZuqMCB5jytmt5Bnva0pKj0pey6NEjGJ6a4aFowBZUWQYGnlh3+nZtCkCYHweWz32 Uv0LaNlMod3EzCeO/EIOHB9k9iStGntJQcDsXkiXf6Ygi5Bu7DHVzSdFXZCLNrYpzquJ wrGDhRvfppmFZe8moTPpdDbQ7frn+D7flhOPmhZn2utGw8DIF/Zjk3NnlGdLyK3c2wE3 Iv25Pzj7TSWdsg4Ekr4Xm2JS1WwZB5hehZSnYLUkK5nly62bJSvuXICFTlF4LLrUJulb E29A== 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=vI2176wTydr9gQK6uMGzY7eFptfmtQQO88BpTrCjTQg=; b=kKRug0VDK2p2JBdDKLakaOVpJZ8vc++P/Uaf1Rd8YcZwZH1EbTKWS9P/n5U9A5lBA5 h+qNypqEi9z1anZC2CeOA8C2yOs6E2zqcZVrSd4nEXLgZWdC6lzEuS4PCHCtxuo4cRya KeUOZ6hmyMZ6dk4dTp7vqDZlHFWJZiSoWbTpMX67xTWrpiaYHKjzp55df4imyj5uwjdp kdDHNzkRbjtsFQPuuIzzT8KguO2cmp+V1tl0JAFXuYVDSkM8gclzO+WXM6h55V3q9ySB XgUwMIknZ6Zx1mOA7N9fIb8GH8IxSt0yKWbNGBnIk8b0s2vxptPJEYVhTLXvkeZxBR3W uc2g== X-Gm-Message-State: ABuFfogkwyGzjJ1UeLOhWn3r8eSI1XbE2ZY8FnJKDMj1vYlVdakq1gAt jcZ9gVFANYMl6xrAEQstuPCXPwb7X/JzgGvCiigLEQ== X-Received: by 2002:adf:a547:: with SMTP id j7-v6mr21355118wrb.220.1539083083939; Tue, 09 Oct 2018 04:04:43 -0700 (PDT) MIME-Version: 1.0 References: <20181004133739.19086-1-mjourdan@baylibre.com> In-Reply-To: From: Maxime Jourdan Date: Tue, 9 Oct 2018 13:04:32 +0200 Message-ID: Subject: Re: [PATCH] media: videodev2: add V4L2_FMT_FLAG_NO_SOURCE_CHANGE To: Tomasz Figa Cc: Mauro Carvalho Chehab , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org 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 Hi Tomasz, On Tue, Oct 9, 2018 at 9:59 AM Tomasz Figa wrote: > > Hi Maxime, > > On Thu, Oct 4, 2018 at 10:38 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. > > > > 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 > > I think it indeed makes sense. I'd suggest submitting this patch > together with the series that adds the affected driver, though, since > we'd be otherwise just adding a dead API. > > Also, it would be good to refer to it from the Decoder Interface > documentation. Depending on which one gets in earlier, you might > either want to base on it or I'd add a note myself. > > Best regards, > Tomasz Agreed on both points. If your documentation makes it in before, I'll update it within the patch. We'll have time to sync on that anyway in the coming weeks. Maxime