Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp743423imu; Fri, 7 Dec 2018 08:14:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/X3/PovfVZG/nIq3JKWVO/1iYDonDCFVo26MxQlY1q3ixentQQagk8zJ9Ft55z7GEzniB7d X-Received: by 2002:a17:902:f24:: with SMTP id 33mr2729819ply.65.1544199254080; Fri, 07 Dec 2018 08:14:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544199254; cv=none; d=google.com; s=arc-20160816; b=0H4lgJdNVDFRBdhAKsn07eGJD/F6LAWXawfanpA/fhECNx9j8bwyqkUv/PmAmiaaAO 0cw2V9dcFl1i5K2DP/wBG7J78NEW1d6DH+CGs6tFGvM5QfmkG/7e4zFx5U/pbebaXlho 4JQXqj+49O4eJo4nOQa0uqS0eDU2vKrhTcSSc36UhVlB7YZ1NbQQQYvtLm7NW8Pqu5Ec S4YC0IJNdNk1B9eomt7ZNupQvaYXfWks/PSVQimibZz2GTDkCN8AvBmNP07ij/bksoks IywYnJeEu5eecwatEOGasJLwkzYEHotJXw453NauLeMW+741S6IfiMePEGqHOkyxMoPC 5+eQ== 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=1JOYu76vd56GqKPQtwn4aosZUJauRxXsxAXbhD/kKVQ=; b=x1pyVogRjwrfRxY6cL4S3PJ09EgxfumhNX4oq56jNyaoCqzggg7kyQPLuu5/vEP2AN GGzvYVfsJeGseH2z/gsTm3neSm+pNRQbsjTAHlNio6Y28VLDLV21TnuSB96b+C+VDJbQ ir8ycJ4naW8XHIScOsDV4nyeimBNzmWT4gf6rnXklDpZlVt1QOlcDtI00MBb6yYQS/l2 ZpeJqGKhHf9yG8wtseU7y9k0A/SL+TjHQECWK9naYjEaZRgQ0rBW02hcArnf3xPUqfmF PzMLHy2GdmVM+mW+moAQd/f4LzlytMv91pMbNu5tBu15RI1Kxsq+2B1EOdiJ9VjqvtVN 4ARg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=179+LLar; 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 z143si3837055pfc.97.2018.12.07.08.13.50; Fri, 07 Dec 2018 08:14:14 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=179+LLar; 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 S1726045AbeLGQMe (ORCPT + 99 others); Fri, 7 Dec 2018 11:12:34 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41794 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726056AbeLGQMd (ORCPT ); Fri, 7 Dec 2018 11:12:33 -0500 Received: by mail-wr1-f65.google.com with SMTP id x10so4304988wrs.8 for ; Fri, 07 Dec 2018 08:12:32 -0800 (PST) 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=1JOYu76vd56GqKPQtwn4aosZUJauRxXsxAXbhD/kKVQ=; b=179+LLarUXxW+fC8xr4TwZV81GaEIw91vR2GTo+d9mwXrxP1jyHVBhOaKyQFLAM466 YJwZKmLqa0WZcTvH2toGNbO6pEZMsjKLqCm/7vMlArxyRyjSfw7Pm9sOrM8wWIQb16ql 8a1Kwnt/VCdVIbnvDJsHGDr+xg6EAmU983df5KLcT+JAUno6ClBLavMS2lODap2fHJVT RHPFkjtKNZeo/StIp9PbzvzXIUYM5Jazq4E4MCieNB5xcN+itxZoDTCAPzs5BN7GAQxG 4Q4KB2QkTBodnZBWxz/k/8r4vmZY0C0HNc7BkmAxVU1r9tYQZribjiyavEcJyTPog+uK EyFg== 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=1JOYu76vd56GqKPQtwn4aosZUJauRxXsxAXbhD/kKVQ=; b=GSfIsqLQYD3Kg9vqNFA7PVNQn+dHoHjD8NlfSQXhZvQgPq6KbLGLUFRDbTspja0Yht VU70kNMKPd0TipIxEqzLe5SJ2GhdA6fKsBZB4ICGXt415XYJyv7+9O5TR4jDpPx47wA5 RKwQEFpTd+17fPQyZU33QEXJcRlA+yWqr6CGf2fuUMtSnul/zYEjoyEy5489uj364Ijf +pfjDJlpBK2EdjU/xl+TrpRhOTHerQd+yR6B/YDIRR5mPlUgDPIlfdCjcuDlVSxS6xOY +ehuXKQCDf6PoiLGXo+2gqvmteybEG1vIev/sNFxFazRr24bv5f8NZK6mprEURgqrsji WAVg== X-Gm-Message-State: AA+aEWbHojN0vpeQkm8gmxhnXRdd1UkcVp/6UGfVjx88yORZsaPvgxGX yvVgQw6c+3f1BO5MVj1hi7QU9Zw6QvoBlvX6BkFh9A== X-Received: by 2002:adf:a58a:: with SMTP id g10mr2306288wrc.3.1544199151934; Fri, 07 Dec 2018 08:12:31 -0800 (PST) MIME-Version: 1.0 References: <20181004133739.19086-1-mjourdan@baylibre.com> <491c3f33-b51b-89cb-09f0-b48949d61efb@xs4all.nl> In-Reply-To: From: Maxime Jourdan Date: Fri, 7 Dec 2018 17:12:20 +0100 Message-ID: Subject: Re: [PATCH] media: videodev2: add V4L2_FMT_FLAG_NO_SOURCE_CHANGE To: Hans Verkuil Cc: Tomasz Figa , 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 Hans, Tomasz, Sorry I missed your messages last week..! On Fri, Nov 30, 2018 at 8:35 AM Hans Verkuil wrote: > > On 11/29/2018 08:35 PM, Tomasz Figa wrote: > > 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? > > So basically it describes if a compressed format can handle resolution > changes for the given hardware? > Yes, exactly > If that's the case, then NO_SOURCE_CHANGE is not a good name as it > describes the symptom, not the real reason. > > Perhaps _FIXED_RESOLUTION might be a better name. > Fair point, I will update it as such. Next time, this patch will come in a series that uses the flag. Cheers, Maxime > Regards, > > Hans > > > > > 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 */ > >>> /* > >>> > >> >