Commit 2e149283 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-next-2023-06-01' of git://anongit.freedesktop.org/drm/drm-misc into drm-next



drm-misc-next for v6.5:

UAPI Changes:

Cross-subsystem Changes:

 * fbdev:
   * Add Kconfig options and initializer macros for file I/O, convert
     DRM fbdev emulation

Core Changes:

 * Unify handling of struct file_operations.show_fdinfo

 * Use .probe in all i2c code (interface cleanup)

 * TTM:
   * Remove unused code

Driver Changes:

 * amdgpu:
   * Use shared show_fdinfo code
   * Fix building without procfs

 * bridge:
   * display-conenctor: Add support for external power supply
   * samsung-dsim: Fix enabling; Support variable clocking
   * tc358767: Fixes
   * ti-sn65dsi83: Fix enabling

 * msm:
   * Use shared show_fdinfo code

 * msxfb:
   * Add support for i.MX93 LCDIF

 * panel:
   * Add support for Ampire AM-800480L1TMQW-T00H plus DT bindings
   * panel-edp: Convert .remove to return void

 * stm:
   * dsi: Use devm_ helper
   * ltdc: Fix potential invalid pointer deref

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230601112246.GA10882@linux-uq9g
parents 85d712f0 43049f17
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -70,7 +70,9 @@ properties:
  samsung,burst-clock-frequency:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      DSIM high speed burst mode frequency.
      DSIM high speed burst mode frequency.  If absent,
      the pixel clock from the attached device or bridge
      will be used instead.

  samsung,esc-clock-frequency:
    $ref: /schemas/types.yaml#/definitions/uint32
@@ -80,7 +82,8 @@ properties:
  samsung,pll-clock-frequency:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      DSIM oscillator clock frequency.
      DSIM oscillator clock frequency. If absent, the clock frequency
      of sclk_mipi will be used instead.

  phys:
    maxItems: 1
@@ -100,7 +103,8 @@ properties:
          specified.

      port@1:
        $ref: /schemas/graph.yaml#/properties/port
        $ref: /schemas/graph.yaml#/$defs/port-base
        unevaluatedProperties: false
        description:
          DSI output port node to the panel or the next bridge
          in the chain.
@@ -134,9 +138,7 @@ required:
  - compatible
  - interrupts
  - reg
  - samsung,burst-clock-frequency
  - samsung,esc-clock-frequency
  - samsung,pll-clock-frequency

allOf:
  - $ref: ../dsi-controller.yaml#
+3 −0
Original line number Diff line number Diff line
@@ -36,6 +36,9 @@ properties:
    description: GPIO signal to enable DDC bus
    maxItems: 1

  hdmi-pwr-supply:
    description: Power supply for the HDMI +5V Power pin

  port:
    $ref: /schemas/graph.yaml#/properties/port
    description: Connection to controller providing HDMI signals
+6 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ properties:
          - fsl,imx28-lcdif
          - fsl,imx6sx-lcdif
          - fsl,imx8mp-lcdif
          - fsl,imx93-lcdif
      - items:
          - enum:
              - fsl,imx6sl-lcdif
@@ -88,7 +89,9 @@ allOf:
      properties:
        compatible:
          contains:
            const: fsl,imx8mp-lcdif
            enum:
              - fsl,imx8mp-lcdif
              - fsl,imx93-lcdif
    then:
      properties:
        clocks:
@@ -107,6 +110,7 @@ allOf:
              enum:
                - fsl,imx6sx-lcdif
                - fsl,imx8mp-lcdif
                - fsl,imx93-lcdif
    then:
      properties:
        clocks:
@@ -123,6 +127,7 @@ allOf:
              - fsl,imx8mm-lcdif
              - fsl,imx8mn-lcdif
              - fsl,imx8mp-lcdif
              - fsl,imx93-lcdif
    then:
      required:
        - power-domains
+2 −0
Original line number Diff line number Diff line
@@ -33,6 +33,8 @@ properties:
      - ampire,am-1280800n3tzqw-t00h
        # Ampire AM-480272H3TMQW-T01H 4.3" WQVGA TFT LCD panel
      - ampire,am-480272h3tmqw-t01h
        # Ampire AM-800480L1TMQW-T00H 5" WVGA TFT LCD panel
      - ampire,am-800480l1tmqw-t00h
        # Ampire AM-800480R3TMQW-A1H 7.0" WVGA TFT LCD panel
      - ampire,am800480r3tmqwa1h
        # Ampire AM-800600P5TMQW-TB8H 8.0" SVGA TFT LCD panel
+65 −26
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ File format specification
- All keys shall be prefixed with `drm-`.
- Whitespace between the delimiter and first non-whitespace character shall be
  ignored when parsing.
- Neither keys or values are allowed to contain whitespace characters.
- Keys are not allowed to contain whitespace characters.
- Numerical key value pairs can end with optional unit string.
- Data type of the value is fixed as defined in the specification.

@@ -39,12 +39,13 @@ Data types
----------

- <uint> - Unsigned integer without defining the maximum value.
- <str> - String excluding any above defined reserved characters or whitespace.
- <keystr> - String excluding any above defined reserved characters or whitespace.
- <valstr> - String.

Mandatory fully standardised keys
---------------------------------

- drm-driver: <str>
- drm-driver: <valstr>

String shall contain the name this driver registered as via the respective
`struct drm_driver` data structure.
@@ -52,6 +53,9 @@ String shall contain the name this driver registered as via the respective
Optional fully standardised keys
--------------------------------

Identification
^^^^^^^^^^^^^^

- drm-pdev: <aaaa:bb.cc.d>

For PCI devices this should contain the PCI slot address of the device in
@@ -69,10 +73,13 @@ scope of each device, in which case `drm-pdev` shall be present as well.
Userspace should make sure to not double account any usage statistics by using
the above described criteria in order to associate data to individual clients.

- drm-engine-<str>: <uint> ns
Utilization
^^^^^^^^^^^

- drm-engine-<keystr>: <uint> ns

GPUs usually contain multiple execution engines. Each shall be given a stable
and unique name (str), with possible values documented in the driver specific
and unique name (keystr), with possible values documented in the driver specific
documentation.

Value shall be in specified time units which the respective GPU engine spent
@@ -84,31 +91,19 @@ larger value within a reasonable period. Upon observing a value lower than what
was previously read, userspace is expected to stay with that larger previous
value until a monotonic update is seen.

- drm-engine-capacity-<str>: <uint>
- drm-engine-capacity-<keystr>: <uint>

Engine identifier string must be the same as the one specified in the
drm-engine-<str> tag and shall contain a greater than zero number in case the
drm-engine-<keystr> tag and shall contain a greater than zero number in case the
exported engine corresponds to a group of identical hardware engines.

In the absence of this tag parser shall assume capacity of one. Zero capacity
is not allowed.

- drm-memory-<str>: <uint> [KiB|MiB]

Each possible memory type which can be used to store buffer objects by the
GPU in question shall be given a stable and unique name to be returned as the
string here.

Value shall reflect the amount of storage currently consumed by the buffer
object belong to this client, in the respective memory region.

Default unit shall be bytes with optional unit specifiers of 'KiB' or 'MiB'
indicating kibi- or mebi-bytes.

- drm-cycles-<str> <uint>
- drm-cycles-<keystr>: <uint>

Engine identifier string must be the same as the one specified in the
drm-engine-<str> tag and shall contain the number of busy cycles for the given
drm-engine-<keystr> tag and shall contain the number of busy cycles for the given
engine.

Values are not required to be constantly monotonic if it makes the driver
@@ -117,16 +112,60 @@ larger value within a reasonable period. Upon observing a value lower than what
was previously read, userspace is expected to stay with that larger previous
value until a monotonic update is seen.

- drm-maxfreq-<str> <uint> [Hz|MHz|KHz]
- drm-maxfreq-<keystr>: <uint> [Hz|MHz|KHz]

Engine identifier string must be the same as the one specified in the
drm-engine-<str> tag and shall contain the maximum frequency for the given
engine.  Taken together with drm-cycles-<str>, this can be used to calculate
percentage utilization of the engine, whereas drm-engine-<str> only reflects
drm-engine-<keystr> tag and shall contain the maximum frequency for the given
engine.  Taken together with drm-cycles-<keystr>, this can be used to calculate
percentage utilization of the engine, whereas drm-engine-<keystr> only reflects
time active without considering what frequency the engine is operating as a
percentage of it's maximum frequency.

Memory
^^^^^^

- drm-memory-<region>: <uint> [KiB|MiB]

Each possible memory type which can be used to store buffer objects by the
GPU in question shall be given a stable and unique name to be returned as the
string here.  The name "memory" is reserved to refer to normal system memory.

Value shall reflect the amount of storage currently consumed by the buffer
objects belong to this client, in the respective memory region.

Default unit shall be bytes with optional unit specifiers of 'KiB' or 'MiB'
indicating kibi- or mebi-bytes.

- drm-shared-<region>: <uint> [KiB|MiB]

The total size of buffers that are shared with another file (ie. have more
than a single handle).

- drm-total-<region>: <uint> [KiB|MiB]

The total size of buffers that including shared and private memory.

- drm-resident-<region>: <uint> [KiB|MiB]

The total size of buffers that are resident in the specified region.

- drm-purgeable-<region>: <uint> [KiB|MiB]

The total size of buffers that are purgeable.

- drm-active-<region>: <uint> [KiB|MiB]

The total size of buffers that are active on one or more engines.

Implementation Details
======================

Drivers should use drm_show_fdinfo() in their `struct file_operations`, and
implement &drm_driver.show_fdinfo if they wish to provide any stats which
are not provided by drm_show_fdinfo().  But even driver specific stats should
be documented above and where possible, aligned with other drivers.

Driver specific implementations
===============================
-------------------------------

:ref:`i915-usage-stats`
Loading