Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2954974ybc; Thu, 14 Nov 2019 01:36:37 -0800 (PST) X-Google-Smtp-Source: APXvYqzJl40DDVvo+mQrEEhBuKw6sfln2WUQjevcsrgzGqXrhATuxcmPIfaA2hKef0n0CtDxkLc3 X-Received: by 2002:aa7:d4c6:: with SMTP id t6mr74063edr.228.1573724197601; Thu, 14 Nov 2019 01:36:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573724197; cv=none; d=google.com; s=arc-20160816; b=vnLQ4ptHEUyCYQ2BHRmy30a5k6AqLekhH9pCqIIl7EbP9xK7IZROPbydwJS13mbKl8 YAKVwcMFTi51EpykDbEOFYySGc6u5N0UGAiSuIXcDKVOWx8H6e3sb26OtdeJeyCqTkmU xeYIQ2qOObxDfBFSjP281y2isc2cl0LuH2GZqRiiHv33yQj/T3gXZCFQnGZlnrOqTfgf 67dB2sGwc/yybsuozvxlVIwyxxteX5f4O1MoO6LdDuYb0axL/6QR1j9HLJYE+noijClD dGGXF+v8Om+0cKeh+MlmgTtxLtFeS7raJYxiU9U/LHh9DkbnosX5OHNu/apuqXuw2s1S Avug== 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:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=6H2U9WcMboMAGIzN+kVfZzEhMxeQo09lRkzSZToRPns=; b=AjHcCIUEazGVIlK5BibfRY6OlV1UWcxPW3WuOuapAN5Ig4Lf5a7QBgJ1jbLEyAuyEz Wzu1NiV3Qk4Dz0wGYMEkui3HchkNyG0MXb2rYRpNc/64eg/ua9ew7jPCk/EGIxFioHyY m2n+21X9ljQq366IzYarUeYU0djUjx7HYjO6+NMI9P7TMaOO4IEV6YjaVbGFvBeEmg6L sCfn90iyuX4nTenz4vRQKIckpIfaEotHrHhoeHdS1Jth4NPsFcuJyt3fKG7aAkMxrpV0 tJ6YdtRk8xDULXG4r1DqsiwR1goesSRUdQ4Ej7Ub+8yev89WZ9I5Dy7YXtATPlELWG3S SD6w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si3858768edx.315.2019.11.14.01.36.12; Thu, 14 Nov 2019 01:36:37 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726678AbfKNJdA (ORCPT + 99 others); Thu, 14 Nov 2019 04:33:00 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:47038 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725977AbfKNJc7 (ORCPT ); Thu, 14 Nov 2019 04:32:59 -0500 Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 9CDF9291544; Thu, 14 Nov 2019 09:32:57 +0000 (GMT) Date: Thu, 14 Nov 2019 10:32:55 +0100 From: Boris Brezillon To: Ezequiel Garcia Cc: linux-media@vger.kernel.org, kernel@collabora.com, Tomasz Figa , linux-rockchip@lists.infradead.org, Heiko Stuebner , Jonas Karlman , Philipp Zabel , Chris Healy , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/3] media: vidioc-enum-fmt.rst: clarify format preference Message-ID: <20191114103255.0f14ce70@collabora.com> In-Reply-To: <20191113175603.24742-4-ezequiel@collabora.com> References: <20191113175603.24742-1-ezequiel@collabora.com> <20191113175603.24742-4-ezequiel@collabora.com> Organization: Collabora X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 13 Nov 2019 14:56:03 -0300 Ezequiel Garcia wrote: > It has been decided to use the ENUM_FMT index value > as a hint for driver preference. This is defined purposedly > in a very liberal way, letting drivers define what "preference" > means. > > For instance, the Hantro VPU driver indicates additional > processing to output a given format, and thus implicates > more CPU usage, which is enumerated after native (non-processed) > formats. > > Signed-off-by: Ezequiel Garcia Reviewed-by: Boris Brezillon > --- > Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst > index 399ef1062bac..8ca6ab701e4a 100644 > --- a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst > +++ b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst > @@ -44,7 +44,9 @@ To enumerate image formats applications initialize the ``type`` and > the :ref:`VIDIOC_ENUM_FMT` ioctl with a pointer to this structure. Drivers > fill the rest of the structure or return an ``EINVAL`` error code. All > formats are enumerable by beginning at index zero and incrementing by > -one until ``EINVAL`` is returned. > +one until ``EINVAL`` is returned. If applicable, drivers shall return > +formats in preference order, where preferred formats are returned before > +(that is, with lower ``index`` value) less-preferred formats. > > .. note:: >