Skip to content

Commit

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

Pull media updates from Mauro Carvalho Chehab:

 - videobuf2 was moved to a media/common dir, as it is now used by the
   DVB subsystem too

 - Digital TV core memory mapped support interface

 - new sensor driver: ov7740

 - several improvements at ddbridge driver

 - new V4L2 driver: IPU3 CIO2 CSI-2 receiver unit, found on some Intel
   SoCs

 - new tuner driver: tda18250

 - finally got rid of all LIRC staging drivers

 - as we don't have old lirc drivers anymore, restruct the lirc device
   code

 - add support for UVC metadata

 - add a new staging driver for NVIDIA Tegra Video Decoder Engine

 - DVB kAPI headers moved to include/media

 - synchronize the kAPI and uAPI for the DVB subsystem, removing the gap
   for non-legacy APIs

 - reduce the kAPI gap for V4L2

 - lots of other driver enhancements, cleanups, etc.

* tag 'media/v4.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (407 commits)
  media: v4l2-compat-ioctl32.c: make ctrl_is_pointer work for subdevs
  media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic
  media: v4l2-compat-ioctl32.c: don't copy back the result for certain errors
  media: v4l2-compat-ioctl32.c: drop pr_info for unknown buffer type
  media: v4l2-compat-ioctl32.c: copy clip list in put_v4l2_window32
  media: v4l2-compat-ioctl32.c: fix ctrl_is_pointer
  media: v4l2-compat-ioctl32.c: copy m.userptr in put_v4l2_plane32
  media: v4l2-compat-ioctl32.c: avoid sizeof(type)
  media: v4l2-compat-ioctl32.c: move 'helper' functions to __get/put_v4l2_format32
  media: v4l2-compat-ioctl32.c: fix the indentation
  media: v4l2-compat-ioctl32.c: add missing VIDIOC_PREPARE_BUF
  media: v4l2-ioctl.c: don't copy back the result for -ENOTTY
  media: v4l2-ioctl.c: use check_fmt for enum/g/s/try_fmt
  media: vivid: fix module load error when enabling fb and no_error_inj=1
  media: dvb_demux: improve debug messages
  media: dvb_demux: Better handle discontinuity errors
  media: cxusb, dib0700: ignore XC2028_I2C_FLUSH
  media: ts2020: avoid integer overflows on 32 bit machines
  media: i2c: ov7740: use gpio/consumer.h instead of gpio.h
  media: entity: Add a nop variant of media_entity_cleanup
  ...
  • Loading branch information
Linus Torvalds committed Feb 6, 2018
2 parents 2246edf + 273caa2 commit 68c5735
Show file tree
Hide file tree
Showing 953 changed files with 21,723 additions and 14,035 deletions.
6 changes: 5 additions & 1 deletion Documentation/devicetree/bindings/media/cec-gpio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ 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.

Please note: the maximum voltage for the CEC line is 3.63V, for the HPD
line it is 5.3V. So you may need some sort of level conversion circuitry
when connecting them to a GPIO line.

Required properties:
- compatible: value must be "cec-gpio".
- cec-gpios: gpio that the CEC line is connected to. The line should be
Expand All @@ -21,7 +25,7 @@ the following property is optional:

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:
connected to pin 11 aka BCM17 (some level shifter is needed for this!):

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

Expand Down
4 changes: 4 additions & 0 deletions Documentation/devicetree/bindings/media/i2c/mt9m111.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ interface.

Required Properties:
- compatible: value should be "micron,mt9m111"
- clocks: reference to the master clock.
- clock-names: shall be "mclk".

For further reading on port node refer to
Documentation/devicetree/bindings/media/video-interfaces.txt.
Expand All @@ -16,6 +18,8 @@ Example:
mt9m111@5d {
compatible = "micron,mt9m111";
reg = <0x5d>;
clocks = <&mclk>;
clock-names = "mclk";

remote = <&pxa_camera>;
port {
Expand Down
46 changes: 44 additions & 2 deletions Documentation/devicetree/bindings/media/i2c/ov5640.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* Omnivision OV5640 MIPI CSI-2 sensor
* Omnivision OV5640 MIPI CSI-2 / parallel sensor

Required Properties:
- compatible: should be "ovti,ov5640"
Expand All @@ -18,7 +18,25 @@ The device node must contain one 'port' child node for its digital output
video port, in accordance with the video interface bindings defined in
Documentation/devicetree/bindings/media/video-interfaces.txt.

Example:
OV5640 can be connected to a MIPI CSI-2 bus or a parallel bus endpoint.

Endpoint node required properties for CSI-2 connection are:
- remote-endpoint: a phandle to the bus receiver's endpoint node.
- clock-lanes: should be set to <0> (clock lane on hardware lane 0)
- data-lanes: should be set to <1> or <1 2> (one or two CSI-2 lanes supported)

Endpoint node required properties for parallel connection are:
- remote-endpoint: a phandle to the bus receiver's endpoint node.
- bus-width: shall be set to <8> for 8 bits parallel bus
or <10> for 10 bits parallel bus
- data-shift: shall be set to <2> for 8 bits parallel bus
(lines 9:2 are used) or <0> for 10 bits parallel bus
- hsync-active: active state of the HSYNC signal, 0/1 for LOW/HIGH respectively.
- vsync-active: active state of the VSYNC signal, 0/1 for LOW/HIGH respectively.
- pclk-sample: sample data on rising (1) or falling (0) edge of the pixel clock
signal.

Examples:

&i2c1 {
ov5640: camera@3c {
Expand All @@ -35,6 +53,7 @@ Example:
reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;

port {
/* MIPI CSI-2 bus endpoint */
ov5640_to_mipi_csi2: endpoint {
remote-endpoint = <&mipi_csi2_from_ov5640>;
clock-lanes = <0>;
Expand All @@ -43,3 +62,26 @@ Example:
};
};
};

&i2c1 {
ov5640: camera@3c {
compatible = "ovti,ov5640";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ov5640>;
reg = <0x3c>;
clocks = <&clk_ext_camera>;
clock-names = "xclk";

port {
/* Parallel bus endpoint */
ov5640_to_parallel: endpoint {
remote-endpoint = <&parallel_from_ov5640>;
bus-width = <8>;
data-shift = <2>; /* lines 9:2 are used */
hsync-active = <0>;
vsync-active = <0>;
pclk-sample = <1>;
};
};
};
};
47 changes: 47 additions & 0 deletions Documentation/devicetree/bindings/media/i2c/ov7740.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
* Omnivision OV7740 CMOS image sensor

The Omnivision OV7740 image sensor supports multiple output image
size, such as VGA, and QVGA, CIF and any size smaller. It also
supports the RAW RGB and YUV output formats.

The common video interfaces bindings (see video-interfaces.txt) should
be used to specify link to the image data receiver. The OV7740 device
node should contain one 'port' child node with an 'endpoint' subnode.

Required Properties:
- compatible: "ovti,ov7740".
- reg: I2C slave address of the sensor.
- clocks: Reference to the xvclk input clock.
- clock-names: "xvclk".

Optional Properties:
- reset-gpios: Rreference to the GPIO connected to the reset_b pin,
if any. Active low with pull-ip resistor.
- powerdown-gpios: Reference to the GPIO connected to the pwdn pin,
if any. Active high with pull-down resistor.

Endpoint node mandatory properties:
- remote-endpoint: A phandle to the bus receiver's endpoint node.

Example:

i2c1: i2c@fc028000 {
ov7740: camera@21 {
compatible = "ovti,ov7740";
reg = <0x21>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sensor_power &pinctrl_sensor_reset>;
clocks = <&isc>;
clock-names = "xvclk";
assigned-clocks = <&isc>;
assigned-clock-rates = <24000000>;
reset-gpios = <&pioA 43 GPIO_ACTIVE_LOW>;
powerdown-gpios = <&pioA 44 GPIO_ACTIVE_HIGH>;

port {
ov7740_0: endpoint {
remote-endpoint = <&isc_0>;
};
};
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ Mandatory properties
is in hardware standby mode when the signal is in the low state.


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

- flash-leds: See ../video-interfaces.txt
- lens-focus: See ../video-interfaces.txt


Endpoint node mandatory properties
----------------------------------

Expand Down
55 changes: 55 additions & 0 deletions Documentation/devicetree/bindings/media/nvidia,tegra-vde.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
NVIDIA Tegra Video Decoder Engine

Required properties:
- compatible : Must contain one of the following values:
- "nvidia,tegra20-vde"
- "nvidia,tegra30-vde"
- "nvidia,tegra114-vde"
- "nvidia,tegra124-vde"
- "nvidia,tegra132-vde"
- reg : Must contain an entry for each entry in reg-names.
- reg-names : Must include the following entries:
- sxe
- bsev
- mbe
- ppe
- mce
- tfe
- ppb
- vdma
- frameid
- iram : Must contain phandle to the mmio-sram device node that represents
IRAM region used by VDE.
- interrupts : Must contain an entry for each entry in interrupt-names.
- interrupt-names : Must include the following entries:
- sync-token
- bsev
- sxe
- clocks : Must include the following entries:
- vde
- resets : Must include the following entries:
- vde

Example:

video-codec@6001a000 {
compatible = "nvidia,tegra20-vde";
reg = <0x6001a000 0x1000 /* Syntax Engine */
0x6001b000 0x1000 /* Video Bitstream Engine */
0x6001c000 0x100 /* Macroblock Engine */
0x6001c200 0x100 /* Post-processing Engine */
0x6001c400 0x100 /* Motion Compensation Engine */
0x6001c600 0x100 /* Transform Engine */
0x6001c800 0x100 /* Pixel prediction block */
0x6001ca00 0x100 /* Video DMA */
0x6001d800 0x300 /* Video frame controls */>;
reg-names = "sxe", "bsev", "mbe", "ppe", "mce",
"tfe", "ppb", "vdma", "frameid";
iram = <&vde_pool>; /* IRAM region */
interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>, /* Sync token interrupt */
<GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>, /* BSE-V interrupt */
<GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; /* SXE interrupt */
interrupt-names = "sync-token", "bsev", "sxe";
clocks = <&tegra_car TEGRA20_CLK_VDE>;
resets = <&tegra_car 61>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ Example:
tpg1_out: endpoint {
remote-endpoint = <&switch_in0>;
};
}:
};
};
};
2 changes: 2 additions & 0 deletions Documentation/media/dmx.h.rst.exceptions
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ ignore symbol DMX_OUT_DECODER
ignore symbol DMX_OUT_TAP
ignore symbol DMX_OUT_TS_TAP
ignore symbol DMX_OUT_TSDEMUX_TAP

replace ioctl DMX_DQBUF dmx_qbuf
14 changes: 14 additions & 0 deletions Documentation/media/kapi/cec-core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ your driver:
/* Low-level callbacks */
int (*adap_enable)(struct cec_adapter *adap, bool enable);
int (*adap_monitor_all_enable)(struct cec_adapter *adap, bool enable);
int (*adap_monitor_pin_enable)(struct cec_adapter *adap, bool enable);
int (*adap_log_addr)(struct cec_adapter *adap, u8 logical_addr);
int (*adap_transmit)(struct cec_adapter *adap, u8 attempts,
u32 signal_free_time, struct cec_msg *msg);
Expand Down Expand Up @@ -144,6 +145,19 @@ called if the CEC_CAP_MONITOR_ALL capability is set. This callback is optional
Note that adap_monitor_all_enable must return 0 if enable is false.


To enable/disable the 'monitor pin' mode:

.. c:function::
int (*adap_monitor_pin_enable)(struct cec_adapter *adap, bool enable);
If enabled, then the adapter should be put in a mode to also monitor CEC pin
changes. Not all hardware supports this and this function is only called if
the CEC_CAP_MONITOR_PIN capability is set. This callback is optional
(some hardware may always be in 'monitor pin' mode).

Note that adap_monitor_pin_enable must return 0 if enable is false.


To program a new logical address:

.. c:function::
Expand Down
2 changes: 1 addition & 1 deletion Documentation/media/kapi/dtv-ca.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Digital TV Conditional Access kABI
----------------------------------

.. kernel-doc:: drivers/media/dvb-core/dvb_ca_en50221.h
.. kernel-doc:: include/media/dvb_ca_en50221.h
11 changes: 8 additions & 3 deletions Documentation/media/kapi/dtv-common.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ 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
.. kernel-doc:: include/media/dvb_math.h


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

Those functions are responsible for handling the DVB device nodes.

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

Digital TV Ring buffer
~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -52,4 +52,9 @@ copy it from/to userspace.
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
.. kernel-doc:: include/media/dvb_ringbuffer.h

Digital TV VB2 handler
~~~~~~~~~~~~~~~~~~~~~~

.. kernel-doc:: include/media/dvb_vb2.h
8 changes: 4 additions & 4 deletions Documentation/media/kapi/dtv-demux.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The Kernel Digital TV Demux kABI defines a driver-internal interface for
registering low-level, hardware specific driver to a hardware independent
demux layer. It is only of interest for Digital TV device driver writers.
The header file for this kABI is named ``demux.h`` and located in
``drivers/media/dvb-core``.
``include/media``.

The demux kABI should be implemented for each demux in the system. It is
used to select the TS source of a demux and to manage the demux resources.
Expand Down Expand Up @@ -69,14 +69,14 @@ callbacks.
Digital TV Demux device registration functions and data structures
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. kernel-doc:: drivers/media/dvb-core/dmxdev.h
.. kernel-doc:: include/media/dmxdev.h

High-level Digital TV demux interface
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. kernel-doc:: drivers/media/dvb-core/dvb_demux.h
.. kernel-doc:: include/media/dvb_demux.h

Driver-internal low-level hardware specific driver demux interface
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. kernel-doc:: drivers/media/dvb-core/demux.h
.. kernel-doc:: include/media/demux.h
8 changes: 4 additions & 4 deletions Documentation/media/kapi/dtv-frontend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The Digital TV Frontend kABI defines a driver-internal interface for
registering low-level, hardware specific driver to a hardware independent
frontend layer. It is only of interest for Digital TV device driver writers.
The header file for this API is named ``dvb_frontend.h`` and located in
``drivers/media/dvb-core``.
``include/media/``.

Demodulator driver
^^^^^^^^^^^^^^^^^^
Expand All @@ -17,7 +17,7 @@ The demodulator driver is responsible to talk with the decoding part of the
hardware. Such driver should implement :c:type:`dvb_frontend_ops`, with
tells what type of digital TV standards are supported, and points to a
series of functions that allow the DVB core to command the hardware via
the code under ``drivers/media/dvb-core/dvb_frontend.c``.
the code under ``include/media/dvb_frontend.c``.

A typical example of such struct in a driver ``foo`` is::

Expand Down Expand Up @@ -118,7 +118,7 @@ Satellite TV reception is::

.. |delta| unicode:: U+00394

The ``drivers/media/dvb-core/dvb_frontend.c`` has a kernel thread with is
The ``include/media/dvb_frontend.c`` has a kernel thread with is
responsible for tuning the device. It supports multiple algorithms to
detect a channel, as defined at enum :c:func:`dvbfe_algo`.

Expand Down Expand Up @@ -440,4 +440,4 @@ monotonic stats at the right time.
Digital TV Frontend functions and types
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. kernel-doc:: drivers/media/dvb-core/dvb_frontend.h
.. kernel-doc:: include/media/dvb_frontend.h
2 changes: 1 addition & 1 deletion Documentation/media/kapi/dtv-net.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Digital TV Network kABI
-----------------------

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

0 comments on commit 68c5735

Please sign in to comment.