Skip to content

Commit c79b972

Browse files
committed
Merge tag 'drm-misc-next-2023-11-17' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for 6.8: UAPI Changes: - drm: Introduce CLOSE_FB ioctl - drm/dp-mst: Documentation for the PATH property - fdinfo: Do not align to a MB if the size is larger than 1MiB - virtio-gpu: add explicit virtgpu context debug name Cross-subsystem Changes: - dma-buf: Add dma_fence_timestamp helper Core Changes: - client: Do not acquire module reference - edid: split out drm_eld, add SAD helpers - format-helper: Cache format conversion buffers - sched: Move from a kthread to a workqueue, rename some internal functions to make it clearer, implement dynamic job-flow control - gpuvm: Provide more features to handle GEM objects - tests: Remove slow kunit tests Driver Changes: - ivpu: Update FW API, new debugfs file, a new NOP job submission test mode, improve suspend/resume, PM improvements, MMU PT optimizations, firmware profiling frequency support, support for uncached buffers, switch to gem shmem helpers, replace kthread with threaded interrupts - panfrost: PM improvements - qaic: Allow to run with a single MSI, support host/device time synchronization, misc improvements - simplefb: Support memory-regions, support power-domains - ssd130x: Unitialized variable fixes - omapdrm: dma-fence lockdep annotation fix - tidss: dma-fence lockdep annotation fix - v3d: Support BCM2712 (RaspberryPi5), Support fdinfo and gputop - panel: - edp: Support AUO B116XTN02, BOE NT116WHM-N21,836X2, NV116WHM-N49 V8.0, plus a whole bunch of panels used on Mediatek chromebooks. Note that the one missing s-o-b for 0da611a ("dma-buf: add dma_fence_timestamp helper") has been supplied here, and rebasing the entire tree with upsetting committers didn't seem worth the trouble: https://lore.kernel.org/dri-devel/ce94020e-a7d4-4799-b87d-fbea7b14a268@gmail.com/ Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> From: Maxime Ripard <mripard@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/y4awn5vcfy2lr2hpauo7rc4nfpnc6kksr7btmnwaz7zk63pwoi@gwwef5iqpzva
2 parents 98b1cc8 + 3b434a3 commit c79b972

144 files changed

Lines changed: 5821 additions & 4423 deletions

File tree

Some content is hidden

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

Documentation/accel/qaic/aic100.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ AIC100 DID (0xa100).
3636

3737
AIC100 does not implement FLR (function level reset).
3838

39-
AIC100 implements MSI but does not implement MSI-X. AIC100 requires 17 MSIs to
40-
operate (1 for MHI, 16 for the DMA Bridge).
39+
AIC100 implements MSI but does not implement MSI-X. AIC100 prefers 17 MSIs to
40+
operate (1 for MHI, 16 for the DMA Bridge). Falling back to 1 MSI is possible in
41+
scenarios where reserving 32 MSIs isn't feasible.
4142

4243
As a PCIe device, AIC100 utilizes BARs to provide host interfaces to the device
4344
hardware. AIC100 provides 3, 64-bit BARs.
@@ -220,10 +221,14 @@ of the defined channels, and their uses.
220221
+----------------+---------+----------+----------------------------------------+
221222
| QAIC_DEBUG | 18 & 19 | AMSS | Not used. |
222223
+----------------+---------+----------+----------------------------------------+
223-
| QAIC_TIMESYNC | 20 & 21 | SBL/AMSS | Used to synchronize timestamps in the |
224+
| QAIC_TIMESYNC | 20 & 21 | SBL | Used to synchronize timestamps in the |
224225
| | | | device side logs with the host time |
225226
| | | | source. |
226227
+----------------+---------+----------+----------------------------------------+
228+
| QAIC_TIMESYNC | 22 & 23 | AMSS | Used to periodically synchronize |
229+
| _PERIODIC | | | timestamps in the device side logs with|
230+
| | | | the host time source. |
231+
+----------------+---------+----------+----------------------------------------+
227232

228233
DMA Bridge
229234
==========

Documentation/accel/qaic/qaic.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ accelerator products.
1010
Interrupts
1111
==========
1212

13+
IRQ Storm Mitigation
14+
--------------------
15+
1316
While the AIC100 DMA Bridge hardware implements an IRQ storm mitigation
1417
mechanism, it is still possible for an IRQ storm to occur. A storm can happen
1518
if the workload is particularly quick, and the host is responsive. If the host
@@ -35,6 +38,26 @@ generates 100k IRQs per second (per /proc/interrupts) is reduced to roughly 64
3538
IRQs over 5 minutes while keeping the host system stable, and having the same
3639
workload throughput performance (within run to run noise variation).
3740

41+
Single MSI Mode
42+
---------------
43+
44+
MultiMSI is not well supported on all systems; virtualized ones even less so
45+
(circa 2023). Between hypervisors masking the PCIe MSI capability structure to
46+
large memory requirements for vIOMMUs (required for supporting MultiMSI), it is
47+
useful to be able to fall back to a single MSI when needed.
48+
49+
To support this fallback, we allow the case where only one MSI is able to be
50+
allocated, and share that one MSI between MHI and the DBCs. The device detects
51+
when only one MSI has been configured and directs the interrupts for the DBCs
52+
to the interrupt normally used for MHI. Unfortunately this means that the
53+
interrupt handlers for every DBC and MHI wake up for every interrupt that
54+
arrives; however, the DBC threaded irq handlers only are started when work to be
55+
done is detected (MHI will always start its threaded handler).
56+
57+
If the DBC is configured to force MSI interrupts, this can circumvent the
58+
software IRQ storm mitigation mentioned above. Since the MSI is shared it is
59+
never disabled, allowing each new entry to the FIFO to trigger a new interrupt.
60+
3861

3962
Neural Network Control (NNC) Protocol
4063
=====================================
@@ -178,3 +201,8 @@ overrides this for that call. Default is 5000 (5 seconds).
178201

179202
Sets the polling interval in microseconds (us) when datapath polling is active.
180203
Takes effect at the next polling interval. Default is 100 (100 us).
204+
205+
**timesync_delay_ms (unsigned int)**
206+
207+
Sets the time interval in milliseconds (ms) between two consecutive timesync
208+
operations. Default is 1000 (1000 ms).

Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ properties:
1717
compatible:
1818
enum:
1919
- brcm,2711-v3d
20+
- brcm,2712-v3d
2021
- brcm,7268-v3d
2122
- brcm,7278-v3d
2223

Documentation/gpu/drm-kms-helpers.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,12 @@ EDID Helper Functions Reference
363363
.. kernel-doc:: drivers/gpu/drm/drm_edid.c
364364
:export:
365365

366+
.. kernel-doc:: include/drm/drm_eld.h
367+
:internal:
368+
369+
.. kernel-doc:: drivers/gpu/drm/drm_eld.c
370+
:export:
371+
366372
SCDC Helper Functions Reference
367373
===============================
368374

Documentation/gpu/drm-mm.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,12 @@ Overview
552552
.. kernel-doc:: drivers/gpu/drm/scheduler/sched_main.c
553553
:doc: Overview
554554

555+
Flow Control
556+
------------
557+
558+
.. kernel-doc:: drivers/gpu/drm/scheduler/sched_main.c
559+
:doc: Flow Control
560+
555561
Scheduler Function References
556562
-----------------------------
557563

Documentation/gpu/todo.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,23 @@ Contact: Javier Martinez Canillas <javierm@redhat.com>
621621

622622
Level: Intermediate
623623

624+
Clean up and document former selftests suites
625+
---------------------------------------------
626+
627+
Some KUnit test suites (drm_buddy, drm_cmdline_parser, drm_damage_helper,
628+
drm_format, drm_framebuffer, drm_dp_mst_helper, drm_mm, drm_plane_helper and
629+
drm_rect) are former selftests suites that have been converted over when KUnit
630+
was first introduced.
631+
632+
These suites were fairly undocumented, and with different goals than what unit
633+
tests can be. Trying to identify what each test in these suites actually test
634+
for, whether that makes sense for a unit test, and either remove it if it
635+
doesn't or document it if it does would be of great help.
636+
637+
Contact: Maxime Ripard <mripard@kernel.org>
638+
639+
Level: Intermediate
640+
624641
Enable trinity for DRM
625642
----------------------
626643

MAINTAINERS

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6503,8 +6503,7 @@ T: git git://anongit.freedesktop.org/drm/drm-misc
65036503
F: drivers/gpu/drm/sun4i/sun8i*
65046504

65056505
DRM DRIVER FOR ARM PL111 CLCD
6506-
M: Emma Anholt <emma@anholt.net>
6507-
S: Supported
6506+
S: Orphan
65086507
T: git git://anongit.freedesktop.org/drm/drm-misc
65096508
F: drivers/gpu/drm/pl111/
65106509

@@ -6619,8 +6618,7 @@ F: Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
66196618
F: drivers/gpu/drm/panel/panel-himax-hx8394.c
66206619

66216620
DRM DRIVER FOR HX8357D PANELS
6622-
M: Emma Anholt <emma@anholt.net>
6623-
S: Maintained
6621+
S: Orphan
66246622
T: git git://anongit.freedesktop.org/drm/drm-misc
66256623
F: Documentation/devicetree/bindings/display/himax,hx8357d.txt
66266624
F: drivers/gpu/drm/tiny/hx8357d.c
@@ -7213,16 +7211,15 @@ F: Documentation/devicetree/bindings/display/ti/
72137211
F: drivers/gpu/drm/omapdrm/
72147212

72157213
DRM DRIVERS FOR V3D
7216-
M: Emma Anholt <emma@anholt.net>
72177214
M: Melissa Wen <mwen@igalia.com>
7215+
M: Maíra Canal <mcanal@igalia.com>
72187216
S: Supported
72197217
T: git git://anongit.freedesktop.org/drm/drm-misc
72207218
F: Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
72217219
F: drivers/gpu/drm/v3d/
72227220
F: include/uapi/drm/v3d_drm.h
72237221

72247222
DRM DRIVERS FOR VC4
7225-
M: Emma Anholt <emma@anholt.net>
72267223
M: Maxime Ripard <mripard@kernel.org>
72277224
S: Supported
72287225
T: git git://github.com/anholt/linux

drivers/accel/ivpu/Kconfig

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22

33
config DRM_ACCEL_IVPU
4-
tristate "Intel VPU for Meteor Lake and newer"
4+
tristate "Intel NPU (Neural Processing Unit)"
55
depends on DRM_ACCEL
66
depends on X86_64 && !UML
77
depends on PCI && PCI_MSI
88
select FW_LOADER
9-
select SHMEM
9+
select DRM_GEM_SHMEM_HELPER
1010
select GENERIC_ALLOCATOR
1111
help
12-
Choose this option if you have a system that has an 14th generation Intel CPU
13-
or newer. VPU stands for Versatile Processing Unit and it's a CPU-integrated
14-
inference accelerator for Computer Vision and Deep Learning applications.
12+
Choose this option if you have a system with an 14th generation
13+
Intel CPU (Meteor Lake) or newer. Intel NPU (formerly called Intel VPU)
14+
is a CPU-integrated inference accelerator for Computer Vision
15+
and Deep Learning applications.
1516

1617
If "M" is selected, the module will be called intel_vpu.

drivers/accel/ivpu/ivpu_debugfs.c

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "ivpu_fw.h"
1515
#include "ivpu_fw_log.h"
1616
#include "ivpu_gem.h"
17+
#include "ivpu_hw.h"
1718
#include "ivpu_jsm_msg.h"
1819
#include "ivpu_pm.h"
1920

@@ -115,6 +116,31 @@ static const struct drm_debugfs_info vdev_debugfs_list[] = {
115116
{"reset_pending", reset_pending_show, 0},
116117
};
117118

119+
static ssize_t
120+
dvfs_mode_fops_write(struct file *file, const char __user *user_buf, size_t size, loff_t *pos)
121+
{
122+
struct ivpu_device *vdev = file->private_data;
123+
struct ivpu_fw_info *fw = vdev->fw;
124+
u32 dvfs_mode;
125+
int ret;
126+
127+
ret = kstrtou32_from_user(user_buf, size, 0, &dvfs_mode);
128+
if (ret < 0)
129+
return ret;
130+
131+
fw->dvfs_mode = dvfs_mode;
132+
133+
ivpu_pm_schedule_recovery(vdev);
134+
135+
return size;
136+
}
137+
138+
static const struct file_operations dvfs_mode_fops = {
139+
.owner = THIS_MODULE,
140+
.open = simple_open,
141+
.write = dvfs_mode_fops_write,
142+
};
143+
118144
static int fw_log_show(struct seq_file *s, void *v)
119145
{
120146
struct ivpu_device *vdev = s->private;
@@ -151,6 +177,30 @@ static const struct file_operations fw_log_fops = {
151177
.release = single_release,
152178
};
153179

180+
static ssize_t
181+
fw_profiling_freq_fops_write(struct file *file, const char __user *user_buf,
182+
size_t size, loff_t *pos)
183+
{
184+
struct ivpu_device *vdev = file->private_data;
185+
bool enable;
186+
int ret;
187+
188+
ret = kstrtobool_from_user(user_buf, size, &enable);
189+
if (ret < 0)
190+
return ret;
191+
192+
ivpu_hw_profiling_freq_drive(vdev, enable);
193+
ivpu_pm_schedule_recovery(vdev);
194+
195+
return size;
196+
}
197+
198+
static const struct file_operations fw_profiling_freq_fops = {
199+
.owner = THIS_MODULE,
200+
.open = simple_open,
201+
.write = fw_profiling_freq_fops_write,
202+
};
203+
154204
static ssize_t
155205
fw_trace_destination_mask_fops_write(struct file *file, const char __user *user_buf,
156206
size_t size, loff_t *pos)
@@ -280,6 +330,9 @@ void ivpu_debugfs_init(struct ivpu_device *vdev)
280330
debugfs_create_file("force_recovery", 0200, debugfs_root, vdev,
281331
&ivpu_force_recovery_fops);
282332

333+
debugfs_create_file("dvfs_mode", 0200, debugfs_root, vdev,
334+
&dvfs_mode_fops);
335+
283336
debugfs_create_file("fw_log", 0644, debugfs_root, vdev,
284337
&fw_log_fops);
285338
debugfs_create_file("fw_trace_destination_mask", 0200, debugfs_root, vdev,
@@ -291,4 +344,8 @@ void ivpu_debugfs_init(struct ivpu_device *vdev)
291344

292345
debugfs_create_file("reset_engine", 0200, debugfs_root, vdev,
293346
&ivpu_reset_engine_fops);
347+
348+
if (ivpu_hw_gen(vdev) >= IVPU_HW_40XX)
349+
debugfs_create_file("fw_profiling_freq_drive", 0200,
350+
debugfs_root, vdev, &fw_profiling_freq_fops);
294351
}

0 commit comments

Comments
 (0)