summaryrefslogtreecommitdiff
path: root/Documentation/userspace-api/media
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-11 12:20:25 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-11 12:20:25 -0800
commitb7ef56a07672e0d7ebe71c9d9b45f959f0c2f8e8 (patch)
tree47c65da1d9c6514bc74df8b86c29fb87313ca3fe /Documentation/userspace-api/media
parentd061251387903e8502843ac983553f0b2e098ef8 (diff)
parentc824345288d11e269ce41b36c105715bc2286050 (diff)
Merge tag 'media/v7.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab: - Add support for GMSL1 and GMSL‑coax modules (PCI mgb4) - Add driver for TI VIP - AV1 – first kernel support (pixel‑format, decoder, transcoder) - Three new camera‑sensor drivers (os05b10, s5k3m5, s5kjn1) - Synopsys CSI‑2 receiver driver - Verisilicon & rkvdec – major fixes and enhancements - IPU6 (and 7) fixes and preparation for metadata - omap3isp: v4l2-compliance updates - Fix DVB streaming, drop wait_prepare/finish (dvb/vb2) * tag 'media/v7.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (307 commits) media: uvcvideo: Pass allocation size directly to uvc_alloc_urb_buffer media: uvcvideo: Fix allocation for small frame sizes media: uvcvideo: Return queued buffers on start_streaming() failure media: uvcvideo: Create an ID namespace for streaming output terminals media: rkvdec: Add HEVC support for the VDPU383 variant media: rkvdec: Add HEVC support for the VDPU381 variant media: rkvdec: Add H264 support for the VDPU383 variant media: rkvdec: Add H264 support for the VDPU381 variant media: rkvdec: Disable multicore support media: rkvdec: Enable all clocks without naming them media: rkvdec: Support per-variant interrupt handler media: rkvdec: Add RCB and SRAM support media: rkvdec: Add variant specific coded formats list media: rkvdec: Move hevc functions to common file media: rkvdec: Move h264 functions to common file media: rkvdec: Use structs to represent the HW RPS media: rkvdec: Move cabac tables to their own source file media: rkvdec: Switch to using structs instead of writel media: visl: Add HEVC short and long term RPS sets media: v4l2-ctrls: Add hevc_ext_sps_[ls]t_rps controls ...
Diffstat (limited to 'Documentation/userspace-api/media')
-rw-r--r--Documentation/userspace-api/media/conf_nitpick.py2
-rw-r--r--Documentation/userspace-api/media/v4l/dev-decoder.rst5
-rw-r--r--Documentation/userspace-api/media/v4l/dev-raw-vbi.rst6
-rw-r--r--Documentation/userspace-api/media/v4l/dev-subdev.rst17
-rw-r--r--Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst120
-rw-r--r--Documentation/userspace-api/media/v4l/ext-ctrls-flash.rst42
-rw-r--r--Documentation/userspace-api/media/v4l/pixfmt-compressed.rst8
-rw-r--r--Documentation/userspace-api/media/v4l/subdev-formats.rst2
-rw-r--r--Documentation/userspace-api/media/v4l/videodev2.h.rst.exceptions2
-rw-r--r--Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst12
-rw-r--r--Documentation/userspace-api/media/v4l/vidioc-subdev-g-routing.rst9
11 files changed, 208 insertions, 17 deletions
diff --git a/Documentation/userspace-api/media/conf_nitpick.py b/Documentation/userspace-api/media/conf_nitpick.py
index 0a8e236d07ab..445a29c01d1b 100644
--- a/Documentation/userspace-api/media/conf_nitpick.py
+++ b/Documentation/userspace-api/media/conf_nitpick.py
@@ -42,8 +42,6 @@ nitpick_ignore = [
("c:func", "struct fd_set"),
("c:func", "struct pollfd"),
("c:func", "usb_make_path"),
- ("c:func", "wait_finish"),
- ("c:func", "wait_prepare"),
("c:func", "write"),
("c:type", "atomic_t"),
diff --git a/Documentation/userspace-api/media/v4l/dev-decoder.rst b/Documentation/userspace-api/media/v4l/dev-decoder.rst
index eb662ced0ab4..2beb6ba1b3c2 100644
--- a/Documentation/userspace-api/media/v4l/dev-decoder.rst
+++ b/Documentation/userspace-api/media/v4l/dev-decoder.rst
@@ -933,7 +933,10 @@ reflected by corresponding queries):
* the minimum number of buffers needed for decoding,
-* bit-depth of the bitstream has been changed.
+* bit-depth of the bitstream has been changed,
+
+* colorspace of the bitstream has been changed, but it doesn't require
+ buffer reallocation.
Whenever that happens, the decoder must proceed as follows:
diff --git a/Documentation/userspace-api/media/v4l/dev-raw-vbi.rst b/Documentation/userspace-api/media/v4l/dev-raw-vbi.rst
index 2bec20d87928..1f7bb8fd15e7 100644
--- a/Documentation/userspace-api/media/v4l/dev-raw-vbi.rst
+++ b/Documentation/userspace-api/media/v4l/dev-raw-vbi.rst
@@ -221,7 +221,7 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
:alt: vbi_hsync.svg
:align: center
- **Figure 4.1. Line synchronization**
+ Line synchronization
.. _vbi-525:
@@ -229,7 +229,7 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
:alt: vbi_525.svg
:align: center
- **Figure 4.2. ITU-R 525 line numbering (M/NTSC and M/PAL)**
+ ITU-R 525 line numbering (M/NTSC and M/PAL)
.. _vbi-625:
@@ -237,7 +237,7 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
:alt: vbi_625.svg
:align: center
- **Figure 4.3. ITU-R 625 line numbering**
+ ITU-R 625 line numbering
Remember the VBI image format depends on the selected video standard,
therefore the application must choose a new standard or query the
diff --git a/Documentation/userspace-api/media/v4l/dev-subdev.rst b/Documentation/userspace-api/media/v4l/dev-subdev.rst
index 2530170a56ae..142e2cd95062 100644
--- a/Documentation/userspace-api/media/v4l/dev-subdev.rst
+++ b/Documentation/userspace-api/media/v4l/dev-subdev.rst
@@ -460,7 +460,7 @@ selection will refer to the sink pad format dimensions instead.
:alt: subdev-image-processing-crop.svg
:align: center
- **Figure 4.5. Image processing in subdevs: simple crop example**
+ Image processing in subdevs: simple crop example
In the above example, the subdev supports cropping on its sink pad. To
configure it, the user sets the media bus format on the subdev's sink
@@ -477,7 +477,7 @@ pad.
:alt: subdev-image-processing-scaling-multi-source.svg
:align: center
- **Figure 4.6. Image processing in subdevs: scaling with multiple sources**
+ Image processing in subdevs: scaling with multiple sources
In this example, the subdev is capable of first cropping, then scaling
and finally cropping for two source pads individually from the resulting
@@ -493,7 +493,7 @@ an area at location specified by the source crop rectangle from it.
:alt: subdev-image-processing-full.svg
:align: center
- **Figure 4.7. Image processing in subdevs: scaling and composition with multiple sinks and sources**
+ Image processing in subdevs: scaling and composition with multiple sinks and sources
The subdev driver supports two sink pads and two source pads. The images
from both of the sink pads are individually cropped, then scaled and
@@ -578,15 +578,14 @@ Device types and routing setup
Different kinds of sub-devices have differing behaviour for route activation,
depending on the hardware. In all cases, however, only routes that have the
-``V4L2_SUBDEV_STREAM_FL_ACTIVE`` flag set are active.
+``V4L2_SUBDEV_ROUTE_FL_ACTIVE`` flag set are active.
Devices generating the streams may allow enabling and disabling some of the
routes or have a fixed routing configuration. If the routes can be disabled, not
-declaring the routes (or declaring them without
-``V4L2_SUBDEV_STREAM_FL_ACTIVE`` flag set) in ``VIDIOC_SUBDEV_S_ROUTING`` will
-disable the routes. ``VIDIOC_SUBDEV_S_ROUTING`` will still return such routes
-back to the user in the routes array, with the ``V4L2_SUBDEV_STREAM_FL_ACTIVE``
-flag unset.
+declaring the routes (or declaring them without ``V4L2_SUBDEV_ROUTE_FL_ACTIVE``
+flag set) in ``VIDIOC_SUBDEV_S_ROUTING`` will disable the routes.
+``VIDIOC_SUBDEV_S_ROUTING`` will still return such routes back to the user in
+the routes array, with the ``V4L2_SUBDEV_ROUTE_FL_ACTIVE`` flag unset.
Devices transporting the streams almost always have more configurability with
respect to routing. Typically any route between the sub-device's sink and source
diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst
index 497ae74379f6..3b1e05c6eb13 100644
--- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst
+++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst
@@ -2959,6 +2959,126 @@ This structure contains all loop filter related parameters. See sections
- 0x00000004
-
+``V4L2_CID_STATELESS_HEVC_EXT_SPS_LT_RPS (struct)``
+ Subset of the :c:type:`v4l2_ctrl_hevc_sps` control.
+ It extends it with the list of Long-term reference sets parameters.
+ These parameters are defined according to :ref:`hevc`.
+ They are described in section 7.4.3.2.1 "General sequence parameter set
+ RBSP semantics" of the specification.
+ This control is a dynamically sized 1-dimensional array.
+ The values in the array should be ignored when either
+ num_long_term_ref_pics_sps is 0 or the
+ V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT flag is not set in
+ :c:type:`v4l2_ctrl_hevc_sps`.
+
+.. c:type:: v4l2_ctrl_hevc_ext_sps_lt_rps
+
+.. cssclass:: longtable
+
+.. flat-table:: struct v4l2_ctrl_hevc_ext_sps_lt_rps
+ :header-rows: 0
+ :stub-columns: 0
+ :widths: 1 1 2
+
+ * - __u16
+ - ``lt_ref_pic_poc_lsb_sps``
+ - Long term reference picture order count as described in section 7.4.3.2.1
+ "General sequence parameter set RBSP semantics" of the specification.
+ * - __u16
+ - ``flags``
+ - See :ref:`Extended Long-Term RPS Flags <hevc_ext_sps_lt_rps_flags>`
+
+.. _hevc_ext_sps_lt_rps_flags:
+
+``Extended SPS Long-Term RPS Flags``
+
+.. cssclass:: longtable
+
+.. flat-table::
+ :header-rows: 0
+ :stub-columns: 0
+ :widths: 1 1 2
+
+ * - ``V4L2_HEVC_EXT_SPS_LT_RPS_FLAG_USED_LT``
+ - 0x00000001
+ - Specifies if the long-term reference picture is used 7.4.3.2.1 "General sequence parameter
+ set RBSP semantics" of the specification.
+
+``V4L2_CID_STATELESS_HEVC_EXT_SPS_ST_RPS (struct)``
+ Subset of the :c:type:`v4l2_ctrl_hevc_sps` control.
+ It extends it with the list of Short-term reference sets parameters.
+ These parameters are defined according to :ref:`hevc`.
+ They are described in section 7.4.8 "Short-term reference picture set
+ semantics" of the specification.
+ This control is a dynamically sized 1-dimensional array.
+ The values in the array should be ignored when
+ num_short_term_ref_pic_sets is 0.
+
+.. c:type:: v4l2_ctrl_hevc_ext_sps_st_rps
+
+.. cssclass:: longtable
+
+.. flat-table:: struct v4l2_ctrl_hevc_ext_sps_st_rps
+ :header-rows: 0
+ :stub-columns: 0
+ :widths: 1 1 2
+
+ * - __u8
+ - ``delta_idx_minus1``
+ - Specifies the delta compare to the index. See details in section 7.4.8 "Short-term
+ reference picture set semantics" of the specification.
+ * - __u8
+ - ``delta_rps_sign``
+ - Sign of the delta as specified in section 7.4.8 "Short-term reference picture set
+ semantics" of the specification.
+ * - __u8
+ - ``num_negative_pics``
+ - Number of short-term RPS entries that have picture order count values less than the
+ picture order count value of the current picture.
+ * - __u8
+ - ``num_positive_pics``
+ - Number of short-term RPS entries that have picture order count values greater than the
+ picture order count value of the current picture.
+ * - __u32
+ - ``used_by_curr_pic``
+ - Bit i specifies if short-term RPS i is used by the current picture.
+ * - __u32
+ - ``use_delta_flag``
+ - Bit i specifies if short-term RPS i is included in the short-term RPS entries.
+ * - __u16
+ - ``abs_delta_rps_minus1``
+ - Absolute delta RPS as specified in section 7.4.8 "Short-term reference picture set
+ semantics" of the specification.
+ * - __u16
+ - ``delta_poc_s0_minus1[16]``
+ - Specifies the negative picture order count delta for the i-th entry in the short-term RPS.
+ See details in section 7.4.8 "Short-term reference picture set semantics" of the
+ specification.
+ * - __u16
+ - ``delta_poc_s1_minus1[16]``
+ - Specifies the positive picture order count delta for the i-th entry in the short-term RPS.
+ See details in section 7.4.8 "Short-term reference picture set semantics" of the
+ specification.
+ * - __u16
+ - ``flags``
+ - See :ref:`Extended Short-Term RPS Flags <hevc_ext_sps_st_rps_flags>`
+
+.. _hevc_ext_sps_st_rps_flags:
+
+``Extended SPS Short-Term RPS Flags``
+
+.. cssclass:: longtable
+
+.. flat-table::
+ :header-rows: 0
+ :stub-columns: 0
+ :widths: 1 1 2
+
+ * - ``V4L2_HEVC_EXT_SPS_ST_RPS_FLAG_INTER_REF_PIC_SET_PRED``
+ - 0x00000001
+ - Specifies if the short-term RPS is predicted from another short term RPS. See details in
+ section 7.4.8 "Short-term reference picture set semantics" of the specification.
+
.. _v4l2-codec-stateless-av1:
``V4L2_CID_STATELESS_AV1_SEQUENCE (struct)``
diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-flash.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-flash.rst
index bd024ab461a4..b7f45fc0a797 100644
--- a/Documentation/userspace-api/media/v4l/ext-ctrls-flash.rst
+++ b/Documentation/userspace-api/media/v4l/ext-ctrls-flash.rst
@@ -58,6 +58,8 @@ Flash Control IDs
``V4L2_CID_FLASH_CLASS (class)``
The FLASH class descriptor.
+.. _v4l2-cid-flash-led-mode:
+
``V4L2_CID_FLASH_LED_MODE (menu)``
Defines the mode of the flash LED, the high-power white LED attached
to the flash controller. Setting this control may not be possible in
@@ -81,6 +83,8 @@ Flash Control IDs
+.. _v4l2-cid-flash-strobe-source:
+
``V4L2_CID_FLASH_STROBE_SOURCE (menu)``
Defines the source of the flash LED strobe.
@@ -97,6 +101,12 @@ Flash Control IDs
- The flash strobe is triggered by an external source. Typically
this is a sensor, which makes it possible to synchronise the
flash strobe start to exposure start.
+ This method of controlling flash LED strobe has two additional
+ prerequisites: the strobe source's :ref:`strobe output
+ <v4l2-cid-flash-strobe-oe>` must be enabled (if available)
+ and the flash controller's :ref:`flash LED mode
+ <v4l2-cid-flash-led-mode>` must be set to
+ ``V4L2_FLASH_LED_MODE_FLASH``.
@@ -187,3 +197,35 @@ Flash Control IDs
charged before strobing. LED flashes often require a cooldown period
after strobe during which another strobe will not be possible. This
is a read-only control.
+
+.. _v4l2-cid-flash-duration:
+
+``V4L2_CID_FLASH_DURATION (integer)``
+ Duration of the flash strobe pulse generated by the strobe source, when
+ using external strobe. This control shall be implemented by the device
+ generating the hardware flash strobe signal, typically a camera sensor,
+ connected to a flash controller.
+
+ The flash controllers :ref:`strobe source <v4l2-cid-flash-strobe-source>`
+ must be configured to ``V4L2_FLASH_STROBE_SOURCE_EXTERNAL`` for this
+ mode of operation. For more details please also take a look at the
+ documentation there.
+
+ The unit should be microseconds (µs) if possible.
+
+.. _v4l2-cid-flash-strobe-oe:
+
+``V4L2_CID_FLASH_STROBE_OE (boolean)``
+ Enables the output of a hardware strobe signal from the strobe source,
+ when using external strobe. This control shall be implemented by the device
+ generating the hardware flash strobe signal, typically a camera sensor,
+ connected to a flash controller.
+
+ Provided the signal generating device driver supports it, the length of the
+ strobe signal can be configured by adjusting its
+ :ref:`flash duration <v4l2-cid-flash-duration>`.
+
+ The flash controllers :ref:`strobe source <v4l2-cid-flash-strobe-source>`
+ must be configured to ``V4L2_FLASH_STROBE_SOURCE_EXTERNAL`` for this
+ mode of operation. For more details please also take a look at the
+ documentation there.
diff --git a/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst b/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
index c7efb0465db6..235f955d3cd5 100644
--- a/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
+++ b/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
@@ -275,6 +275,14 @@ Compressed Formats
of macroblocks to decode a full corresponding frame to the matching
capture buffer.
+ * .. _V4L2-PIX-FMT-AV1:
+
+ - ``V4L2_PIX_FMT_AV1``
+ - 'AV01'
+ - AV1 compressed video frame. This format is adapted for implementing AV1
+ pipeline. The decoder implements stateful video decoder and expects one
+ temporal unit per buffer in OBU stream format.
+ The encoder generates one Temporal Unit per buffer.
.. raw:: latex
\normalsize
diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst
index cf970750dd4c..896177c5334f 100644
--- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
+++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
@@ -2800,7 +2800,7 @@ be named ``MEDIA_BUS_FMT_SRGGB10_2X8_PADHI_LE``.
:alt: bayer.svg
:align: center
- **Figure 4.8 Bayer Patterns**
+ Bayer Patterns
The following table lists existing packed Bayer formats. The data
organization is given as an example for the first pixel only.
diff --git a/Documentation/userspace-api/media/v4l/videodev2.h.rst.exceptions b/Documentation/userspace-api/media/v4l/videodev2.h.rst.exceptions
index c41693115db6..6182b4e2d2ee 100644
--- a/Documentation/userspace-api/media/v4l/videodev2.h.rst.exceptions
+++ b/Documentation/userspace-api/media/v4l/videodev2.h.rst.exceptions
@@ -150,6 +150,8 @@ replace symbol V4L2_CTRL_TYPE_H264_SCALING_MATRIX :c:type:`V4L.v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_H264_PRED_WEIGHTS :c:type:`V4L.v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_H264_SLICE_PARAMS :c:type:`V4L.v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_H264_DECODE_PARAMS :c:type:`V4L.v4l2_ctrl_type`
+replace symbol V4L2_CTRL_TYPE_HEVC_EXT_SPS_ST_RPS :c:type:`V4L.v4l2_ctrl_type`
+replace symbol V4L2_CTRL_TYPE_HEVC_EXT_SPS_LT_RPS :c:type:`V4L.v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_HEVC_SPS :c:type:`V4L.v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_HEVC_PPS :c:type:`V4L.v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS :c:type:`V4L.v4l2_ctrl_type`
diff --git a/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst b/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
index c8baa9430c14..82c8b52e771c 100644
--- a/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
+++ b/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
@@ -531,6 +531,18 @@ See also the examples in :ref:`control`.
- n/a
- A struct :c:type:`v4l2_ctrl_hevc_decode_params`, containing HEVC
decoding parameters for stateless video decoders.
+ * - ``V4L2_CTRL_TYPE_HEVC_EXT_SPS_LT_RPS``
+ - n/a
+ - n/a
+ - n/a
+ - A struct :c:type:`v4l2_ctrl_hevc_ext_sps_lt_rps`, containing HEVC
+ extended Long-Term RPS for stateless video decoders.
+ * - ``V4L2_CTRL_TYPE_HEVC_EXT_SPS_ST_RPS``
+ - n/a
+ - n/a
+ - n/a
+ - A struct :c:type:`v4l2_ctrl_hevc_ext_sps_st_rps`, containing HEVC
+ extended Short-Term RPS for stateless video decoders.
* - ``V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR``
- n/a
- n/a
diff --git a/Documentation/userspace-api/media/v4l/vidioc-subdev-g-routing.rst b/Documentation/userspace-api/media/v4l/vidioc-subdev-g-routing.rst
index 1cf795480602..6f66ca38589e 100644
--- a/Documentation/userspace-api/media/v4l/vidioc-subdev-g-routing.rst
+++ b/Documentation/userspace-api/media/v4l/vidioc-subdev-g-routing.rst
@@ -157,7 +157,14 @@ appropriately. The generic error codes are described at the
EINVAL
The sink or source pad identifiers reference a non-existing pad or reference
pads of different types (ie. the sink_pad identifiers refers to a source
- pad), or the ``which`` field has an unsupported value.
+ pad), the ``which`` field has an unsupported value, or, for
+ ``VIDIOC_SUBDEV_S_ROUTING``, the num_routes field set by the application is
+ larger than the len_routes field value.
+
+ENXIO
+ The application requested routes cannot be created or the state of
+ the specified routes cannot be modified. Only returned for
+ ``VIDIOC_SUBDEV_S_ROUTING``.
E2BIG
The application provided ``num_routes`` for ``VIDIOC_SUBDEV_S_ROUTING`` is