Commit 7446fbf0 authored by Simona Vetter's avatar Simona Vetter
Browse files

Merge tag 'drm-misc-next-2025-10-28' of...

Merge tag 'drm-misc-next-2025-10-28' of https://gitlab.freedesktop.org/drm/misc/kernel

 into drm-next

drm-misc-next for v6.19-rc1:

UAPI Changes:

Cross-subsystem Changes:
- Update DT bindings for renesas and powervr-rogue.
- Update MAINTAINERS email and add spsc_queue.

Core Changes:
- Allow ttm page protection flags on risc-v.
- Move freeing of drm client memory to driver.

Driver Changes:
- Assorted small fixes and updates to qaic, ivpu, st7571-i2c, gud,
  amdxdna.
- Allow configuration of vkms' display through configfs.
- Add Arm Ethos-U65/U85 accel driver.

Signed-off-by: default avatarSimona Vetter <simona.vetter@ffwll.ch>
From: Maarten Lankhorst <dev@lankhorst.se>
Link: https://patch.msgid.link/32b43261-3c99-49d9-92ee-615ada1d01e8@lankhorst.se
parents f53128e3 4f9ffd2c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -173,6 +173,7 @@ Carlos Bilbao <carlos.bilbao@kernel.org> <bilbao@vt.edu>
Changbin Du <changbin.du@intel.com> <changbin.du@gmail.com>
Chao Yu <chao@kernel.org> <chao2.yu@samsung.com>
Chao Yu <chao@kernel.org> <yuchao0@huawei.com>
Chen-Yu Tsai <wens@kernel.org> <wens@csie.org>
Chester Lin <chester62515@gmail.com> <clin@suse.com>
Chris Chiu <chris.chiu@canonical.com> <chiu@endlessm.com>
Chris Chiu <chris.chiu@canonical.com> <chiu@endlessos.org>
+51 −2
Original line number Diff line number Diff line
@@ -14,6 +14,9 @@ description: |
  R-Car Gen4 SoCs. The encoder can operate in either DSI or CSI-2 mode, with up
  to four data lanes.

allOf:
  - $ref: /schemas/display/dsi-controller.yaml#

properties:
  compatible:
    enum:
@@ -80,14 +83,14 @@ required:
  - resets
  - ports

additionalProperties: false
unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/r8a779a0-cpg-mssr.h>
    #include <dt-bindings/power/r8a779a0-sysc.h>

    dsi0: dsi-encoder@fed80000 {
    dsi@fed80000 {
        compatible = "renesas,r8a779a0-dsi-csi2-tx";
        reg = <0xfed80000 0x10000>;
        power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
@@ -117,4 +120,50 @@ examples:
            };
        };
    };

  - |
    #include <dt-bindings/clock/r8a779g0-cpg-mssr.h>
    #include <dt-bindings/power/r8a779g0-sysc.h>

    dsi@fed80000 {
        #address-cells = <1>;
        #size-cells = <0>;
        compatible = "renesas,r8a779g0-dsi-csi2-tx";
        reg = <0xfed80000 0x10000>;
        clocks = <&cpg CPG_MOD 415>,
                 <&cpg CPG_CORE R8A779G0_CLK_DSIEXT>,
                 <&cpg CPG_CORE R8A779G0_CLK_DSIREF>;
        clock-names = "fck", "dsi", "pll";
        power-domains = <&sysc R8A779G0_PD_ALWAYS_ON>;
        resets = <&cpg 415>;

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

            port@0 {
                reg = <0>;
            };

            port@1 {
                reg = <1>;

                dsi0port1_out: endpoint {
                    remote-endpoint = <&panel_in>;
                    data-lanes = <1 2>;
                };
            };
        };

        panel@0 {
            reg = <0>;
            compatible = "raspberrypi,dsi-7inch";

            port {
                panel_in: endpoint {
                    remote-endpoint = <&dsi0port1_out>;
                };
            };
        };
    };
...
+38 −22
Original line number Diff line number Diff line
@@ -13,6 +13,12 @@ maintainers:
properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - renesas,r8a7796-gpu
              - renesas,r8a77961-gpu
          - const: img,img-gx6250
          - const: img,img-rogue
      - items:
          - enum:
              - ti,am62-gpu
@@ -86,48 +92,55 @@ allOf:
      properties:
        compatible:
          contains:
            const: img,img-axe-1-16m
            enum:
              - ti,am62-gpu
              - ti,j721s2-gpu
    then:
      properties:
        power-domains:
          items:
            - description: Power domain A
        power-domain-names:
        clocks:
          maxItems: 1
      required:
        - power-domains
        - power-domain-names


  - if:
      properties:
        compatible:
          contains:
            const: thead,th1520-gpu
            enum:
              - img,img-gx6250
              - thead,th1520-gpu
    then:
      properties:
        clocks:
          minItems: 3
        clock-names:
          minItems: 3

  - if:
      properties:
        compatible:
          contains:
            const: img,img-axe-1-16m
    then:
      properties:
        power-domains:
          items:
            - description: The single, unified power domain for the GPU on the
                TH1520 SoC, integrating all internal IP power domains.
        power-domain-names: false
          maxItems: 1
        power-domain-names:
          maxItems: 1
      required:
        - power-domains
        - power-domain-names

  - if:
      properties:
        compatible:
          contains:
            const: img,img-bxs-4-64
            enum:
              - img,img-gx6250
              - img,img-bxs-4-64
    then:
      properties:
        power-domains:
          items:
            - description: Power domain A
            - description: Power domain B
          minItems: 2
        power-domain-names:
          minItems: 2
      required:
@@ -138,13 +151,16 @@ allOf:
      properties:
        compatible:
          contains:
            enum:
              - ti,am62-gpu
              - ti,j721s2-gpu
            const: thead,th1520-gpu
    then:
      properties:
        clocks:
          maxItems: 1
        power-domains:
          items:
            - description: The single, unified power domain for the GPU on the
                TH1520 SoC, integrating all internal IP power domains.
        power-domain-names: false
      required:
        - power-domains

examples:
  - |
+79 −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/npu/arm,ethos.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Arm Ethos U65/U85

maintainers:
  - Rob Herring <robh@kernel.org>

description: >
  The Arm Ethos-U NPUs are designed for IoT inference applications. The NPUs
  can accelerate 8-bit and 16-bit integer quantized networks:

    Transformer networks (U85 only)
    Convolutional Neural Networks (CNN)
    Recurrent Neural Networks (RNN)

  Further documentation is available here:

    U65 TRM: https://developer.arm.com/documentation/102023/
    U85 TRM: https://developer.arm.com/documentation/102685/

properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - fsl,imx93-npu
          - const: arm,ethos-u65
      - items:
          - {}
          - const: arm,ethos-u85

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    maxItems: 2

  clock-names:
    items:
      - const: core
      - const: apb

  power-domains:
    maxItems: 1

  sram:
    maxItems: 1

required:
  - compatible
  - reg
  - interrupts
  - clocks

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/clock/imx93-clock.h>

    npu@4a900000 {
        compatible = "fsl,imx93-npu", "arm,ethos-u65";
        reg = <0x4a900000 0x1000>;
        interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
        power-domains = <&mlmix>;
        clocks = <&clk IMX93_CLK_ML>, <&clk IMX93_CLK_ML_APB>;
        clock-names = "core", "apb";
        sram = <&sram>;
    };
...
+92 −8
Original line number Diff line number Diff line
@@ -51,6 +51,97 @@ To disable the driver, use ::

  sudo modprobe -r vkms

Configuring With Configfs
=========================

It is possible to create and configure multiple VKMS instances via configfs.

Start by mounting configfs and loading VKMS::

  sudo mount -t configfs none /config
  sudo modprobe vkms

Once VKMS is loaded, ``/config/vkms`` is created automatically. Each directory
under ``/config/vkms`` represents a VKMS instance, create a new one::

  sudo mkdir /config/vkms/my-vkms

By default, the instance is disabled::

  cat /config/vkms/my-vkms/enabled
  0

And directories are created for each configurable item of the display pipeline::

  tree /config/vkms/my-vkms
  ├── connectors
  ├── crtcs
  ├── enabled
  ├── encoders
  └── planes

To add items to the display pipeline, create one or more directories under the
available paths.

Start by creating one or more planes::

  sudo mkdir /config/vkms/my-vkms/planes/plane0

Planes have 1 configurable attribute:

- type: Plane type: 0 overlay, 1 primary, 2 cursor (same values as those
  exposed by the "type" property of a plane)

Continue by creating one or more CRTCs::

  sudo mkdir /config/vkms/my-vkms/crtcs/crtc0

CRTCs have 1 configurable attribute:

- writeback: Enable or disable writeback connector support by writing 1 or 0

Next, create one or more encoders::

  sudo mkdir /config/vkms/my-vkms/encoders/encoder0

Last but not least, create one or more connectors::

  sudo mkdir /config/vkms/my-vkms/connectors/connector0

Connectors have 1 configurable attribute:

- status: Connection status: 1 connected, 2 disconnected, 3 unknown (same values
  as those exposed by the "status" property of a connector)

To finish the configuration, link the different pipeline items::

  sudo ln -s /config/vkms/my-vkms/crtcs/crtc0 /config/vkms/my-vkms/planes/plane0/possible_crtcs
  sudo ln -s /config/vkms/my-vkms/crtcs/crtc0 /config/vkms/my-vkms/encoders/encoder0/possible_crtcs
  sudo ln -s /config/vkms/my-vkms/encoders/encoder0 /config/vkms/my-vkms/connectors/connector0/possible_encoders

Since at least one primary plane is required, make sure to set the right type::

  echo "1" | sudo tee /config/vkms/my-vkms/planes/plane0/type

Once you are done configuring the VKMS instance, enable it::

  echo "1" | sudo tee /config/vkms/my-vkms/enabled

Finally, you can remove the VKMS instance disabling it::

  echo "0" | sudo tee /config/vkms/my-vkms/enabled

And removing the top level directory and its subdirectories::

  sudo rm /config/vkms/my-vkms/planes/*/possible_crtcs/*
  sudo rm /config/vkms/my-vkms/encoders/*/possible_crtcs/*
  sudo rm /config/vkms/my-vkms/connectors/*/possible_encoders/*
  sudo rmdir /config/vkms/my-vkms/planes/*
  sudo rmdir /config/vkms/my-vkms/crtcs/*
  sudo rmdir /config/vkms/my-vkms/encoders/*
  sudo rmdir /config/vkms/my-vkms/connectors/*
  sudo rmdir /config/vkms/my-vkms

Testing With IGT
================

@@ -147,21 +238,14 @@ Runtime Configuration
---------------------

We want to be able to reconfigure vkms instance without having to reload the
module. Use/Test-cases:
module through configfs. Use/Test-cases:

- Hotplug/hotremove connectors on the fly (to be able to test DP MST handling
  of compositors).

- Configure planes/crtcs/connectors (we'd need some code to have more than 1 of
  them first).

- Change output configuration: Plug/unplug screens, change EDID, allow changing
  the refresh rate.

The currently proposed solution is to expose vkms configuration through
configfs. All existing module options should be supported through configfs
too.

Writeback support
-----------------

Loading