Skip to content

Commit 8322106

Browse files
committed
Merge tag 'drm-xe-next-2024-04-23' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next
UAPI Changes: - Remove unused flags (Francois Dugast) - Extend uAPI to query HuC micro-controler firmware version (Francois Dugast) - drm/xe/uapi: Define topology types as indexes rather than masks (Francois Dugast) - drm/xe/uapi: Restore flags VM_BIND_FLAG_READONLY and VM_BIND_FLAG_IMMEDIATE (Francois Dugast) - devcoredump updates. Some touching the output format. (José Roberto de Souza, Matthew Brost) - drm/xe/hwmon: Add infra to support card power and energy attributes - Improve LRC, HWSP and HWCTX error capture. (Maarten Lankhorst) - drm/xe/uapi: Add IP version and stepping to GT list query (Matt roper) - Invalidate userptr VMA on page pin fault (Matthew Brost) - Improve xe_bo_move tracepoint (Priyanka Danamudi) - Align fence output format in ftrace log Cross-driver Changes: - drm/i915/hwmon: Get rid of devm (Ashutosh Dixit) (Acked-by: Rodrigo Vivi <[email protected]>) - drm/i915/display: convert inner wakeref get towards get_if_in_use (SOB Rodrigo Vivi) - drm/i915: Convert intel_runtime_pm_get_noresume towards raw wakeref (Committer, SOB Jani Nikula) Driver Changes: - Fix for unneeded CCS metadata allocation (Akshata Jahagirdar) - Fix for fix multicast support for Xe_LP platforms (Andrzej Hajda) - A couple of build fixes (Arnd Bergmann) - Fix register definition (Ashutosh Dixit) - Add BMG mocs table (Balasubramani Vivekanandan) - Replace sprintf() across driver (Bommu Krishnaiah) - Add an xe2 workaround (Bommu Krishnaiah) - Makefile fix (Dafna Hirschfeld) - force_wake_get error value check (Daniele Ceraolo Spurio) - Handle GSCCS ER interrupt (Daniele Ceraolo Spurio) - GSC Workaround (Daniele Ceraolo Spurio) - Build error fix (Dawei Li) - drm/xe/gt: Add L3 bank mask to GT topology (Francois Dugast) - Implement xe2- and GuC workarounds (Gustavo Sousa, Haridhar Kalvala, Himal rasad Ghimiray, John Harrison, Matt Roper, Radhakrishna Sripada, Vinay Belgaumkar, Badal Nilawar) - xe2hpg compression (Himal Ghimiray Prasad) - Error code cleanups and fixes (Himal Prasad Ghimiray) - struct xe_device cleanup (Jani Nikula) - Avoid validating bos when only requesting an exec dma-fence (José Roberto de Souza) - Remove debug message from migrate_clear (José Roberto de Souza) - Nuke EXEC_QUEUE_FLAG_PERSISTENT leftover internal flag (José Roberto de Souza) - Mark dpt and related vma as uncached (Juha-Pekka Heikkila) - Hwmon updates (Karthik Poosa) - KConfig fix when ACPI_WMI selcted (Lu Yao) - Update intel_uncore_read*() return types (Luca Coelho) - Mocs updates (Lucas De Marchi, Matt Roper) - Drop dynamic load-balancing workaround (Lucas De Marchi) - Fix a PVC workaround (Lucas De Marchi) - Group live kunit tests into a single module (Lucas De Marchi) - Various code cleanups (Lucas De Marchi) - Fix a ggtt init error patch and move ggtt invalidate out of ggtt lock (Maarten Lankhorst) - Fix a bo leak (Marten Lankhorst) - Add LRC parsing for more GPU instructions (Matt Roper) - Add various definitions for hardware and IP (Matt Roper) - Define all possible engines in media IP descriptors (Matt Roper) - Various cleanups, asserts and code fixes (Matthew Auld) - Various cleanups and code fixes (Matthew Brost) - Increase VM_BIND number of per-ioctl Ops (Matthew Brost, Paulo Zanoni) - Don't support execlists in xe_gt_tlb_invalidation layer (Matthew Brost) - Handle timing out of already signaled jobs gracefully (Matthew Brost) - Pipeline evict / restore of pinned BOs during suspend / resume (Matthew Brost) - Do not grab forcewakes when issuing GGTT TLB invalidation via GuC (Matthew Brost) - Drop ggtt invalidate from display code (Matthew Brost) - drm/xe: Add XE_BO_GGTT_INVALIDATE flag (Matthew Brost) - Add debug messages for MMU notifier and VMA invalidate (Matthew Brost) - Use ordered wq for preempt fence waiting (Matthew Brost) - Initial development for SR-IOV support including some refactoring (Michal Wajdeczko) - Various GuC- and GT- related cleanups and fixes (Michal Wajdeczko) - Move userptr over to start using hmm_range_fault (Oak Zeng) - Add new PCI IDs to DG2 platform (Ravi Kumar Vodapalli) - Pcode - and VRAM initialization check update (Riana Tauro) - Large PM update including i915 display patches, and a fix for one of those. (Rodrigo Vivi) - Introduce performance tuning changes for Xe2_HPG (Shekhar Chauhan) - GSC / HDCP updates (Suraj Kandpal) - Minor code cleanup (Tejas Upadhyay) - Rework / fix rebind TLB flushing and move rebind into the drm_exec locking loop (Thomas Hellström) - Backmerge (Thomas Hellström) - GuC updates and fixes (Vinay Belgaumkar, Zhanjun Dong) Signed-off-by: Dave Airlie <[email protected]> # -----BEGIN PGP SIGNATURE----- # # iHUEABYKAB0WIQRskUM7w1oG5rx2IZO4FpNVCsYGvwUCZiestQAKCRC4FpNVCsYG # v8dLAQCDFUR7R5rwSdfqzNy+Djg+9ZgmtzVEfHZ+rI2lTReaCwEAhWeK7UooIMV0 # vGsSdsqGsJQm4VLRzE6H1yemCCQOBgM= # =HouD # -----END PGP SIGNATURE----- # gpg: Signature made Tue 23 Apr 2024 22:42:29 AEST # gpg: using EDDSA key 6C91433BC35A06E6BC762193B81693550AC606BF # gpg: Can't check signature: No public key # Conflicts: # drivers/gpu/drm/xe/xe_device_types.h # drivers/gpu/drm/xe/xe_vm.c # drivers/gpu/drm/xe/xe_vm_types.h From: Thomas Hellstrom <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/Zievlb1wvqDg1ovi@fedora
2 parents 0208ca5 + 48c64d4 commit 8322106

File tree

185 files changed

+7969
-2053
lines changed

Some content is hidden

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

185 files changed

+7969
-2053
lines changed

Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon

Lines changed: 67 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,61 +10,101 @@ Description: RW. Card reactive sustained (PL1) power limit in microwatts.
1010
power limit is disabled, writing 0 disables the
1111
limit. Writing values > 0 and <= TDP will enable the power limit.
1212

13-
Only supported for particular Intel xe graphics platforms.
13+
Only supported for particular Intel Xe graphics platforms.
1414

1515
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power1_rated_max
1616
Date: September 2023
1717
KernelVersion: 6.5
1818
1919
Description: RO. Card default power limit (default TDP setting).
2020

21-
Only supported for particular Intel xe graphics platforms.
21+
Only supported for particular Intel Xe graphics platforms.
2222

23-
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power1_crit
23+
24+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/energy1_input
2425
Date: September 2023
2526
KernelVersion: 6.5
2627
27-
Description: RW. Card reactive critical (I1) power limit in microwatts.
28+
Description: RO. Card energy input of device in microjoules.
29+
30+
Only supported for particular Intel Xe graphics platforms.
31+
32+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power1_max_interval
33+
Date: October 2023
34+
KernelVersion: 6.6
35+
36+
Description: RW. Card sustained power limit interval (Tau in PL1/Tau) in
37+
milliseconds over which sustained power is averaged.
38+
39+
Only supported for particular Intel Xe graphics platforms.
40+
41+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power2_max
42+
Date: February 2024
43+
KernelVersion: 6.8
44+
45+
Description: RW. Package reactive sustained (PL1) power limit in microwatts.
46+
47+
The power controller will throttle the operating frequency
48+
if the power averaged over a window (typically seconds)
49+
exceeds this limit. A read value of 0 means that the PL1
50+
power limit is disabled, writing 0 disables the
51+
limit. Writing values > 0 and <= TDP will enable the power limit.
52+
53+
Only supported for particular Intel Xe graphics platforms.
54+
55+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power2_rated_max
56+
Date: February 2024
57+
KernelVersion: 6.8
58+
59+
Description: RO. Package default power limit (default TDP setting).
2860

29-
Card reactive critical (I1) power limit in microwatts is exposed
61+
Only supported for particular Intel Xe graphics platforms.
62+
63+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power2_crit
64+
Date: February 2024
65+
KernelVersion: 6.8
66+
67+
Description: RW. Package reactive critical (I1) power limit in microwatts.
68+
69+
Package reactive critical (I1) power limit in microwatts is exposed
3070
for client products. The power controller will throttle the
3171
operating frequency if the power averaged over a window exceeds
3272
this limit.
3373

34-
Only supported for particular Intel xe graphics platforms.
74+
Only supported for particular Intel Xe graphics platforms.
3575

36-
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/curr1_crit
37-
Date: September 2023
38-
KernelVersion: 6.5
76+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/curr2_crit
77+
Date: February 2024
78+
KernelVersion: 6.8
3979
40-
Description: RW. Card reactive critical (I1) power limit in milliamperes.
80+
Description: RW. Package reactive critical (I1) power limit in milliamperes.
4181

42-
Card reactive critical (I1) power limit in milliamperes is
82+
Package reactive critical (I1) power limit in milliamperes is
4383
exposed for server products. The power controller will throttle
4484
the operating frequency if the power averaged over a window
4585
exceeds this limit.
4686

47-
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/in0_input
48-
Date: September 2023
49-
KernelVersion: 6.5
87+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/energy2_input
88+
Date: February 2024
89+
KernelVersion: 6.8
5090
51-
Description: RO. Current Voltage in millivolt.
91+
Description: RO. Package energy input of device in microjoules.
5292

53-
Only supported for particular Intel xe graphics platforms.
93+
Only supported for particular Intel Xe graphics platforms.
5494

55-
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/energy1_input
56-
Date: September 2023
57-
KernelVersion: 6.5
95+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power2_max_interval
96+
Date: February 2024
97+
KernelVersion: 6.8
5898
59-
Description: RO. Energy input of device in microjoules.
99+
Description: RW. Package sustained power limit interval (Tau in PL1/Tau) in
100+
milliseconds over which sustained power is averaged.
60101

61-
Only supported for particular Intel xe graphics platforms.
102+
Only supported for particular Intel Xe graphics platforms.
62103

63-
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power1_max_interval
64-
Date: October 2023
65-
KernelVersion: 6.6
104+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/in1_input
105+
Date: February 2024
106+
KernelVersion: 6.8
66107
67-
Description: RW. Sustained power limit interval (Tau in PL1/Tau) in
68-
milliseconds over which sustained power is averaged.
108+
Description: RO. Package current voltage in millivolt.
69109

70-
Only supported for particular Intel xe graphics platforms.
110+
Only supported for particular Intel Xe graphics platforms.

drivers/base/devcoredump.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,29 @@ static ssize_t devcd_read_from_sgtable(char *buffer, loff_t offset,
304304
offset);
305305
}
306306

307+
/**
308+
* dev_coredump_put - remove device coredump
309+
* @dev: the struct device for the crashed device
310+
*
311+
* dev_coredump_put() removes coredump, if exists, for a given device from
312+
* the file system and free its associated data otherwise, does nothing.
313+
*
314+
* It is useful for modules that do not want to keep coredump
315+
* available after its unload.
316+
*/
317+
void dev_coredump_put(struct device *dev)
318+
{
319+
struct device *existing;
320+
321+
existing = class_find_device(&devcd_class, NULL, dev,
322+
devcd_match_failing);
323+
if (existing) {
324+
devcd_free(existing, NULL);
325+
put_device(existing);
326+
}
327+
}
328+
EXPORT_SYMBOL_GPL(dev_coredump_put);
329+
307330
/**
308331
* dev_coredumpm - create device coredump with read/free methods
309332
* @dev: the struct device for the crashed device

drivers/gpu/drm/i915/display/intel_display_power.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -640,13 +640,7 @@ release_async_put_domains(struct i915_power_domains *power_domains,
640640
enum intel_display_power_domain domain;
641641
intel_wakeref_t wakeref;
642642

643-
/*
644-
* The caller must hold already raw wakeref, upgrade that to a proper
645-
* wakeref to make the state checker happy about the HW access during
646-
* power well disabling.
647-
*/
648-
assert_rpm_raw_wakeref_held(rpm);
649-
wakeref = intel_runtime_pm_get(rpm);
643+
wakeref = intel_runtime_pm_get_noresume(rpm);
650644

651645
for_each_power_domain(domain, mask) {
652646
/* Clear before put, so put's sanity check is happy. */

drivers/gpu/drm/i915/display/intel_hdcp_gsc.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
#include "intel_hdcp_gsc.h"
1414
#include "intel_hdcp_gsc_message.h"
1515

16+
struct intel_hdcp_gsc_message {
17+
struct i915_vma *vma;
18+
void *hdcp_cmd_in;
19+
void *hdcp_cmd_out;
20+
};
21+
1622
bool intel_hdcp_gsc_cs_required(struct drm_i915_private *i915)
1723
{
1824
return DISPLAY_VER(i915) >= 14;

drivers/gpu/drm/i915/display/intel_hdcp_gsc.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@
1010
#include <linux/types.h>
1111

1212
struct drm_i915_private;
13-
14-
struct intel_hdcp_gsc_message {
15-
struct i915_vma *vma;
16-
void *hdcp_cmd_in;
17-
void *hdcp_cmd_out;
18-
};
13+
struct intel_hdcp_gsc_message;
1914

2015
bool intel_hdcp_gsc_cs_required(struct drm_i915_private *i915);
2116
ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,

drivers/gpu/drm/i915/i915_hwmon.c

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ void i915_hwmon_register(struct drm_i915_private *i915)
787787
if (!IS_DGFX(i915))
788788
return;
789789

790-
hwmon = devm_kzalloc(dev, sizeof(*hwmon), GFP_KERNEL);
790+
hwmon = kzalloc(sizeof(*hwmon), GFP_KERNEL);
791791
if (!hwmon)
792792
return;
793793

@@ -813,14 +813,12 @@ void i915_hwmon_register(struct drm_i915_private *i915)
813813
hwm_get_preregistration_info(i915);
814814

815815
/* hwmon_dev points to device hwmon<i> */
816-
hwmon_dev = devm_hwmon_device_register_with_info(dev, ddat->name,
817-
ddat,
818-
&hwm_chip_info,
819-
hwm_groups);
820-
if (IS_ERR(hwmon_dev)) {
821-
i915->hwmon = NULL;
822-
return;
823-
}
816+
hwmon_dev = hwmon_device_register_with_info(dev, ddat->name,
817+
ddat,
818+
&hwm_chip_info,
819+
hwm_groups);
820+
if (IS_ERR(hwmon_dev))
821+
goto err;
824822

825823
ddat->hwmon_dev = hwmon_dev;
826824

@@ -833,16 +831,36 @@ void i915_hwmon_register(struct drm_i915_private *i915)
833831
if (!hwm_gt_is_visible(ddat_gt, hwmon_energy, hwmon_energy_input, 0))
834832
continue;
835833

836-
hwmon_dev = devm_hwmon_device_register_with_info(dev, ddat_gt->name,
837-
ddat_gt,
838-
&hwm_gt_chip_info,
839-
NULL);
834+
hwmon_dev = hwmon_device_register_with_info(dev, ddat_gt->name,
835+
ddat_gt,
836+
&hwm_gt_chip_info,
837+
NULL);
840838
if (!IS_ERR(hwmon_dev))
841839
ddat_gt->hwmon_dev = hwmon_dev;
842840
}
841+
return;
842+
err:
843+
i915_hwmon_unregister(i915);
843844
}
844845

845846
void i915_hwmon_unregister(struct drm_i915_private *i915)
846847
{
847-
fetch_and_zero(&i915->hwmon);
848+
struct i915_hwmon *hwmon = i915->hwmon;
849+
struct intel_gt *gt;
850+
int i;
851+
852+
if (!hwmon)
853+
return;
854+
855+
for_each_gt(gt, i915, i)
856+
if (hwmon->ddat_gt[i].hwmon_dev)
857+
hwmon_device_unregister(hwmon->ddat_gt[i].hwmon_dev);
858+
859+
if (hwmon->ddat.hwmon_dev)
860+
hwmon_device_unregister(hwmon->ddat.hwmon_dev);
861+
862+
mutex_destroy(&hwmon->hwmon_lock);
863+
864+
kfree(i915->hwmon);
865+
i915->hwmon = NULL;
848866
}

drivers/gpu/drm/i915/intel_runtime_pm.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,11 @@ intel_wakeref_t intel_runtime_pm_get_if_active(struct intel_runtime_pm *rpm)
272272
* intel_runtime_pm_get_noresume - grab a runtime pm reference
273273
* @rpm: the intel_runtime_pm structure
274274
*
275-
* This function grabs a device-level runtime pm reference (mostly used for GEM
276-
* code to ensure the GTT or GT is on).
275+
* This function grabs a device-level runtime pm reference.
277276
*
278-
* It will _not_ power up the device but instead only check that it's powered
279-
* on. Therefore it is only valid to call this functions from contexts where
280-
* the device is known to be powered up and where trying to power it up would
281-
* result in hilarity and deadlocks. That pretty much means only the system
282-
* suspend/resume code where this is used to grab runtime pm references for
283-
* delayed setup down in work items.
277+
* It will _not_ resume the device but instead only get an extra wakeref.
278+
* Therefore it is only valid to call this functions from contexts where
279+
* the device is known to be active and with another wakeref previously hold.
284280
*
285281
* Any runtime pm reference obtained by this function must have a symmetric
286282
* call to intel_runtime_pm_put() to release the reference again.
@@ -289,7 +285,7 @@ intel_wakeref_t intel_runtime_pm_get_if_active(struct intel_runtime_pm *rpm)
289285
*/
290286
intel_wakeref_t intel_runtime_pm_get_noresume(struct intel_runtime_pm *rpm)
291287
{
292-
assert_rpm_wakelock_held(rpm);
288+
assert_rpm_raw_wakeref_held(rpm);
293289
pm_runtime_get_noresume(rpm->kdev);
294290

295291
intel_runtime_pm_acquire(rpm, true);

drivers/gpu/drm/xe/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ config DRM_XE
2929
select INPUT if ACPI
3030
select ACPI_VIDEO if X86 && ACPI
3131
select ACPI_BUTTON if ACPI
32+
select X86_PLATFORM_DEVICES if X86 && ACPI
3233
select ACPI_WMI if X86 && ACPI
3334
select SYNC_FILE
3435
select IOSF_MBI
@@ -44,6 +45,7 @@ config DRM_XE
4445
select MMU_NOTIFIER
4546
select WANT_DEV_COREDUMP
4647
select AUXILIARY_BUS
48+
select HMM_MIRROR
4749
help
4850
Experimental driver for Intel Xe series GPUs
4951

drivers/gpu/drm/xe/Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ $(obj)/generated/%_wa_oob.c $(obj)/generated/%_wa_oob.h: $(obj)/xe_gen_wa_oob \
4949
uses_generated_oob := \
5050
$(obj)/xe_gsc.o \
5151
$(obj)/xe_guc.o \
52+
$(obj)/xe_guc_ads.o \
5253
$(obj)/xe_migrate.o \
5354
$(obj)/xe_ring_ops.o \
5455
$(obj)/xe_vm.o \
@@ -97,6 +98,8 @@ xe-y += xe_bb.o \
9798
xe_guc_db_mgr.o \
9899
xe_guc_debugfs.o \
99100
xe_guc_hwconfig.o \
101+
xe_guc_id_mgr.o \
102+
xe_guc_klv_helpers.o \
100103
xe_guc_log.o \
101104
xe_guc_pc.o \
102105
xe_guc_submit.o \
@@ -145,6 +148,8 @@ xe-y += xe_bb.o \
145148
xe_wa.o \
146149
xe_wopcm.o
147150

151+
xe-$(CONFIG_HMM_MIRROR) += xe_hmm.o
152+
148153
# graphics hardware monitoring (HWMON) support
149154
xe-$(CONFIG_HWMON) += xe_hwmon.o
150155

@@ -155,9 +160,14 @@ xe-y += \
155160
xe_sriov.o
156161

157162
xe-$(CONFIG_PCI_IOV) += \
163+
xe_gt_sriov_pf.o \
164+
xe_gt_sriov_pf_config.o \
165+
xe_gt_sriov_pf_control.o \
166+
xe_gt_sriov_pf_policy.o \
158167
xe_lmtt.o \
159168
xe_lmtt_2l.o \
160-
xe_lmtt_ml.o
169+
xe_lmtt_ml.o \
170+
xe_sriov_pf.o
161171

162172
# include helpers for tests even when XE is built-in
163173
ifdef CONFIG_DRM_XE_KUNIT_TEST
@@ -254,6 +264,7 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \
254264
i915-display/intel_global_state.o \
255265
i915-display/intel_gmbus.o \
256266
i915-display/intel_hdcp.o \
267+
i915-display/intel_hdcp_gsc_message.o \
257268
i915-display/intel_hdmi.o \
258269
i915-display/intel_hotplug.o \
259270
i915-display/intel_hotplug_irq.o \

0 commit comments

Comments
 (0)