Skip to content

Commit

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

Pull media updates from Mauro Carvalho Chehab:

 - Documentation for digital TV (both kAPI and uAPI) are now in sync
   with the implementation (except for legacy/deprecated ioctls). This
   is a major step, as there were always a gap there

 - New sensor driver: imx274

 - New cec driver: cec-gpio

 - New platform driver for rockship rga and tegra CEC

 - New RC driver: tango-ir

 - Several cleanups at atomisp driver

 - Core improvements for RC, CEC, V4L2 async probing support and DVB

 - Lots of drivers cleanup, fixes and improvements.

* tag 'media/v4.15-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (332 commits)
  dvb_frontend: don't use-after-free the frontend struct
  media: dib0700: fix invalid dvb_detach argument
  media: v4l2-ctrls: Don't validate BITMASK twice
  media: s5p-mfc: fix lockdep warning
  media: dvb-core: always call invoke_release() in fe_free()
  media: usb: dvb-usb-v2: dvb_usb_core: remove redundant code in dvb_usb_fe_sleep
  media: au0828: make const array addr_list static
  media: cx88: make const arrays default_addr_list and pvr2000_addr_list static
  media: drxd: make const array fastIncrDecLUT static
  media: usb: fix spelling mistake: "synchronuously" -> "synchronously"
  media: ddbridge: fix build warnings
  media: av7110: avoid 2038 overflow in debug print
  media: Don't do DMA on stack for firmware upload in the AS102 driver
  media: v4l: async: fix unregister for implicitly registered sub-device notifiers
  media: v4l: async: fix return of unitialized variable ret
  media: imx274: fix missing return assignment from call to imx274_mode_regs
  media: camss-vfe: always initialize reg at vfe_set_xbar_cfg()
  media: atomisp: make function calls cleaner
  media: atomisp: get rid of storage_class.h
  media: atomisp: get rid of wrong stddef.h include
  ...
  • Loading branch information
torvalds committed Nov 16, 2017
2 parents 93ea0eb + f2ecc3d commit 5d352e6
Show file tree
Hide file tree
Showing 498 changed files with 12,046 additions and 22,609 deletions.
32 changes: 32 additions & 0 deletions Documentation/devicetree/bindings/media/cec-gpio.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
* HDMI CEC GPIO driver

The HDMI CEC GPIO module supports CEC implementations where the CEC line
is hooked up to a pull-up GPIO line and - optionally - the HPD line is
hooked up to another GPIO line.

Required properties:
- compatible: value must be "cec-gpio".
- cec-gpios: gpio that the CEC line is connected to. The line should be
tagged as open drain.

If the CEC line is associated with an HDMI receiver/transmitter, then the
following property is also required:

- hdmi-phandle - phandle to the HDMI controller, see also cec.txt.

If the CEC line is not associated with an HDMI receiver/transmitter, then
the following property is optional:

- hpd-gpios: gpio that the HPD line is connected to.

Example for the Raspberry Pi 3 where the CEC line is connected to
pin 26 aka BCM7 aka CE1 on the GPIO pin header and the HPD line is
connected to pin 11 aka BCM17:

#include <dt-bindings/gpio/gpio.h>

cec-gpio {
compatible = "cec-gpio";
cec-gpios = <&gpio 7 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
hpd-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
};
9 changes: 6 additions & 3 deletions Documentation/devicetree/bindings/media/exynos5-gsc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
G-Scaler is used for scaling and color space conversion on EXYNOS5 SoCs.

Required properties:
- compatible: should be "samsung,exynos5-gsc" (for Exynos 5250, 5420 and
5422 SoCs) or "samsung,exynos5433-gsc" (Exynos 5433)
- compatible: should be one of
"samsung,exynos5250-gsc"
"samsung,exynos5420-gsc"
"samsung,exynos5433-gsc"
"samsung,exynos5-gsc" (deprecated)
- reg: should contain G-Scaler physical address location and length.
- interrupts: should contain G-Scaler interrupt number

Expand All @@ -15,7 +18,7 @@ Optional properties:
Example:

gsc_0: gsc@0x13e00000 {
compatible = "samsung,exynos5-gsc";
compatible = "samsung,exynos5250-gsc";
reg = <0x13e00000 0x1000>;
interrupts = <0 85 0>;
};
Expand Down
33 changes: 33 additions & 0 deletions Documentation/devicetree/bindings/media/i2c/imx274.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
* Sony 1/2.5-Inch 8.51Mp CMOS Digital Image Sensor

The Sony imx274 is a 1/2.5-inch CMOS active pixel digital image sensor with
an active array size of 3864H x 2202V. It is programmable through I2C
interface. The I2C address is fixed to 0x1a as per sensor data sheet.
Image data is sent through MIPI CSI-2, which is configured as 4 lanes
at 1440 Mbps.


Required Properties:
- compatible: value should be "sony,imx274" for imx274 sensor
- reg: I2C bus address of the device

Optional Properties:
- reset-gpios: Sensor reset GPIO

The imx274 device node should contain one 'port' child node with
an 'endpoint' subnode. For further reading on port node refer to
Documentation/devicetree/bindings/media/video-interfaces.txt.

Example:
sensor@1a {
compatible = "sony,imx274";
reg = <0x1a>;
#address-cells = <1>;
#size-cells = <0>;
reset-gpios = <&gpio_sensor 0 0>;
port {
sensor_out: endpoint {
remote-endpoint = <&csiss_in>;
};
};
};
2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/media/i2c/nokia,smia.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Optional properties
- nokia,nvm-size: The size of the NVM, in bytes. If the size is not given,
the NVM contents will not be read.
- reset-gpios: XSHUTDOWN GPIO
- flash-leds: See ../video-interfaces.txt
- lens-focus: See ../video-interfaces.txt


Endpoint node mandatory properties
Expand Down
33 changes: 33 additions & 0 deletions Documentation/devicetree/bindings/media/rockchip-rga.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
device-tree bindings for rockchip 2D raster graphic acceleration controller (RGA)

RGA is a standalone 2D raster graphic acceleration unit. It accelerates 2D
graphics operations, such as point/line drawing, image scaling, rotation,
BitBLT, alpha blending and image blur/sharpness.

Required properties:
- compatible: value should be one of the following
"rockchip,rk3288-rga";
"rockchip,rk3399-rga";

- interrupts: RGA interrupt specifier.

- clocks: phandle to RGA sclk/hclk/aclk clocks

- clock-names: should be "aclk", "hclk" and "sclk"

- resets: Must contain an entry for each entry in reset-names.
See ../reset/reset.txt for details.
- reset-names: should be "core", "axi" and "ahb"

Example:
SoC-specific DT entry:
rga: rga@ff680000 {
compatible = "rockchip,rk3399-rga";
reg = <0xff680000 0x10000>;
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA_CORE>;
clock-names = "aclk", "hclk", "sclk";

resets = <&cru SRST_RGA_CORE>, <&cru SRST_A_RGA>, <&cru SRST_H_RGA>;
reset-names = "core, "axi", "ahb";
};
21 changes: 21 additions & 0 deletions Documentation/devicetree/bindings/media/tango-ir.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Sigma Designs Tango IR NEC/RC-5/RC-6 decoder (SMP86xx and SMP87xx)

Required properties:

- compatible: "sigma,smp8642-ir"
- reg: address/size of NEC+RC5 area, address/size of RC6 area
- interrupts: spec for IR IRQ
- clocks: spec for IR clock (typically the crystal oscillator)

Optional properties:

- linux,rc-map-name: see Documentation/devicetree/bindings/media/rc.txt

Example:

ir@10518 {
compatible = "sigma,smp8642-ir";
reg = <0x10518 0x18>, <0x105e0 0x1c>;
interrupts = <21 IRQ_TYPE_EDGE_RISING>;
clocks = <&xtal>;
};
27 changes: 27 additions & 0 deletions Documentation/devicetree/bindings/media/tegra-cec.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
* Tegra HDMI CEC hardware

The HDMI CEC module is present in Tegra SoCs and its purpose is to
handle communication between HDMI connected devices over the CEC bus.

Required properties:
- compatible : value should be one of the following:
"nvidia,tegra114-cec"
"nvidia,tegra124-cec"
"nvidia,tegra210-cec"
- reg : Physical base address of the IP registers and length of memory
mapped region.
- interrupts : HDMI CEC interrupt number to the CPU.
- clocks : from common clock binding: handle to HDMI CEC clock.
- clock-names : from common clock binding: must contain "cec",
corresponding to the entry in the clocks property.
- hdmi-phandle : phandle to the HDMI controller, see also cec.txt.

Example:

cec@70015000 {
compatible = "nvidia,tegra124-cec";
reg = <0x0 0x70015000 0x0 0x00001000>;
interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA124_CLK_CEC>;
clock-names = "cec";
};
24 changes: 23 additions & 1 deletion Documentation/devicetree/bindings/media/video-interfaces.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ divided into two separate ITU-R BT.656 8-bit busses. In such case bus-width
and data-shift properties can be used to assign physical data lines to each
endpoint node (logical bus).

Documenting bindings for devices
--------------------------------

All required and optional bindings the device supports shall be explicitly
documented in device DT binding documentation. This also includes port and
endpoint nodes for the device, including unit-addresses and reg properties where
relevant.

Please also see Documentation/devicetree/bindings/graph.txt .

Required properties
-------------------
Expand All @@ -67,6 +76,16 @@ are required in a relevant parent node:
identifier, should be 1.
- #size-cells : should be zero.


Optional properties
-------------------

- flash-leds: An array of phandles, each referring to a flash LED, a sub-node
of the LED driver device node.

- lens-focus: A phandle to the node of the focus lens controller.


Optional endpoint properties
----------------------------

Expand Down Expand Up @@ -99,7 +118,10 @@ Optional endpoint properties
determines the logical lane number, while the value of an entry indicates
physical lane, e.g. for 2-lane MIPI CSI-2 bus we could have
"data-lanes = <1 2>;", assuming the clock lane is on hardware lane 0.
This property is valid for serial busses only (e.g. MIPI CSI-2).
If the hardware does not support lane reordering, monotonically
incremented values shall be used from 0 or 1 onwards, depending on
whether or not there is also a clock lane. This property is valid for
serial busses only (e.g. MIPI CSI-2).
- clock-lanes: an array of physical clock lane indexes. Position of an entry
determines the logical lane number, while the value of an entry indicates
physical lane, e.g. for a MIPI CSI-2 bus we could have "clock-lanes = <0>;",
Expand Down
2 changes: 0 additions & 2 deletions Documentation/media/cec.h.rst.exceptions
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ ignore define CEC_VENDOR_ID_NONE
ignore define CEC_MODE_INITIATOR_MSK
ignore define CEC_MODE_FOLLOWER_MSK

ignore define CEC_EVENT_FL_INITIAL_STATE

# Part of CEC 2.0 spec - shouldn't be documented too?
ignore define CEC_LOG_ADDR_TV
ignore define CEC_LOG_ADDR_RECORD_1
Expand Down
7 changes: 5 additions & 2 deletions Documentation/media/kapi/cec-core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ CEC_TX_STATUS_LOW_DRIVE:
retransmission.

CEC_TX_STATUS_ERROR:
some unspecified error occurred: this can be one of
the previous two if the hardware cannot differentiate or something
some unspecified error occurred: this can be one of ARB_LOST
or LOW_DRIVE if the hardware cannot differentiate or something
else entirely.

CEC_TX_STATUS_MAX_RETRIES:
Expand All @@ -238,6 +238,9 @@ CEC_TX_STATUS_MAX_RETRIES:
doesn't have to make another attempt to transmit the message
since the hardware did that already.

The hardware must be able to differentiate between OK, NACK and 'something
else'.

The \*_cnt arguments are the number of error conditions that were seen.
This may be 0 if no information is available. Drivers that do not support
hardware retry can just set the counter corresponding to the transmit error
Expand Down
4 changes: 4 additions & 0 deletions Documentation/media/kapi/dtv-ca.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Digital TV Conditional Access kABI
----------------------------------

.. kernel-doc:: drivers/media/dvb-core/dvb_ca_en50221.h
55 changes: 55 additions & 0 deletions Documentation/media/kapi/dtv-common.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Digital TV Common functions
---------------------------

Math functions
~~~~~~~~~~~~~~

Provide some commonly-used math functions, usually required in order to
estimate signal strength and signal to noise measurements in dB.

.. kernel-doc:: drivers/media/dvb-core/dvb_math.h


DVB devices
~~~~~~~~~~~

Those functions are responsible for handling the DVB device nodes.

.. kernel-doc:: drivers/media/dvb-core/dvbdev.h

Digital TV Ring buffer
~~~~~~~~~~~~~~~~~~~~~~

Those routines implement ring buffers used to handle digital TV data and
copy it from/to userspace.

.. note::

1) For performance reasons read and write routines don't check buffer sizes
and/or number of bytes free/available. This has to be done before these
routines are called. For example:

.. code-block:: c
/* write @buflen: bytes */
free = dvb_ringbuffer_free(rbuf);
if (free >= buflen)
count = dvb_ringbuffer_write(rbuf, buffer, buflen);
else
/* do something */
/* read min. 1000, max. @bufsize: bytes */
avail = dvb_ringbuffer_avail(rbuf);
if (avail >= 1000)
count = dvb_ringbuffer_read(rbuf, buffer, min(avail, bufsize));
else
/* do something */
2) If there is exactly one reader and one writer, there is no need
to lock read or write operations.
Two or more readers must be locked against each other.
Flushing the buffer counts as a read operation.
Resetting the buffer counts as a read and write operation.
Two or more writers must be locked against each other.

.. kernel-doc:: drivers/media/dvb-core/dvb_ringbuffer.h
Loading

0 comments on commit 5d352e6

Please sign in to comment.