Skip to content

Commit

Permalink
Merge tag 'media/v5.1-2' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab:

 - remove the deprecated Zoran driver from staging

 - new I2C driver: ST MIPID02 CSI-2 camera bridge

 - new platform driver: Amlogic Meson AO CEC G12A Controller

 - add support for USB audio via the media controller

 - au0828 driver is now supported via the media controller on both on
   media and on usbaudio

 - new kernel test for the media device allocator

 - add support for stateless decoder at vicodec driver

 - lots of other driver improvements fixes and cleanups

* tag 'media/v5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (218 commits)
  media: dt-bindings: aspeed-video: Add missing memory-region property
  media: platform: Aspeed: Make reserved memory optional
  media: platform: Aspeed: Remove use of reset line
  media: stm32-dcmi: return appropriate error codes during probe
  media: vsp1: Add support for missing 16-bit RGB555 formats
  media: vsp1: Add support for missing 16-bit RGB444 formats
  media: vsp1: Add support for missing 32-bit RGB formats
  media: v4l: Add definitions for missing 16-bit RGB555 formats
  media: v4l: Add definitions for missing 16-bit RGB4444 formats
  media: v4l: Add definitions for missing 32-bit RGB formats
  media: zoran: remove deprecated driver
  media: MAINTAINERS: Update AO CEC with ao-cec-g12a driver
  media: platform: meson: Add Amlogic Meson G12A AO CEC Controller driver
  media: dt-bindings: media: meson-ao-cec: Add G12A AO-CEC-B Compatible
  media: cros-ec-cec: decrement HDMI device refcount
  media: seco-cec: decrement HDMI device refcount
  media: tegra_cec: use new cec_notifier_parse_hdmi_phandle helper
  media: stih_cec: use new cec_notifier_parse_hdmi_phandle helper
  media: s5p_cec: use new cec_notifier_parse_hdmi_phandle helper
  media: meson: ao-cec: use new cec_notifier_parse_hdmi_phandle helper
  ...
  • Loading branch information
Linus Torvalds committed May 8, 2019
2 parents 85c1a25 + 0d672ff commit e7a1414
Show file tree
Hide file tree
Showing 324 changed files with 7,625 additions and 13,909 deletions.
6 changes: 6 additions & 0 deletions Documentation/devicetree/bindings/media/aspeed-video.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Required properties:
the VE
- interrupts: the interrupt associated with the VE on this platform

Optional properties:
- memory-region:
phandle to a memory region to allocate from, as defined in
Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt

Example:

video-engine@1e700000 {
Expand All @@ -23,4 +28,5 @@ video-engine@1e700000 {
clock-names = "vclk", "eclk";
resets = <&syscon ASPEED_RESET_VIDEO>;
interrupts = <7>;
memory-region = <&video_engine_memory>;
};
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/media/cedrus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Required properties:
- "allwinner,sun8i-h3-video-engine"
- "allwinner,sun50i-a64-video-engine"
- "allwinner,sun50i-h5-video-engine"
- "allwinner,sun50i-h6-video-engine"
- reg : register base and length of VE;
- clocks : list of clock specifiers, corresponding to entries in
the clock-names property;
Expand Down
82 changes: 82 additions & 0 deletions Documentation/devicetree/bindings/media/i2c/st,st-mipid02.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
STMicroelectronics MIPID02 CSI-2 to PARALLEL bridge

MIPID02 has two CSI-2 input ports, only one of those ports can be active at a
time. Active port input stream will be de-serialized and its content outputted
through PARALLEL output port.
CSI-2 first input port is a dual lane 800Mbps per lane whereas CSI-2 second
input port is a single lane 800Mbps. Both ports support clock and data lane
polarity swap. First port also supports data lane swap.
PARALLEL output port has a maximum width of 12 bits.
Supported formats are RAW6, RAW7, RAW8, RAW10, RAW12, RGB565, RGB888, RGB444,
YUV420 8-bit, YUV422 8-bit and YUV420 10-bit.

Required Properties:
- compatible: shall be "st,st-mipid02"
- clocks: reference to the xclk input clock.
- clock-names: shall be "xclk".
- VDDE-supply: sensor digital IO supply. Must be 1.8 volts.
- VDDIN-supply: sensor internal regulator supply. Must be 1.8 volts.

Optional Properties:
- reset-gpios: reference to the GPIO connected to the xsdn pin, if any.
This is an active low signal to the mipid02.

Required subnodes:
- ports: A ports node with one port child node per device input and output
port, in accordance with the video interface bindings defined in
Documentation/devicetree/bindings/media/video-interfaces.txt. The
port nodes are numbered as follows:

Port Description
-----------------------------
0 CSI-2 first input port
1 CSI-2 second input port
2 PARALLEL output

Endpoint node required property for CSI-2 connection is:
- data-lanes: shall be <1> for Port 1. for Port 0 dual-lane operation shall be
<1 2> or <2 1>. For Port 0 single-lane operation shall be <1> or <2>.
Endpoint node optional property for CSI-2 connection is:
- lane-polarities: any lane can be inverted or not.

Endpoint node required property for PARALLEL connection is:
- bus-width: shall be set to <6>, <7>, <8>, <10> or <12>.
Endpoint node optional properties for PARALLEL connection are:
- hsync-active: active state of the HSYNC signal, 0/1 for LOW/HIGH respectively.
LOW being the default.
- vsync-active: active state of the VSYNC signal, 0/1 for LOW/HIGH respectively.
LOW being the default.

Example:

mipid02: csi2rx@14 {
compatible = "st,st-mipid02";
reg = <0x14>;
status = "okay";
clocks = <&clk_ext_camera_12>;
clock-names = "xclk";
VDDE-supply = <&vdd>;
VDDIN-supply = <&vdd>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;

ep0: endpoint {
data-lanes = <1 2>;
remote-endpoint = <&mipi_csi2_in>;
};
};
port@2 {
reg = <2>;

ep2: endpoint {
bus-width = <8>;
hsync-active = <0>;
vsync-active = <0>;
remote-endpoint = <&parallel_out>;
};
};
};
};
13 changes: 10 additions & 3 deletions Documentation/devicetree/bindings/media/meson-ao-cec.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,23 @@ The Amlogic Meson AO-CEC module is present is Amlogic SoCs and its purpose is
to handle communication between HDMI connected devices over the CEC bus.

Required properties:
- compatible : value should be following
- compatible : value should be following depending on the SoC :
For GXBB, GXL, GXM and G12A (AO_CEC_A module) :
"amlogic,meson-gx-ao-cec"
For G12A (AO_CEC_B module) :
"amlogic,meson-g12a-ao-cec"

- reg : Physical base address of the IP registers and length of memory
mapped region.

- interrupts : AO-CEC interrupt number to the CPU.
- clocks : from common clock binding: handle to AO-CEC clock.
- clock-names : from common clock binding: must contain "core",
corresponding to entry in the clocks property.
- clock-names : from common clock binding, must contain :
For GXBB, GXL, GXM and G12A (AO_CEC_A module) :
- "core"
For G12A (AO_CEC_B module) :
- "oscin"
corresponding to entry in the clocks property.
- hdmi-phandle: phandle to the HDMI controller

Example:
Expand Down
31 changes: 31 additions & 0 deletions Documentation/devicetree/bindings/media/rcar_imr.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Renesas R-Car Image Renderer (Distortion Correction Engine)
-----------------------------------------------------------

The image renderer, or the distortion correction engine, is a drawing processor
with a simple instruction system capable of referencing video capture data or
data in an external memory as 2D texture data and performing texture mapping
and drawing with respect to any shape that is split into triangular objects.

Required properties:

- compatible: "renesas,<soctype>-imr-lx4", "renesas,imr-lx4" as a fallback for
the image renderer light extended 4 (IMR-LX4) found in the R-Car gen3 SoCs,
where the examples with <soctype> are:
- "renesas,r8a7795-imr-lx4" for R-Car H3,
- "renesas,r8a7796-imr-lx4" for R-Car M3-W.
- reg: offset and length of the register block;
- interrupts: single interrupt specifier;
- clocks: single clock phandle/specifier pair;
- power-domains: power domain phandle/specifier pair;
- resets: reset phandle/specifier pair.

Example:

imr-lx4@fe860000 {
compatible = "renesas,r8a7795-imr-lx4", "renesas,imr-lx4";
reg = <0 0xfe860000 0 0x2000>;
interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 823>;
power-domains = <&sysc R8A7795_PD_A3VC>;
resets = <&cpg 823>;
};
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/media/rcar_vin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on Gen3 and RZ/G2 platforms to a CSI-2 receiver.
- "renesas,vin-r8a7743" for the R8A7743 device
- "renesas,vin-r8a7744" for the R8A7744 device
- "renesas,vin-r8a7745" for the R8A7745 device
- "renesas,vin-r8a774a1" for the R8A774A1 device
- "renesas,vin-r8a774c0" for the R8A774C0 device
- "renesas,vin-r8a7778" for the R8A7778 device
- "renesas,vin-r8a7779" for the R8A7779 device
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ R-Car VIN module, which provides the video capture capabilities.
Mandatory properties
--------------------
- compatible: Must be one or more of the following
- "renesas,r8a774a1-csi2" for the R8A774A1 device.
- "renesas,r8a774c0-csi2" for the R8A774C0 device.
- "renesas,r8a7795-csi2" for the R8A7795 device.
- "renesas,r8a7796-csi2" for the R8A7796 device.
Expand All @@ -18,7 +19,8 @@ Mandatory properties

- reg: the register base and size for the device registers
- interrupts: the interrupt for the device
- clocks: reference to the parent clock
- clocks: A phandle + clock specifier for the module clock
- resets: A phandle + reset specifier for the module reset

The device node shall contain two 'port' child nodes according to the
bindings defined in Documentation/devicetree/bindings/media/
Expand Down
2 changes: 1 addition & 1 deletion Documentation/media/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Linux Media Subsystem Documentation
v4l-drivers/index
cec-drivers/index

.. only:: subproject
.. only:: html and subproject

Indices
=======
Expand Down
41 changes: 41 additions & 0 deletions Documentation/media/kapi/mc-core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,51 @@ Subsystems should facilitate link validation by providing subsystem specific
helper functions to provide easy access for commonly needed information, and
in the end provide a way to use driver-specific callbacks.

Media Controller Device Allocator API
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

When the media device belongs to more than one driver, the shared media
device is allocated with the shared struct device as the key for look ups.

The shared media device should stay in registered state until the last
driver unregisters it. In addition, the media device should be released when
all the references are released. Each driver gets a reference to the media
device during probe, when it allocates the media device. If media device is
already allocated, the allocate API bumps up the refcount and returns the
existing media device. The driver puts the reference back in its disconnect
routine when it calls :c:func:`media_device_delete()`.

The media device is unregistered and cleaned up from the kref put handler to
ensure that the media device stays in registered state until the last driver
unregisters the media device.

**Driver Usage**

Drivers should use the appropriate media-core routines to manage the shared
media device life-time handling the two states:
1. allocate -> register -> delete
2. get reference to already registered device -> delete

call :c:func:`media_device_delete()` routine to make sure the shared media
device delete is handled correctly.

**driver probe:**
Call :c:func:`media_device_usb_allocate()` to allocate or get a reference
Call :c:func:`media_device_register()`, if media devnode isn't registered

**driver disconnect:**
Call :c:func:`media_device_delete()` to free the media_device. Freeing is
handled by the kref put handler.

API Definitions
^^^^^^^^^^^^^^^

.. kernel-doc:: include/media/media-device.h

.. kernel-doc:: include/media/media-devnode.h

.. kernel-doc:: include/media/media-entity.h

.. kernel-doc:: include/media/media-request.h

.. kernel-doc:: include/media/media-dev-allocator.h
1 change: 1 addition & 0 deletions Documentation/media/lirc.h.rst.exceptions
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ ignore symbol RC_PROTO_IMON
ignore symbol RC_PROTO_RCMM12
ignore symbol RC_PROTO_RCMM24
ignore symbol RC_PROTO_RCMM32
ignore symbol RC_PROTO_XBOX_DVD

# Undocumented macros

Expand Down
2 changes: 1 addition & 1 deletion Documentation/media/uapi/mediactl/request-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ A queued request cannot be modified anymore.
.. caution::
For :ref:`memory-to-memory devices <mem2mem>` you can use requests only for
output buffers, not for capture buffers. Attempting to add a capture buffer
to a request will result in an ``EACCES`` error.
to a request will result in an ``EBADR`` error.

If the request contains configurations for multiple entities, individual drivers
may synchronize so the requested pipeline's topology is applied before the
Expand Down
21 changes: 14 additions & 7 deletions Documentation/media/uapi/v4l/buffer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ of appropriately sized buffers for each use case).
struct v4l2_buffer
==================

.. tabularcolumns:: |p{2.8cm}|p{2.5cm}|p{1.3cm}|p{10.5cm}|
.. tabularcolumns:: |p{2.8cm}|p{2.5cm}|p{1.6cm}|p{10.2cm}|

.. cssclass:: longtable

Expand Down Expand Up @@ -326,7 +326,7 @@ struct v4l2_buffer
Applications should not set ``V4L2_BUF_FLAG_REQUEST_FD`` for any ioctls
other than :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`.

If the device does not support requests, then ``EACCES`` will be returned.
If the device does not support requests, then ``EBADR`` will be returned.
If requests are supported but an invalid request file descriptor is
given, then ``EINVAL`` will be returned.

Expand Down Expand Up @@ -420,7 +420,7 @@ enum v4l2_buf_type

.. cssclass:: longtable

.. tabularcolumns:: |p{7.2cm}|p{0.6cm}|p{9.7cm}|
.. tabularcolumns:: |p{7.8cm}|p{0.6cm}|p{9.1cm}|

.. flat-table::
:header-rows: 0
Expand Down Expand Up @@ -482,7 +482,11 @@ enum v4l2_buf_type
Buffer Flags
============

.. tabularcolumns:: |p{7.0cm}|p{2.2cm}|p{8.3cm}|
.. raw:: latex

\small

.. tabularcolumns:: |p{7.0cm}|p{2.1cm}|p{8.4cm}|

.. cssclass:: longtable

Expand Down Expand Up @@ -681,14 +685,17 @@ Buffer Flags
exposure of the frame has begun. This is only valid for the
``V4L2_BUF_TYPE_VIDEO_CAPTURE`` buffer type.

.. raw:: latex

\normalsize


.. c:type:: v4l2_memory
enum v4l2_memory
================

.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. tabularcolumns:: |p{5.0cm}|p{0.8cm}|p{11.7cm}|

.. flat-table::
:header-rows: 0
Expand Down Expand Up @@ -724,7 +731,7 @@ The :c:type:`v4l2_buffer_timecode` structure is designed to hold a
struct v4l2_timecode
--------------------

.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. tabularcolumns:: |p{1.4cm}|p{2.8cm}|p{12.3cm}|

.. flat-table::
:header-rows: 0
Expand Down Expand Up @@ -761,7 +768,7 @@ struct v4l2_timecode
Timecode Types
--------------

.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. tabularcolumns:: |p{5.6cm}|p{0.8cm}|p{11.1cm}|

.. flat-table::
:header-rows: 0
Expand Down
4 changes: 2 additions & 2 deletions Documentation/media/uapi/v4l/colorspaces-defs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ whole range, 0-255, dividing the angular value by 1.41. The enum
colorspaces except for BT.2020 which uses limited range R'G'B'
quantization.

.. tabularcolumns:: |p{6.0cm}|p{11.5cm}|
.. tabularcolumns:: |p{6.7cm}|p{10.8cm}|

.. c:type:: v4l2_colorspace
Expand Down Expand Up @@ -112,7 +112,7 @@ whole range, 0-255, dividing the angular value by 1.41. The enum

.. c:type:: v4l2_ycbcr_encoding
.. tabularcolumns:: |p{6.5cm}|p{11.0cm}|
.. tabularcolumns:: |p{7.2cm}|p{10.3cm}|

.. flat-table:: V4L2 Y'CbCr Encodings
:header-rows: 1
Expand Down
4 changes: 2 additions & 2 deletions Documentation/media/uapi/v4l/colorspaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ The Y value in the CIE XYZ colorspace corresponds to luminance. Often
the CIE XYZ colorspace is transformed to the normalized CIE xyY
colorspace:

x = X / (X + Y + Z)
x = X / (X + Y + Z)

y = Y / (X + Y + Z)
y = Y / (X + Y + Z)

The x and y values are the chromaticity coordinates and can be used to
define a color without the luminance component Y. It is very confusing
Expand Down
4 changes: 2 additions & 2 deletions Documentation/media/uapi/v4l/dev-raw-vbi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ VBI devices must implement both the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does.
:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is optional.

.. tabularcolumns:: |p{2.4cm}|p{4.4cm}|p{10.7cm}|
.. tabularcolumns:: |p{1.6cm}|p{4.2cm}|p{11.7cm}|

.. c:type:: v4l2_vbi_format
Expand Down Expand Up @@ -190,7 +190,7 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
applications must set it to zero.


.. tabularcolumns:: |p{4.0cm}|p{1.5cm}|p{12.0cm}|
.. tabularcolumns:: |p{4.4cm}|p{1.5cm}|p{11.6cm}|

.. _vbifmt-flags:

Expand Down
Loading

0 comments on commit e7a1414

Please sign in to comment.