Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3434851imu; Thu, 29 Nov 2018 23:37:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/XP+3f9xNPUIfGzYDNWuMtpEHLI8V/RSQthqTw1+YHNzo7+2Sbs1jH6VmFrYYZBsQF/w7oU X-Received: by 2002:a17:902:b40d:: with SMTP id x13mr4713834plr.237.1543563464821; Thu, 29 Nov 2018 23:37:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543563464; cv=none; d=google.com; s=arc-20160816; b=evvmn7kae8l/8rgj16RK8RM/UfCBz/6AWjL54QcX7XPwuhUY/22b559Xz+YhAdJ0rR mootLgWfRuF1CWAvHuOvsefOe6ULU4vCgUMinKDdcr4uHKae1IAz/CoOYtDqIAxQqXqc Cz/uNGwsTQUMrmghHk/oGeyuEUCrc36E2WCWSxC7Z3b1lHfJ1D/uNws17ltimVYo1OJx BgVltfhzz8+6aCQ3IqRgO24CtDyqrh0tqeyuEsWfiJBDAQRh7BWrZXXparKDk3oJrirQ wAIXrBJRsdq1Ydy6awqq5f3xSWPyxhWHIYymqa9LfLxmF1FqJTQc1vyrSlJ2jP4r9b+j DWkA== 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=99A/aqiSOvZL6ZSV4npo6J6Jwrf9gkO/oddT52RF9dI=; b=k/0mU6Pf2h2KCQK1qWakeeoJOo2G5qFtwboqBt28yQHywPR4zS2pqWNbVmEPebllhp MX/bzxvB0JVwQR0LSKEid52Hg4Qu7SbUQJUeM3kkIVodpEG4LdiZDH23pxG+7vxfxqQP idPVGscv0WXGLbtsTdB0nsdDvOfvKXIFYeCnJ7Gy9k6VrKuCqpRnK7SyAboZPa/YXaK/ T3vgaN5XOIHuLxC8lgfXwKiD7QJzAvPAKPsBPMHUQNuk8qT1JlyRWuT6zUH49Y8Yf4eh ilyD5gteWrpigATXyHtC4NkStPR2zfZBkMP5YMW9QKM9IbWI/nY5/MuIsNXnTVkd/G02 Qn/Q== 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 y12si4424060plk.174.2018.11.29.23.37.30; Thu, 29 Nov 2018 23:37:44 -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 S1726887AbeK3SoK (ORCPT + 99 others); Fri, 30 Nov 2018 13:44:10 -0500 Received: from lb2-smtp-cloud8.xs4all.net ([194.109.24.25]:42744 "EHLO lb2-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726386AbeK3SoK (ORCPT ); Fri, 30 Nov 2018 13:44:10 -0500 Received: from [192.168.2.10] ([212.251.195.8]) by smtp-cloud8.xs4all.net with ESMTPA id SdKwgWbB5EPjOSdKzgoxh5; Fri, 30 Nov 2018 08:35:45 +0100 Subject: Re: [PATCH] media: videodev2: add V4L2_FMT_FLAG_NO_SOURCE_CHANGE To: Tomasz Figa Cc: mjourdan@baylibre.com, Mauro Carvalho Chehab , Hans Verkuil , Linux Media Mailing List , Linux Kernel Mailing List References: <20181004133739.19086-1-mjourdan@baylibre.com> <491c3f33-b51b-89cb-09f0-b48949d61efb@xs4all.nl> From: Hans Verkuil Message-ID: Date: Fri, 30 Nov 2018 08:35:41 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfA/HisfaGESIRSY0UNBjPqBOm4y4s0af6YrX0+7+YHnjdnn+Rw377nKc8+s7XIm8qhiAmiUeMjtX1QgFTYnSv05mdjHZrlLiDEMl9FH5WflODFp8eIm6 MjDZtKhO+ZmzUE5ku+iBts6GUOarhYzXRgura30IGxHGAi5iyP2cBeGRxQyyn8QERbGERaurG9Ist4Sqbtk4KTks4szmRzOG6h6dh4MRfOwDgcNc3Db5KYvl QWm6gEBiev3lBJHNcr+8eZDNDS3ZogFB8KxBiPeAIinLW8KBlxDFcS5eBzzOJ+Df/B2vwJHttdcYy1Vze+j84R7m7gF07yRs84J1xlGpU4vU8GiYdxfmdzhU G0upTrOc Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? 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. 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 */ >>> /* >>> >>