Commit 61da593f authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull media updates from Mauro Carvalho Chehab:

 - v4l core: subdev frame interval now supports which field

 - v4l kapi: moves and renames the init_cfg pad op to init_state as an
   internal op.

 - new sensor drivers: gc0308, gc2145, Avnet Alvium, ov64a40, tw9900

 - new camera driver: STM32 DCMIPP

 - s5p-mfc has gained MFC v12 support

 - new ISP driver added to staging: Starfive

 - new stateful encoder/decoded: Wave5 codec It is found on the J721S2
   SoC, JH7100 SoC, ssd202d SoC. Etc.

 - fwnode gained support for MIPI "DisCo for Imaging"
   (https://www.mipi.org/specifications/mipi-disco-imaging)

 - as usual, lots of cleanups, fixups and driver improvements.

* tag 'media/v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (309 commits)
  media: i2c: thp7312: select CONFIG_FW_LOADER
  media: i2c: mt9m114: use fsleep() in place of udelay()
  media: videobuf2: core: Rename min_buffers_needed field in vb2_queue
  media: i2c: thp7312: Store frame interval in subdev state
  media: docs: uAPI: Fix documentation of 'which' field for routing ioctls
  media: docs: uAPI: Expand error documentation for invalid 'which' value
  media: docs: uAPI: Clarify error documentation for invalid 'which' value
  media: v4l2-subdev: Store frame interval in subdev state
  media: v4l2-subdev: Add which field to struct v4l2_subdev_frame_interval
  media: v4l2-subdev: Turn .[gs]_frame_interval into pad operations
  media: v4l: subdev: Move out subdev state lock macros outside CONFIG_MEDIA_CONTROLLER
  media: s5p-mfc: DPB Count Independent of VIDIOC_REQBUF
  media: s5p-mfc: Load firmware for each run in MFCv12.
  media: s5p-mfc: Set context for valid case before calling try_run
  media: s5p-mfc: Add support for DMABUF for encoder
  media: s5p-mfc: Add support for UHD encoding.
  media: s5p-mfc: Add support for rate controls in MFCv12
  media: s5p-mfc: Add YV12 and I420 multiplanar format support
  media: s5p-mfc: Add initial support for MFCv12
  media: s5p-mfc: Rename IS_MFCV10 macro
  ...
parents a3cc31e7 60a031b6
Loading
Loading
Loading
Loading
+72 −0
Original line number Diff line number Diff line
.. SPDX-License-Identifier: GPL-2.0

.. include:: <isonum.txt>

================================
Starfive Camera Subsystem driver
================================

Introduction
------------

This file documents the driver for the Starfive Camera Subsystem found on
Starfive JH7110 SoC. The driver is located under drivers/staging/media/starfive/
camss.

The driver implements V4L2, Media controller and v4l2_subdev interfaces. Camera
sensor using V4L2 subdev interface in the kernel is supported.

The driver has been successfully used on the Gstreamer 1.18.5 with v4l2src
plugin.


Starfive Camera Subsystem hardware
----------------------------------

The Starfive Camera Subsystem hardware consists of::

                    |\         +---------------+      +-----------+
  +----------+      |  \       |               |      |           |
  |          |      |   |      |               |      |           |
  |   MIPI   |----->|   |----->|      ISP      |----->|           |
  |          |      |   |      |               |      |           |
  +----------+      |   |      |               |      |  Memory   |
                    |MUX|      +---------------+      | Interface |
  +----------+      |   |                             |           |
  |          |      |   |---------------------------->|           |
  | Parallel |----->|   |                             |           |
  |          |      |   |                             |           |
  +----------+      |  /                              |           |
                    |/                                +-----------+

- MIPI: The MIPI interface, receiving data from a MIPI CSI-2 camera sensor.

- Parallel: The parallel interface,  receiving data from a parallel sensor.

- ISP: The ISP, processing raw Bayer data from an image sensor and producing
  YUV frames.


Topology
--------

The media controller pipeline graph is as follows:

.. _starfive_camss_graph:

.. kernel-figure:: starfive_camss_graph.dot
    :alt:   starfive_camss_graph.dot
    :align: center

The driver has 2 video devices:

- capture_raw: The capture device, capturing image data directly from a sensor.
- capture_yuv: The capture device, capturing YUV frame data processed by the
  ISP module

The driver has 3 subdevices:

- stf_isp: is responsible for all the isp operations, outputs YUV frames.
- cdns_csi2rx: a CSI-2 bridge supporting up to 4 CSI lanes in input, and 4
  different pixel streams in output.
- imx219: an image sensor, image data is sent through MIPI CSI-2.
+12 −0
Original line number Diff line number Diff line
digraph board {
	rankdir=TB
	n00000001 [label="{{<port0> 0} | stf_isp\n/dev/v4l-subdev0 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
	n00000001:port1 -> n00000008 [style=dashed]
	n00000004 [label="capture_raw\n/dev/video0", shape=box, style=filled, fillcolor=yellow]
	n00000008 [label="capture_yuv\n/dev/video1", shape=box, style=filled, fillcolor=yellow]
	n0000000e [label="{{<port0> 0} | cdns_csi2rx.19800000.csi-bridge\n | {<port1> 1 | <port2> 2 | <port3> 3 | <port4> 4}}", shape=Mrecord, style=filled, fillcolor=green]
	n0000000e:port1 -> n00000001:port0 [style=dashed]
	n0000000e:port1 -> n00000004 [style=dashed]
	n00000018 [label="{{} | imx219 6-0010\n/dev/v4l-subdev1 | {<port0> 0}}", shape=Mrecord, style=filled, fillcolor=green]
	n00000018:port0 -> n0000000e:port0 [style=bold]
}
+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ Video4Linux (V4L) driver-specific documentation
	si470x
	si4713
	si476x
	starfive_camss
	vimc
	visl
	vivid
+2 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ The following codecs are supported:
- VP9
- H.264
- HEVC
- AV1

visl trace events
-----------------
@@ -79,6 +80,7 @@ The trace events are defined on a per-codec basis, e.g.:
.. code-block:: bash

        $ ls /sys/kernel/tracing/events/ | grep visl
        visl_av1_controls
        visl_fwht_controls
        visl_h264_controls
        visl_hevc_controls
+61 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/cnm,wave521c.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Chips&Media Wave 5 Series multi-standard codec IP

maintainers:
  - Nas Chung <nas.chung@chipsnmedia.com>
  - Jackson Lee <jackson.lee@chipsnmedia.com>

description:
  The Chips&Media WAVE codec IP is a multi format video encoder/decoder

properties:
  compatible:
    items:
      - enum:
          - ti,k3-j721s2-wave521c
      - const: cnm,wave521c

  reg:
    maxItems: 1

  clocks:
    items:
      - description: VCODEC clock

  interrupts:
    maxItems: 1

  power-domains:
    maxItems: 1

  resets:
    maxItems: 1

  sram:
    $ref: /schemas/types.yaml#/definitions/phandle
    description:
      The VPU uses the SRAM to store some of the reference data instead of
      storing it on DMA memory. It is mainly used for the purpose of reducing
      bandwidth.

required:
  - compatible
  - reg
  - clocks

additionalProperties: false

examples:
  - |
    vpu: video-codec@12345678 {
        compatible = "ti,k3-j721s2-wave521c", "cnm,wave521c";
        reg = <0x12345678 0x1000>;
        clocks = <&clks 42>;
        interrupts = <42>;
        sram = <&sram>;
    };
Loading