]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
media: vidioc-enum-fmt.rst: clarify format preference
authorEzequiel Garcia <ezequiel@collabora.com>
Thu, 5 Dec 2019 14:24:40 +0000 (15:24 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 16 Dec 2019 09:24:55 +0000 (10:24 +0100)
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 <ezequiel@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Documentation/media/uapi/v4l/vidioc-enum-fmt.rst

index 399ef1062bacb4abc43c741a6bc7bda5ae90e9f8..8ca6ab701e4ab99c1847237e88e9caaa8c518eec 100644 (file)
@@ -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::