Commit 8ec5c000 authored by Tvrtko Ursulin's avatar Tvrtko Ursulin
Browse files

Merge tag 'drm-intel-next-2022-05-20' of...

Merge tag 'drm-intel-next-2022-05-20' of git://anongit.freedesktop.org/drm/drm-intel

 into drm-intel-gt-next

drm/i915 drm-intel-next -> drm-intel-gt-next cross-merge sync

Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>

# Conflicts:
#	drivers/gpu/drm/i915/gt/intel_rps.c
#	drivers/gpu/drm/i915/i915_vma.c
From: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/87y1ywbh5y.fsf@intel.com
parents 39921e5f 5f38c3fb
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -41,10 +41,26 @@ properties:

    properties:
      port@0:
        $ref: /schemas/graph.yaml#/properties/port
        $ref: /schemas/graph.yaml#/$defs/port-base
        unevaluatedProperties: false
        description:
          Video port for MIPI DSI input

        properties:
          endpoint:
            $ref: /schemas/media/video-interfaces.yaml#
            unevaluatedProperties: false

            properties:
              data-lanes:
                description: array of physical DSI data lane indexes.
                minItems: 1
                items:
                  - const: 1
                  - const: 2
                  - const: 3
                  - const: 4

      port@1:
        $ref: /schemas/graph.yaml#/properties/port
        description:
+117 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/bridge/lontium,lt9211.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Lontium LT9211 DSI/LVDS/DPI to DSI/LVDS/DPI bridge.

maintainers:
  - Marek Vasut <marex@denx.de>

description: |
  The LT9211 are bridge devices which convert Single/Dual-Link DSI/LVDS
  or Single DPI to Single/Dual-Link DSI/LVDS or Single DPI.

properties:
  compatible:
    enum:
      - lontium,lt9211

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  reset-gpios:
    maxItems: 1
    description: GPIO connected to active high RESET pin.

  vccio-supply:
    description: Regulator for 1.8V IO power.

  ports:
    $ref: /schemas/graph.yaml#/properties/ports

    properties:
      port@0:
        $ref: /schemas/graph.yaml#/properties/port
        description:
          Primary MIPI DSI port-1 for MIPI input or
          LVDS port-1 for LVDS input or DPI input.

      port@1:
        $ref: /schemas/graph.yaml#/properties/port
        description:
          Additional MIPI port-2 for MIPI input or LVDS port-2
          for LVDS input. Used in combination with primary
          port-1 to drive higher resolution displays

      port@2:
        $ref: /schemas/graph.yaml#/properties/port
        description:
          Primary MIPI DSI port-1 for MIPI output or
          LVDS port-1 for LVDS output or DPI output.

      port@3:
        $ref: /schemas/graph.yaml#/properties/port
        description:
          Additional MIPI port-2 for MIPI output or LVDS port-2
          for LVDS output. Used in combination with primary
          port-1 to drive higher resolution displays.

    required:
      - port@0
      - port@2

required:
  - compatible
  - reg
  - vccio-supply
  - ports

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      hdmi-bridge@3b {
        compatible = "lontium,lt9211";
        reg = <0x3b>;

        reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;
        interrupts-extended = <&tlmm 84 IRQ_TYPE_EDGE_FALLING>;

        vccio-supply = <&lt9211_1v8>;

        ports {
          #address-cells = <1>;
          #size-cells = <0>;

          port@0 {
            reg = <0>;

            endpoint {
              remote-endpoint = <&dsi0_out>;
            };
          };

          port@2 {
            reg = <2>;

            endpoint {
              remote-endpoint = <&panel_in_lvds>;
            };
          };
        };
      };
    };

...
+82 −13
Original line number Diff line number Diff line
@@ -12,11 +12,22 @@ maintainers:

properties:
  compatible:
    enum:
    oneOf:
      # Deprecated compatible strings
      - items:
          - enum:
              - solomon,ssd1305fb-i2c
              - solomon,ssd1306fb-i2c
              - solomon,ssd1307fb-i2c
              - solomon,ssd1309fb-i2c
        deprecated: true
      - items:
          - enum:
              - sinowealth,sh1106
              - solomon,ssd1305
              - solomon,ssd1306
              - solomon,ssd1307
              - solomon,ssd1309

  reg:
    maxItems: 1
@@ -27,9 +38,20 @@ properties:
  reset-gpios:
    maxItems: 1

  # Only required for SPI
  dc-gpios:
    description:
      GPIO connected to the controller's D/C# (Data/Command) pin,
      that is needed for 4-wire SPI to tell the controller if the
      data sent is for a command register or the display data RAM
    maxItems: 1

  vbat-supply:
    description: The supply for VBAT

  # Only required for SPI
  spi-max-frequency: true

  solomon,height:
    $ref: /schemas/types.yaml#/definitions/uint32
    default: 16
@@ -135,7 +157,21 @@ allOf:
      properties:
        compatible:
          contains:
            const: solomon,ssd1305fb-i2c
            const: sinowealth,sh1106
    then:
      properties:
        solomon,dclk-div:
          default: 1
        solomon,dclk-frq:
          default: 5

  - if:
      properties:
        compatible:
          contains:
            enum:
              - solomon,ssd1305-i2c
              - solomon,ssd1305
    then:
      properties:
        solomon,dclk-div:
@@ -147,7 +183,9 @@ allOf:
      properties:
        compatible:
          contains:
            const: solomon,ssd1306fb-i2c
            enum:
              - solomon,ssd1306-i2c
              - solomon,ssd1306
    then:
      properties:
        solomon,dclk-div:
@@ -159,7 +197,9 @@ allOf:
      properties:
        compatible:
          contains:
            const: solomon,ssd1307fb-i2c
            enum:
              - solomon,ssd1307-i2c
              - solomon,ssd1307
    then:
      properties:
        solomon,dclk-div:
@@ -173,7 +213,9 @@ allOf:
      properties:
        compatible:
          contains:
            const: solomon,ssd1309fb-i2c
            enum:
              - solomon,ssd1309-i2c
              - solomon,ssd1309
    then:
      properties:
        solomon,dclk-div:
@@ -189,15 +231,15 @@ examples:
            #address-cells = <1>;
            #size-cells = <0>;

            ssd1307: oled@3c {
                    compatible = "solomon,ssd1307fb-i2c";
            ssd1307_i2c: oled@3c {
                    compatible = "solomon,ssd1307";
                    reg = <0x3c>;
                    pwms = <&pwm 4 3000>;
                    reset-gpios = <&gpio2 7>;
            };

            ssd1306: oled@3d {
                    compatible = "solomon,ssd1306fb-i2c";
            ssd1306_i2c: oled@3d {
                    compatible = "solomon,ssd1306";
                    reg = <0x3c>;
                    pwms = <&pwm 4 3000>;
                    reset-gpios = <&gpio2 7>;
@@ -207,3 +249,30 @@ examples:
                    solomon,lookup-table = /bits/ 8 <0x3f 0x3f 0x3f 0x3f>;
            };
    };
  - |
    spi {
            #address-cells = <1>;
            #size-cells = <0>;

            ssd1307_spi: oled@0 {
                    compatible = "solomon,ssd1307";
                    reg = <0x0>;
                    pwms = <&pwm 4 3000>;
                    reset-gpios = <&gpio2 7>;
                    dc-gpios = <&gpio2 8>;
                    spi-max-frequency = <10000000>;
            };

            ssd1306_spi: oled@1 {
                    compatible = "solomon,ssd1306";
                    reg = <0x1>;
                    pwms = <&pwm 4 3000>;
                    reset-gpios = <&gpio2 7>;
                    dc-gpios = <&gpio2 8>;
                    spi-max-frequency = <10000000>;
                    solomon,com-lrremap;
                    solomon,com-invdir;
                    solomon,com-offset = <32>;
                    solomon,lookup-table = /bits/ 8 <0x3f 0x3f 0x3f 0x3f>;
            };
    };
+2 −0
Original line number Diff line number Diff line
@@ -1130,6 +1130,8 @@ patternProperties:
    description: Sinlinx Electronics Technology Co., LTD
  "^sinovoip,.*":
    description: SinoVoip Co., Ltd
  "^sinowealth,.*":
    description: SINO WEALTH Electronic Ltd.
  "^sipeed,.*":
    description: Shenzhen Sipeed Technology Co., Ltd.
  "^sirf,.*":
+5 −22
Original line number Diff line number Diff line
@@ -105,6 +105,7 @@ structure to represent a mediated device's driver::
     struct mdev_driver {
	     int  (*probe)  (struct mdev_device *dev);
	     void (*remove) (struct mdev_device *dev);
	     struct attribute_group **supported_type_groups;
	     struct device_driver    driver;
     };

@@ -119,33 +120,15 @@ to register and unregister itself with the core driver:

    extern void mdev_unregister_driver(struct mdev_driver *drv);

The mediated bus driver is responsible for adding mediated devices to the VFIO
group when devices are bound to the driver and removing mediated devices from
the VFIO when devices are unbound from the driver.


Physical Device Driver Interface
--------------------------------

The physical device driver interface provides the mdev_parent_ops[3] structure
to define the APIs to manage work in the mediated core driver that is related
to the physical device.

The structures in the mdev_parent_ops structure are as follows:

* dev_attr_groups: attributes of the parent device
* mdev_attr_groups: attributes of the mediated device
* supported_config: attributes to define supported configurations
* device_driver: device driver to bind for mediated device instances

The mdev_parent_ops also still has various functions pointers.  Theses exist
for historical reasons only and shall not be used for new drivers.
The mediated bus driver's probe function should create a vfio_device on top of
the mdev_device and connect it to an appropriate implementation of
vfio_device_ops.

When a driver wants to add the GUID creation sysfs to an existing device it has
probe'd to then it should call::

	extern int  mdev_register_device(struct device *dev,
	                                 const struct mdev_parent_ops *ops);
	                                 struct mdev_driver *mdev_driver);

This will provide the 'mdev_supported_types/XX/create' files which can then be
used to trigger the creation of a mdev_device. The created mdev_device will be
Loading