Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4544438imm; Tue, 9 Oct 2018 01:00:11 -0700 (PDT) X-Google-Smtp-Source: ACcGV615OD5x6++5y03RsbRk/Ul4T925abZml8n9gY9q8ZqJRF/cVscRvBOvHB+GXVJzT2t6lrxp X-Received: by 2002:a17:902:8b83:: with SMTP id ay3-v6mr27856009plb.127.1539072011165; Tue, 09 Oct 2018 01:00:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539072011; cv=none; d=google.com; s=arc-20160816; b=vfRjmREvJpwjlH/sqVekmmZMDoFtc71H49bAV3DGZUnwk5k8OCpHNRmpLRbe2AIGcX q9cr89Tny+nQ4sD+nzUAbyR/6hKv/YKJLua1dAaAFZcmxi537TjpGcJAlMa9K3hmA58M H9nbRUldm5LSm2T/gfxD0eHB1YlbO2WAGxkXBwbW4fdw7IITE6t2PLj2P6X5ouIusuOX fwaEHDD9OAw3Y7TPODG+wlKeQg5MD3W3bMCluCjnV6m/3ff2JISZ1JdbnBNGHUWiE8Av MmSuHQ1Vl5uJ2R49xASzNLRtM3DIU8YZ7o4iJE2RxgdTNHt7T6WkYfAImI2341yWOtSf cl0w== 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=YfC2K77BgCfSmtV8fbfFim7K+3NV2MODtzHITr4r8xU=; b=0unpIPwu0fUkB1YKpK2RyePZK06j2PaJzfJMbnj4LmRniRlOCZQe82iChHJ0mpJXcc xkfoK+ea0XktL3ejSTrE+FYntkw7xjatk8bX2GOMdXaGtFxZAgnqMWVFdNvQqLdOQfIo 8HA3geBnEmj7r/9bfAVcdEyAg5lpwTJNdbX55agrdmhqTTOLNCGH61ofFupRoXqw/4Mm j+yHVazSuTHjy8fuwh/cjDmGf4/CONaDmvw7b5lfyZY1hp5L3mi4qJrFDVruZ285q0eu kxESqx8snOnSnqRpEV+KrvKSNSQvg8AVojobOn98cVccMD1WHHDfHRKH3HgkQD0pIOiW 6vhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mc8IWPHO; 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 33-v6si16318836plg.157.2018.10.09.00.59.56; Tue, 09 Oct 2018 01:00:11 -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=@chromium.org header.s=google header.b=mc8IWPHO; 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 S1726920AbeJIPOs (ORCPT + 99 others); Tue, 9 Oct 2018 11:14:48 -0400 Received: from mail-yw1-f66.google.com ([209.85.161.66]:32800 "EHLO mail-yw1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726892AbeJIPOq (ORCPT ); Tue, 9 Oct 2018 11:14:46 -0400 Received: by mail-yw1-f66.google.com with SMTP id m127-v6so275464ywb.0 for ; Tue, 09 Oct 2018 00:59:06 -0700 (PDT) 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=YfC2K77BgCfSmtV8fbfFim7K+3NV2MODtzHITr4r8xU=; b=mc8IWPHO7Omu+x4RIA/W9p1MWJhGluVGsXIP7HA0oyEL6EIBf8rcOuh9Pywaeh02FQ LdyYkkfNoJ9KDQsBgfUo7cYjicdv/8TRqoYB9v2QNJjaAB2X2ZSDyWoIpZSQOr1HkSwL HgMlPi+1jGPixDHZXcVe7p2YmGV4yVNkHQySk= 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=YfC2K77BgCfSmtV8fbfFim7K+3NV2MODtzHITr4r8xU=; b=Q5cfWRQ9PLEpB9ABWf51x4pvMn7s677S/UQa69PW01bTMs84HEn4z6c+dd1LZ6E0D+ /4sOg4TesI2cwGI9wOw7bl9StesMIYQgiZe3eHjJr5yErEwbI0jjUE6Nh4WHxC4POA8r MyFyL5E5G4eRoEppshEDxnQbgHzsoxxitzxT0dDhiHtzJlPEQXYKOKt9LhbLhTkyTxo4 8VM8HcIlV29iQXY+QMYuFAs1S9Dk2hoVZqkaN5ZpI5kuKtzRwXBwmrcM2A1lEYmDMmva eR0W5v2JKDrQA7gdYU8e0j4cuRa/eJcnWJ9Xp6KFhQBgXkX54UyfTj1ACZKC/k0m/UQ4 NK5g== X-Gm-Message-State: ABuFfohrvdpU68Zg8NXVHOCksBp8+ir3F+KuhAcXNs9pGNHT8+paaSGU Ff9TRmCVAGC0dhSFLW1p0VIkyVTud/Xd5A== X-Received: by 2002:a81:a10c:: with SMTP id y12-v6mr15169927ywg.178.1539071946196; Tue, 09 Oct 2018 00:59:06 -0700 (PDT) Received: from mail-yb1-f178.google.com (mail-yb1-f178.google.com. [209.85.219.178]) by smtp.gmail.com with ESMTPSA id l128-v6sm2703655ywd.35.2018.10.09.00.59.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Oct 2018 00:59:05 -0700 (PDT) Received: by mail-yb1-f178.google.com with SMTP id h1-v6so264119ybm.4 for ; Tue, 09 Oct 2018 00:59:05 -0700 (PDT) X-Received: by 2002:a25:ac68:: with SMTP id r40-v6mr15375162ybd.285.1539071944661; Tue, 09 Oct 2018 00:59:04 -0700 (PDT) MIME-Version: 1.0 References: <20181004133739.19086-1-mjourdan@baylibre.com> In-Reply-To: <20181004133739.19086-1-mjourdan@baylibre.com> From: Tomasz Figa Date: Tue, 9 Oct 2018 16:58:53 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] media: videodev2: add V4L2_FMT_FLAG_NO_SOURCE_CHANGE To: mjourdan@baylibre.com Cc: 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 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