Skip to content

Commit a594533

Browse files
committed
Merge tag 'drm-next-2022-12-13' of git://anongit.freedesktop.org/drm/drm
Pull drm updates from Dave Airlie: "The biggest highlight is that the accel subsystem framework is merged. Hopefully for 6.3 we will be able to line up a driver to use it. In drivers land, i915 enables DG2 support by default now, and nouveau has a big stability refactoring and initial ampere support, AMD includes new hw IP support and should build on ARM again. There is also an ofdrm driver to take over offb on platforms it's used. Stuff outside my tree, the dma-buf patches hit a few places, the vc4 firmware changes also do, and i915 has some interactions with MEI for discrete GPUs. I think all of those should have been acked/reviewed by relevant parties. New driver: - ofdrm - replacement for offb fbdev: - add support for nomodeset fourcc: - add Vivante tiled modifier core: - atomic-helpers: CRTC primary plane test fixes, fb access hooks - connector: TV API consistency, cmdline parser improvements - send connector hotplug on cleanup - sort makefile objects tests: - sort kunit tests - improve DP-MST tests - add kunit helpers to create a device sched: - module param for scheduling policy - refcounting fix buddy: - add back random seed log ttm: - convert ttm_resource to size_t - optimize pool allocations edid: - HFVSDB parsing support fixes - logging/debug improvements - DSC quirks dma-buf: - Add unlocked vmap and attachment mapping - move drivers to common locking convention - locking improvements firmware: - new API for rPI firmware and vc4 xilinx: - zynqmp: displayport bridge support - dpsub fix bridge: - adv7533: Remove dynamic lane switching - it6505: Runtime PM support, sync improvements - ps8640: Handle AUX defer messages - tc358775: Drop soft-reset over I2C panel: - panel-edp: Add INX N116BGE-EA2 C2 and C4 support. - Jadard JD9365DA-H3 - NewVision NV3051D amdgpu: - DCN support on ARM - DCN 2.1 secure display - Sienna Cichlid mode2 reset fixes - new GC 11.x firmware versions - drop AMD specific DSC workarounds in favour of drm code - clang warning fixes - scheduler rework - SR-IOV fixes - GPUVM locking fixes - fix memory leak in CS IOCTL error path - flexible array updates - enable new GC/PSP/SMU/NBIO IP - GFX preemption support for gfx9 amdkfd: - cache size fixes - userptr fixes - enable cooperative launch on gfx 10.3 - enable GC 11.0.4 KFD support radeon: - replace kmap with kmap_local_page - ACPI ref count fix - HDA audio notifier support i915: - DG2 enabled by default - MTL enablement work - hotplug refactoring - VBT improvements - Display and watermark refactoring - ADL-P workaround - temp disable runtime_pm for discrete- - fix for A380 as a secondary GPU - Wa_18017747507 for DG2 - CS timestamp support fixes for gen5 and earlier - never purge busy TTM objects - use i915_sg_dma_sizes for all backends - demote GuC kernel contexts to normal priority - gvt: refactor for new MDEV interface - enable DC power states on eDP ports - fix gen 2/3 workarounds nouveau: - fix page fault handling - Ampere acceleration support - driver stability improvements - nva3 backlight support msm: - MSM_INFO_GET_FLAGS support - DPU: XR30 and P010 image formats - Qualcomm SM6115 support - DSI PHY support for QCM2290 - HDMI: refactored dev init path - remove exclusive-fence hack - fix speed-bin detection - enable clamp to idle on 7c3 - improved hangcheck detection vmwgfx: - fb and cursor refactoring - convert to generic hashtable - cursor improvements etnaviv: - hw workarounds - softpin MMU fixes ast: - atomic gamma LUT support - convert to SHMEM lcdif: - support YUV planes - Increase DMA burst size - FIFO threshold tuning meson: - fix return type of cvbs mode_valid mgag200: - fix PLL setup on some revisions sun4i: - A100 and D1 support udl: - modesetting improvements - hot unplug support vc4: - support PAL-M - fix regression preventing 4K @ 60Hz - fix NULL ptr deref v3d: - switch to drm managed resources renesas: - RZ/G2L DSI support - DU Kconfig cleanup mediatek: - fixup dpi and hdmi - MT8188 dpi support - MT8195 AFBC support tegra: - NVDEC hardware on Tegra234 SoC hdlcd: - switch to drm managed resources ingenic: - fix registration error path hisilicon: - convert to drm_mode_init maildp: - use managed resources mtk: - use drm_mode_init rockchip: - use drm_mode_copy" * tag 'drm-next-2022-12-13' of git://anongit.freedesktop.org/drm/drm: (1397 commits) drm/amdgpu: fix mmhub register base coding error drm/amdgpu: add tmz support for GC IP v11.0.4 drm/amdgpu: enable GFX Clock Gating control for GC IP v11.0.4 drm/amdgpu: enable GFX Power Gating for GC IP v11.0.4 drm/amdgpu: enable GFX IP v11.0.4 CG support drm/amdgpu: Make amdgpu_ring_mux functions as static drm/amdgpu: generally allow over-commit during BO allocation drm/amd/display: fix array index out of bound error in DCN32 DML drm/amd/display: 3.2.215 drm/amd/display: set optimized required for comp buf changes drm/amd/display: Add debug option to skip PSR CRTC disable drm/amd/display: correct DML calc error of UrgentLatency drm/amd/display: correct static_screen_event_mask drm/amd/display: Ensure commit_streams returns the DC return code drm/amd/display: read invalid ddc pin status cause engine busy drm/amd/display: Bypass DET swath fill check for max clocks drm/amd/display: Disable uclk pstate for subvp pipes drm/amd/display: Fix DCN2.1 default DSC clocks drm/amd/display: Enable dp_hdmi21_pcon support drm/amd/display: prevent seamless boot on displays that don't have the preferred dig ...
2 parents cdb9d35 + 66efff5 commit a594533

File tree

1,498 files changed

+50470
-29875
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,498 files changed

+50470
-29875
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
What: /sys/devices/.../hwmon/hwmon<i>/in0_input
2+
Date: February 2023
3+
KernelVersion: 6.2
4+
5+
Description: RO. Current Voltage in millivolt.
6+
7+
Only supported for particular Intel i915 graphics platforms.
8+
9+
What: /sys/devices/.../hwmon/hwmon<i>/power1_max
10+
Date: February 2023
11+
KernelVersion: 6.2
12+
13+
Description: RW. Card reactive sustained (PL1/Tau) power limit in microwatts.
14+
15+
The power controller will throttle the operating frequency
16+
if the power averaged over a window (typically seconds)
17+
exceeds this limit.
18+
19+
Only supported for particular Intel i915 graphics platforms.
20+
21+
What: /sys/devices/.../hwmon/hwmon<i>/power1_rated_max
22+
Date: February 2023
23+
KernelVersion: 6.2
24+
25+
Description: RO. Card default power limit (default TDP setting).
26+
27+
Only supported for particular Intel i915 graphics platforms.
28+
29+
What: /sys/devices/.../hwmon/hwmon<i>/power1_max_interval
30+
Date: February 2023
31+
KernelVersion: 6.2
32+
33+
Description: RW. Sustained power limit interval (Tau in PL1/Tau) in
34+
milliseconds over which sustained power is averaged.
35+
36+
Only supported for particular Intel i915 graphics platforms.
37+
38+
What: /sys/devices/.../hwmon/hwmon<i>/power1_crit
39+
Date: February 2023
40+
KernelVersion: 6.2
41+
42+
Description: RW. Card reactive critical (I1) power limit in microwatts.
43+
44+
Card reactive critical (I1) power limit in microwatts is exposed
45+
for client products. The power controller will throttle the
46+
operating frequency if the power averaged over a window exceeds
47+
this limit.
48+
49+
Only supported for particular Intel i915 graphics platforms.
50+
51+
What: /sys/devices/.../hwmon/hwmon<i>/curr1_crit
52+
Date: February 2023
53+
KernelVersion: 6.2
54+
55+
Description: RW. Card reactive critical (I1) power limit in milliamperes.
56+
57+
Card reactive critical (I1) power limit in milliamperes is
58+
exposed for server products. The power controller will throttle
59+
the operating frequency if the power averaged over a window
60+
exceeds this limit.
61+
62+
Only supported for particular Intel i915 graphics platforms.
63+
64+
What: /sys/devices/.../hwmon/hwmon<i>/energy1_input
65+
Date: February 2023
66+
KernelVersion: 6.2
67+
68+
Description: RO. Energy input of device or gt in microjoules.
69+
70+
For i915 device level hwmon devices (name "i915") this
71+
reflects energy input for the entire device. For gt level
72+
hwmon devices (name "i915_gtN") this reflects energy input
73+
for the gt.
74+
75+
Only supported for particular Intel i915 graphics platforms.

Documentation/accel/index.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
====================
4+
Compute Accelerators
5+
====================
6+
7+
.. toctree::
8+
:maxdepth: 1
9+
10+
introduction
11+
12+
.. only:: subproject and html
13+
14+
Indices
15+
=======
16+
17+
* :ref:`genindex`

Documentation/accel/introduction.rst

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
============
4+
Introduction
5+
============
6+
7+
The Linux compute accelerators subsystem is designed to expose compute
8+
accelerators in a common way to user-space and provide a common set of
9+
functionality.
10+
11+
These devices can be either stand-alone ASICs or IP blocks inside an SoC/GPU.
12+
Although these devices are typically designed to accelerate
13+
Machine-Learning (ML) and/or Deep-Learning (DL) computations, the accel layer
14+
is not limited to handling these types of accelerators.
15+
16+
Typically, a compute accelerator will belong to one of the following
17+
categories:
18+
19+
- Edge AI - doing inference at an edge device. It can be an embedded ASIC/FPGA,
20+
or an IP inside a SoC (e.g. laptop web camera). These devices
21+
are typically configured using registers and can work with or without DMA.
22+
23+
- Inference data-center - single/multi user devices in a large server. This
24+
type of device can be stand-alone or an IP inside a SoC or a GPU. It will
25+
have on-board DRAM (to hold the DL topology), DMA engines and
26+
command submission queues (either kernel or user-space queues).
27+
It might also have an MMU to manage multiple users and might also enable
28+
virtualization (SR-IOV) to support multiple VMs on the same device. In
29+
addition, these devices will usually have some tools, such as profiler and
30+
debugger.
31+
32+
- Training data-center - Similar to Inference data-center cards, but typically
33+
have more computational power and memory b/w (e.g. HBM) and will likely have
34+
a method of scaling-up/out, i.e. connecting to other training cards inside
35+
the server or in other servers, respectively.
36+
37+
All these devices typically have different runtime user-space software stacks,
38+
that are tailored-made to their h/w. In addition, they will also probably
39+
include a compiler to generate programs to their custom-made computational
40+
engines. Typically, the common layer in user-space will be the DL frameworks,
41+
such as PyTorch and TensorFlow.
42+
43+
Sharing code with DRM
44+
=====================
45+
46+
Because this type of devices can be an IP inside GPUs or have similar
47+
characteristics as those of GPUs, the accel subsystem will use the
48+
DRM subsystem's code and functionality. i.e. the accel core code will
49+
be part of the DRM subsystem and an accel device will be a new type of DRM
50+
device.
51+
52+
This will allow us to leverage the extensive DRM code-base and
53+
collaborate with DRM developers that have experience with this type of
54+
devices. In addition, new features that will be added for the accelerator
55+
drivers can be of use to GPU drivers as well.
56+
57+
Differentiation from GPUs
58+
=========================
59+
60+
Because we want to prevent the extensive user-space graphic software stack
61+
from trying to use an accelerator as a GPU, the compute accelerators will be
62+
differentiated from GPUs by using a new major number and new device char files.
63+
64+
Furthermore, the drivers will be located in a separate place in the kernel
65+
tree - drivers/accel/.
66+
67+
The accelerator devices will be exposed to the user space with the dedicated
68+
261 major number and will have the following convention:
69+
70+
- device char files - /dev/accel/accel*
71+
- sysfs - /sys/class/accel/accel*/
72+
- debugfs - /sys/kernel/debug/accel/accel*/
73+
74+
Getting Started
75+
===============
76+
77+
First, read the DRM documentation at Documentation/gpu/index.rst.
78+
Not only it will explain how to write a new DRM driver but it will also
79+
contain all the information on how to contribute, the Code Of Conduct and
80+
what is the coding style/documentation. All of that is the same for the
81+
accel subsystem.
82+
83+
Second, make sure the kernel is configured with CONFIG_DRM_ACCEL.
84+
85+
To expose your device as an accelerator, two changes are needed to
86+
be done in your driver (as opposed to a standard DRM driver):
87+
88+
- Add the DRIVER_COMPUTE_ACCEL feature flag in your drm_driver's
89+
driver_features field. It is important to note that this driver feature is
90+
mutually exclusive with DRIVER_RENDER and DRIVER_MODESET. Devices that want
91+
to expose both graphics and compute device char files should be handled by
92+
two drivers that are connected using the auxiliary bus framework.
93+
94+
- Change the open callback in your driver fops structure to accel_open().
95+
Alternatively, your driver can use DEFINE_DRM_ACCEL_FOPS macro to easily
96+
set the correct function operations pointers structure.
97+
98+
External References
99+
===================
100+
101+
email threads
102+
-------------
103+
104+
* `Initial discussion on the New subsystem for acceleration devices <https://lkml.org/lkml/2022/7/31/83>`_ - Oded Gabbay (2022)
105+
* `patch-set to add the new subsystem <https://lkml.org/lkml/2022/10/22/544>`_ - Oded Gabbay (2022)
106+
107+
Conference talks
108+
----------------
109+
110+
* `LPC 2022 Accelerators BOF outcomes summary <https://airlied.blogspot.com/2022/09/accelerators-bof-outcomes-summary.html>`_ - Dave Airlie (2022)

Documentation/admin-guide/devices.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3080,6 +3080,11 @@
30803080
...
30813081
255 = /dev/osd255 256th OSD Device
30823082

3083+
261 char Compute Acceleration Devices
3084+
0 = /dev/accel/accel0 First acceleration device
3085+
1 = /dev/accel/accel1 Second acceleration device
3086+
...
3087+
30833088
384-511 char RESERVED FOR DYNAMIC ASSIGNMENT
30843089
Character devices that request a dynamic allocation of major
30853090
number will take numbers starting from 511 and downward,

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3785,12 +3785,15 @@
37853785
shutdown the other cpus. Instead use the REBOOT_VECTOR
37863786
irq.
37873787

3788-
nomodeset Disable kernel modesetting. DRM drivers will not perform
3789-
display-mode changes or accelerated rendering. Only the
3790-
system framebuffer will be available for use if this was
3791-
set-up by the firmware or boot loader.
3792-
3793-
Useful as fallback, or for testing and debugging.
3788+
nomodeset Disable kernel modesetting. Most systems' firmware
3789+
sets up a display mode and provides framebuffer memory
3790+
for output. With nomodeset, DRM and fbdev drivers will
3791+
not load if they could possibly displace the pre-
3792+
initialized output. Only the system framebuffer will
3793+
be available for use. The respective drivers will not
3794+
perform display-mode changes or accelerated rendering.
3795+
3796+
Useful as error fallback, or for testing and debugging.
37943797

37953798
nomodule Disable module load
37963799

Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@ maintainers:
1212

1313
properties:
1414
compatible:
15-
enum:
16-
- allwinner,sun6i-a31-mipi-dsi
17-
- allwinner,sun50i-a64-mipi-dsi
15+
oneOf:
16+
- enum:
17+
- allwinner,sun6i-a31-mipi-dsi
18+
- allwinner,sun50i-a64-mipi-dsi
19+
- allwinner,sun50i-a100-mipi-dsi
20+
- items:
21+
- const: allwinner,sun20i-d1-mipi-dsi
22+
- const: allwinner,sun50i-a100-mipi-dsi
1823

1924
reg:
2025
maxItems: 1
@@ -59,7 +64,6 @@ required:
5964
- phys
6065
- phy-names
6166
- resets
62-
- vcc-dsi-supply
6367
- port
6468

6569
allOf:
@@ -68,7 +72,9 @@ allOf:
6872
properties:
6973
compatible:
7074
contains:
71-
const: allwinner,sun6i-a31-mipi-dsi
75+
enum:
76+
- allwinner,sun6i-a31-mipi-dsi
77+
- allwinner,sun50i-a100-mipi-dsi
7278

7379
then:
7480
properties:
@@ -78,16 +84,22 @@ allOf:
7884
required:
7985
- clock-names
8086

87+
else:
88+
properties:
89+
clocks:
90+
maxItems: 1
91+
8192
- if:
8293
properties:
8394
compatible:
8495
contains:
85-
const: allwinner,sun50i-a64-mipi-dsi
96+
enum:
97+
- allwinner,sun6i-a31-mipi-dsi
98+
- allwinner,sun50i-a64-mipi-dsi
8699

87100
then:
88-
properties:
89-
clocks:
90-
minItems: 1
101+
required:
102+
- vcc-dsi-supply
91103

92104
unevaluatedProperties: false
93105

0 commit comments

Comments
 (0)