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

 - New CEC driver: Extron DA HD 4K Plus

 - Lots of driver fixes, cleanups and improvements

* tag 'media/v6.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (179 commits)
  media: atomisp: Use clamp() in ia_css_eed1_8_vmem_encode()
  media: atomisp: Fix eed1_8 code assigning signed values to an unsigned variable
  media: atomisp: set lock before calling vb2_queue_init()
  media: atomisp: Improve binary finding debug logging
  media: atomisp: Drop dev_dbg() calls from hmm_[alloc|free]()
  media: atomisp: csi2-bridge: Add DMI quirk for t4ka3 on Xiaomi Mipad2
  media: atomisp: add missing wait_prepare/finish ops
  media: atomisp: Remove unused declaration
  media: atomisp: use clamp() in compute_coring()
  media: atomisp: use clamp() in ia_css_eed1_8_encode()
  media: atomisp: Simplify ia_css_pipe_create_cas_scaler_desc_single_output()
  media: atomisp: Replace rarely used macro from math_support.h
  media: atomisp: Remove duplicated leftover, i.e. sh_css_dvs_info.h
  media: atomisp: bnr: fix trailing statement
  media: atomisp: move trailing */ to separate lines
  media: atomisp: move trailing statement to next line.
  media: atomisp: Fix trailing statement in ia_css_de.host.c
  media: atomisp: Fix spelling mistakes in atomisp.h
  media: atomisp: Fix spelling mistakes in atomisp_platform.h
  media: atomisp: Fix spelling mistake in csi_rx_public.h
  ...
parents 9ab27b01 81ee62e8
Loading
Loading
Loading
Loading
+87 −0
Original line number Diff line number Diff line
@@ -42,10 +42,14 @@ dongles):
  ``persistent_config``: by default this is off, but when set to 1 the driver
  will store the current settings to the device's internal eeprom and restore
  it the next time the device is connected to the USB port.

- RainShadow Tech. Note: this driver does not support the persistent_config
  module option of the Pulse-Eight driver. The hardware supports it, but I
  have no plans to add this feature. But I accept patches :-)

- Extron DA HD 4K PLUS HDMI Distribution Amplifier. See
  :ref:`extron_da_hd_4k_plus` for more information.

Miscellaneous:

- vivid: emulates a CEC receiver and CEC transmitter.
@@ -378,3 +382,86 @@ it later using ``--analyze-pin``.

You can also use this as a full-fledged CEC device by configuring it
using ``cec-ctl --tv -p0.0.0.0`` or ``cec-ctl --playback -p1.0.0.0``.

.. _extron_da_hd_4k_plus:

Extron DA HD 4K PLUS CEC Adapter driver
=======================================

This driver is for the Extron DA HD 4K PLUS series of HDMI Distribution
Amplifiers: https://www.extron.com/product/dahd4kplusseries

The 2, 4 and 6 port models are supported.

Firmware version 1.02.0001 or higher is required.

Note that older Extron hardware revisions have a problem with the CEC voltage,
which may mean that CEC will not work. This is fixed in hardware revisions
E34814 and up.

The CEC support has two modes: the first is a manual mode where userspace has
to manually control CEC for the HDMI Input and all HDMI Outputs. While this gives
full control, it is also complicated.

The second mode is an automatic mode, which is selected if the module option
``vendor_id`` is set. In that case the driver controls CEC and CEC messages
received in the input will be distributed to the outputs. It is still possible
to use the /dev/cecX devices to talk to the connected devices directly, but it is
the driver that configures everything and deals with things like Hotplug Detect
changes.

The driver also takes care of the EDIDs: /dev/videoX devices are created to
read the EDIDs and (for the HDMI Input port) to set the EDID.

By default userspace is responsible to set the EDID for the HDMI Input
according to the EDIDs of the connected displays. But if the ``manufacturer_name``
module option is set, then the driver will take care of setting the EDID
of the HDMI Input based on the supported resolutions of the connected displays.
Currently the driver only supports resolutions 1080p60 and 4kp60: if all connected
displays support 4kp60, then it will advertise 4kp60 on the HDMI input, otherwise
it will fall back to an EDID that just reports 1080p60.

The status of the Extron is reported in ``/sys/kernel/debug/cec/cecX/status``.

The extron-da-hd-4k-plus driver implements the following module options:

``debug``
---------

If set to 1, then all serial port traffic is shown.

``vendor_id``
-------------

The CEC Vendor ID to report to connected displays.

If set, then the driver will take care of distributing CEC messages received
on the input to the HDMI outputs. This is done for the following CEC messages:

- <Standby>
- <Image View On> and <Text View On>
- <Give Device Power Status>
- <Set System Audio Mode>
- <Request Current Latency>

If not set, then userspace is responsible for this, and it will have to
configure the CEC devices for HDMI Input and the HDMI Outputs manually.

``manufacturer_name``
---------------------

A three character manufacturer name that is used in the EDID for the HDMI
Input. If not set, then userspace is reponsible for configuring an EDID.
If set, then the driver will update the EDID automatically based on the
resolutions supported by the connected displays, and it will not be possible
anymore to manually set the EDID for the HDMI Input.

``hpd_never_low``
-----------------

If set, then the Hotplug Detect pin of the HDMI Input will always be high,
even if nothing is connected to the HDMI Outputs. If not set (the default)
then the Hotplug Detect pin of the HDMI input will go low if all the detected
Hotplug Detect pins of the HDMI Outputs are also low.

This option may be changed dynamically.
+14 −9
Original line number Diff line number Diff line
@@ -227,8 +227,13 @@ Common FPDL3/GMSL output parameters
    open.*

**frame_rate** (RW):
    Output video frame rate in frames per second. The default frame rate is
    60Hz.
    Output video signal frame rate limit in frames per second. Due to
    the limited output pixel clock steps, the card can not always generate
    a frame rate perfectly matching the value required by the connected display.
    Using this parameter one can limit the frame rate by "crippling" the signal
    so that the lines are not equal (the porches of the last line differ) but
    the signal appears like having the exact frame rate to the connected display.
    The default frame rate limit is 60Hz.

**hsync_polarity** (RW):
    HSYNC signal polarity.
@@ -253,33 +258,33 @@ Common FPDL3/GMSL output parameters
    and there is a non-linear stepping between two consecutive allowed
    frequencies. The driver finds the nearest allowed frequency to the given
    value and sets it. When reading this property, you get the exact
    frequency set by the driver. The default frequency is 70000kHz.
    frequency set by the driver. The default frequency is 61150kHz.

    *Note: This parameter can not be changed while the output v4l2 device is
    open.*

**hsync_width** (RW):
    Width of the HSYNC signal in pixels. The default value is 16.
    Width of the HSYNC signal in pixels. The default value is 40.

**vsync_width** (RW):
    Width of the VSYNC signal in video lines. The default value is 2.
    Width of the VSYNC signal in video lines. The default value is 20.

**hback_porch** (RW):
    Number of PCLK pulses between deassertion of the HSYNC signal and the first
    valid pixel in the video line (marked by DE=1). The default value is 32.
    valid pixel in the video line (marked by DE=1). The default value is 50.

**hfront_porch** (RW):
    Number of PCLK pulses between the end of the last valid pixel in the video
    line (marked by DE=1) and assertion of the HSYNC signal. The default value
    is 32.
    is 50.

**vback_porch** (RW):
    Number of video lines between deassertion of the VSYNC signal and the video
    line with the first valid pixel (marked by DE=1). The default value is 2.
    line with the first valid pixel (marked by DE=1). The default value is 31.

**vfront_porch** (RW):
    Number of video lines between the end of the last valid pixel line (marked
    by DE=1) and assertion of the VSYNC signal. The default value is 2.
    by DE=1) and assertion of the VSYNC signal. The default value is 30.

FPDL3 specific input parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+9 −2
Original line number Diff line number Diff line
@@ -114,11 +114,18 @@ to be applied to the hardware during a video stream, allowing userspace
to dynamically modify values such as black level, cross talk corrections
and others.

The buffer format is defined by struct :c:type:`rkisp1_params_cfg`, and
userspace should set
The ISP driver supports two different parameters configuration methods, the
`fixed parameters format` or the `extensible parameters format`.

When using the `fixed parameters` method the buffer format is defined by struct
:c:type:`rkisp1_params_cfg`, and userspace should set
:ref:`V4L2_META_FMT_RK_ISP1_PARAMS <v4l2-meta-fmt-rk-isp1-params>` as the
dataformat.

When using the `extensible parameters` method the buffer format is defined by
struct :c:type:`rkisp1_ext_params_cfg`, and userspace should set
:ref:`V4L2_META_FMT_RK_ISP1_EXT_PARAMS <v4l2-meta-fmt-rk-isp1-ext-params>` as
the dataformat.

Capturing Video Frames Example
==============================
+2 −2
Original line number Diff line number Diff line
@@ -1343,7 +1343,7 @@ Some Future Improvements
Just as a reminder and in no particular order:

- Add a virtual alsa driver to test audio
- Add virtual sub-devices and media controller support
- Add virtual sub-devices
- Some support for testing compressed video
- Add support to loop raw VBI output to raw VBI input
- Add support to loop teletext sliced VBI output to VBI input
@@ -1358,4 +1358,4 @@ Just as a reminder and in no particular order:
- Make a thread for the RDS generation, that would help in particular for the
  "Controls" RDS Rx I/O Mode as the read-only RDS controls could be updated
  in real-time.
- Changing the EDID should cause hotplug detect emulation to happen.
- Changing the EDID doesn't wait 100 ms before setting the HPD signal.
+2 −1
Original line number Diff line number Diff line
@@ -31,7 +31,8 @@ properties:
      - items:
          - enum:
              - amlogic,gxbb-vdec # GXBB (S905)
              - amlogic,gxl-vdec # GXL (S905X, S905D)
              - amlogic,gxl-vdec # GXL (S905D, S905W, S905X, S905Y)
              - amlogic,gxlx-vdec # GXLX (S905L)
              - amlogic,gxm-vdec # GXM (S912)
          - const: amlogic,gx-vdec
      - enum:
Loading