From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AB8FC43215 for ; Thu, 14 Nov 2019 09:33:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 05EAB206C0 for ; Thu, 14 Nov 2019 09:33:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726717AbfKNJdB (ORCPT ); Thu, 14 Nov 2019 04:33:01 -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:: >