Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df45eaca authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-next-2017-04-07' of git://anongit.freedesktop.org/git/drm-misc into drm-next

Last drm-misc-next pull req for 4.12

Core changes:
 - fb_helper checkpatch cleanup and simplified _add_one_connector() (Thierry)
 - drm_ioctl and drm_sysfs improved/gained documentation (Daniel)
 - [ABI] Repurpose reserved field in drm_event_vblank for crtc_id (Ander)
 - Plumb acquire ctx through legacy paths to avoid lock_all and legacy_backoff
   (Daniel)
 - Add connector_atomic_check to check conn constraints on modeset (Maarten)
 - Add drm_of_find_panel_or_bridge to remove boilerplate in drivers (Rob)

Driver changes:
 - meson moved to drm-misc (Neil)
 - Added support for Amlogic GX SoCs in dw-hdmi (Neil)
 - Rockchip unbind actually cleans up the things bind initializes (Jeffy)
 - A couple misc fixes in virtio, dw-hdmi

NOTE: this also includes a backmerge of drm-next as well rc5 (we needed vmwgfx
      as well as the new synopsys media formats)

* tag 'drm-misc-next-2017-04-07' of git://anongit.freedesktop.org/git/drm-misc: (77 commits)
  Revert "drm: Don't allow interruptions when opening debugfs/crc"
  drm: Only take cursor locks when the cursor plane exists
  drm/vmwgfx: Fix fbdev emulation using legacy functions
  drm/rockchip: Shutdown all crtcs when unbinding drm
  drm/rockchip: Reorder drm bind/unbind sequence
  drm/rockchip: analogix_dp: Disable clock when unbinding
  drm/rockchip: vop: Unprepare clocks when unbinding
  drm/rockchip: vop: Enable pm domain before vop_initial
  drm/rockchip: cdn-dp: Don't unregister audio dev when unbinding
  drm/rockchip: cdn-dp: Don't try to release firmware when not loaded
  drm: bridge: analogix: Destroy connector & encoder when unbinding
  drm: bridge: analogix: Disable clock when unbinding
  drm: bridge: analogix: Unregister dp aux when unbinding
  drm: bridge: analogix: Detach panel when unbinding analogix dp
  drm: Don't allow interruptions when opening debugfs/crc
  drm/virtio: don't leak bo on drm_gem_object_init failure
  drm: bridge: dw-hdmi: fix input format/encoding from plat_data
  drm: omap: use common OF graph helpers
  drm: convert drivers to use drm_of_find_panel_or_bridge
  drm: convert drivers to use of_graph_get_remote_node
  ...
parents b769fefb c98cdff9
Loading
Loading
Loading
Loading
+111 −0
Original line number Diff line number Diff line
Amlogic specific extensions to the Synopsys Designware HDMI Controller
======================================================================

The Amlogic Meson Synopsys Designware Integration is composed of :
- A Synopsys DesignWare HDMI Controller IP
- A TOP control block controlling the Clocks and PHY
- A custom HDMI PHY in order to convert video to TMDS signal
 ___________________________________
|            HDMI TOP               |<= HPD
|___________________________________|
|                  |                |
|  Synopsys HDMI   |   HDMI PHY     |=> TMDS
|    Controller    |________________|
|___________________________________|<=> DDC

The HDMI TOP block only supports HPD sensing.
The Synopsys HDMI Controller interrupt is routed through the
TOP Block interrupt.
Communication to the TOP Block and the Synopsys HDMI Controller is done
via a pair of dedicated addr+read/write registers.
The HDMI PHY is configured by registers in the HHI register block.

Pixel data arrives in 4:4:4 format from the VENC block and the VPU HDMI mux
selects either the ENCI encoder for the 576i or 480i formats or the ENCP
encoder for all the other formats including interlaced HD formats.

The VENC uses a DVI encoder on top of the ENCI or ENCP encoders to generate
DVI timings for the HDMI controller.

Amlogic Meson GXBB, GXL and GXM SoCs families embeds the Synopsys DesignWare
HDMI TX IP version 2.01a with HDCP and I2C & S/PDIF
audio source interfaces.

Required properties:
- compatible: value should be different for each SoC family as :
	- GXBB (S905) : "amlogic,meson-gxbb-dw-hdmi"
	- GXL (S905X, S905D) : "amlogic,meson-gxl-dw-hdmi"
	- GXM (S912) : "amlogic,meson-gxm-dw-hdmi"
	followed by the common "amlogic,meson-gx-dw-hdmi"
- reg: Physical base address and length of the controller's registers.
- interrupts: The HDMI interrupt number
- clocks, clock-names : must have the phandles to the HDMI iahb and isfr clocks,
  and the Amlogic Meson venci clocks as described in
  Documentation/devicetree/bindings/clock/clock-bindings.txt,
  the clocks are soc specific, the clock-names should be "iahb", "isfr", "venci"
- resets, resets-names: must have the phandles to the HDMI apb, glue and phy
  resets as described in :
  Documentation/devicetree/bindings/reset/reset.txt,
  the reset-names should be "hdmitx_apb", "hdmitx", "hdmitx_phy"

Required nodes:

The connections to the HDMI ports are modeled using the OF graph
bindings specified in Documentation/devicetree/bindings/graph.txt.

The following table lists for each supported model the port number
corresponding to each HDMI output and input.

		Port 0		Port 1
-----------------------------------------
 S905 (GXBB)	VENC Input	TMDS Output
 S905X (GXL)	VENC Input	TMDS Output
 S905D (GXL)	VENC Input	TMDS Output
 S912 (GXM)	VENC Input	TMDS Output

Example:

hdmi-connector {
	compatible = "hdmi-connector";
	type = "a";

	port {
		hdmi_connector_in: endpoint {
			remote-endpoint = <&hdmi_tx_tmds_out>;
		};
	};
};

hdmi_tx: hdmi-tx@c883a000 {
	compatible = "amlogic,meson-gxbb-dw-hdmi", "amlogic,meson-gx-dw-hdmi";
	reg = <0x0 0xc883a000 0x0 0x1c>;
	interrupts = <GIC_SPI 57 IRQ_TYPE_EDGE_RISING>;
	resets = <&reset RESET_HDMITX_CAPB3>,
		 <&reset RESET_HDMI_SYSTEM_RESET>,
		 <&reset RESET_HDMI_TX>;
	reset-names = "hdmitx_apb", "hdmitx", "hdmitx_phy";
	clocks = <&clkc CLKID_HDMI_PCLK>,
		 <&clkc CLKID_CLK81>,
		 <&clkc CLKID_GCLK_VENCI_INT0>;
	clock-names = "isfr", "iahb", "venci";
	#address-cells = <1>;
	#size-cells = <0>;

	/* VPU VENC Input */
	hdmi_tx_venc_port: port@0 {
		reg = <0>;

		hdmi_tx_in: endpoint {
			remote-endpoint = <&hdmi_tx_out>;
		};
	};

	/* TMDS Output */
	hdmi_tx_tmds_port: port@1 {
		reg = <1>;

		hdmi_tx_tmds_out: endpoint {
			remote-endpoint = <&hdmi_connector_in>;
		};
	};
};
+5 −0
Original line number Diff line number Diff line
@@ -17,9 +17,12 @@ Required properties:

Optional properties:
- power-domains: a phandle to mipi dsi power domain node.
- resets: list of phandle + reset specifier pairs, as described in [3].
- reset-names: string reset name, must be "apb".

[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
[2] Documentation/devicetree/bindings/media/video-interfaces.txt
[3] Documentation/devicetree/bindings/reset/reset.txt

Example:
	mipi_dsi: mipi@ff960000 {
@@ -30,6 +33,8 @@ Example:
		interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
		clocks = <&cru SCLK_MIPI_24M>, <&cru PCLK_MIPI_DSI0>;
		clock-names = "ref", "pclk";
		resets = <&cru SRST_MIPIDSI0>;
		reset-names = "apb";
		rockchip,grf = <&grf>;
		status = "okay";

+15 −0
Original line number Diff line number Diff line
=======================================================
 drm/bridge/dw-hdmi Synopsys DesignWare HDMI Controller
=======================================================

Synopsys DesignWare HDMI Controller
===================================

This section covers everything related to the Synopsys DesignWare HDMI
Controller implemented as a DRM bridge.

Supported Input Formats and Encodings
-------------------------------------

.. kernel-doc:: include/drm/bridge/dw_hdmi.h
   :doc: Supported input formats and encodings
+0 −50
Original line number Diff line number Diff line
@@ -255,56 +255,6 @@ File Operations
.. kernel-doc:: drivers/gpu/drm/drm_file.c
   :export:

IOCTLs
------

struct drm_ioctl_desc \*ioctls; int num_ioctls;
    Driver-specific ioctls descriptors table.

Driver-specific ioctls numbers start at DRM_COMMAND_BASE. The ioctls
descriptors table is indexed by the ioctl number offset from the base
value. Drivers can use the DRM_IOCTL_DEF_DRV() macro to initialize
the table entries.

::

    DRM_IOCTL_DEF_DRV(ioctl, func, flags)

``ioctl`` is the ioctl name. Drivers must define the DRM_##ioctl and
DRM_IOCTL_##ioctl macros to the ioctl number offset from
DRM_COMMAND_BASE and the ioctl number respectively. The first macro is
private to the device while the second must be exposed to userspace in a
public header.

``func`` is a pointer to the ioctl handler function compatible with the
``drm_ioctl_t`` type.

::

    typedef int drm_ioctl_t(struct drm_device *dev, void *data,
            struct drm_file *file_priv);

``flags`` is a bitmask combination of the following values. It restricts
how the ioctl is allowed to be called.

-  DRM_AUTH - Only authenticated callers allowed

-  DRM_MASTER - The ioctl can only be called on the master file handle

-  DRM_ROOT_ONLY - Only callers with the SYSADMIN capability allowed

-  DRM_CONTROL_ALLOW - The ioctl can only be called on a control
   device

-  DRM_UNLOCKED - The ioctl handler will be called without locking the
   DRM global mutex. This is the enforced default for kms drivers (i.e.
   using the DRIVER_MODESET flag) and hence shouldn't be used any more
   for new drivers.

.. kernel-doc:: drivers/gpu/drm/drm_ioctl.c
   :export:


Misc Utilities
==============

+24 −0
Original line number Diff line number Diff line
@@ -160,6 +160,20 @@ other hand, a driver requires shared state between clients which is
visible to user-space and accessible beyond open-file boundaries, they
cannot support render nodes.

IOCTL Support on Device Nodes
=============================

.. kernel-doc:: drivers/gpu/drm/drm_ioctl.c
   :doc: driver specific ioctls

.. kernel-doc:: include/drm/drm_ioctl.h
   :internal:

.. kernel-doc:: drivers/gpu/drm/drm_ioctl.c
   :export:

.. kernel-doc:: drivers/gpu/drm/drm_ioc32.c
   :export:

Testing and validation
======================
@@ -219,6 +233,16 @@ Debugfs Support
.. kernel-doc:: drivers/gpu/drm/drm_debugfs.c
   :export:

Sysfs Support
=============

.. kernel-doc:: drivers/gpu/drm/drm_sysfs.c
   :doc: overview

.. kernel-doc:: drivers/gpu/drm/drm_sysfs.c
   :export:


VBlank event handling
=====================

Loading