Skip to content

Commit 0faeb8c

Browse files
committed
Merge tag 'drm-xe-next-2025-09-19' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next
UAPI Changes: - Drop L3 bank mask reporting from the media GT on Xe3 and later. Only do that for the primary GT. No userspace needs or uses it for media and some platforms may report bogus values. - Add SLPC power_profile sysfs interface with support for base and power_saving modes (Vinay Belgaumkar, Rodrigo Vivi) - Add configfs attributes to add post/mid context-switch commands (Lucas De Marchi) Cross-subsystem Changes: - Fix hmm_pfn_to_map_order() usage in gpusvm and refactor APIs to align with pieces previous handled by xe_hmm (Matthew Auld) Core Changes: - Add MEI driver for Late Binding Firmware Update/Upload (Alexander Usyskin) Driver Changes: - Fix GuC CT teardown wrt TLB invalidation (Satyanarayana) - Fix CCS save/restore on VF (Satyanarayana) - Increase default GuC crash buffer size (Zhanjun) - Allow to clear GT stats in debugfs to aid debugging (Matthew Brost) - Add more SVM GT stats to debugfs (Matthew Brost) - Fix error handling in VMA attr query (Himal) - Move sa_info in debugfs to be per tile (Michal Wajdeczko) - Limit number of retries upon receiving NO_RESPONSE_RETRY from GuC to avoid endless loop (Michal Wajdeczko) - Fix configfs handling for survivability_mode undoing user choice when unbinding the module (Michal Wajdeczko) - Refactor configfs attribute visibility to future-proof it and stop exposing survivability_mode if not applicable (Michal Wajdeczko) - Constify some functions (Harish Chegondi, Michal Wajdeczko) - Add/extend more HW workarounds for Xe2 and Xe3 (Harish Chegondi, Tangudu Tilak Tirumalesh) - Replace xe_hmm with gpusvm (Matthew Auld) - Improve fake pci and WA kunit handling for testing new platforms (Michal Wajdeczko) - Reduce unnecessary PTE writes when migrating (Sanjay Yadav) - Cleanup GuC interface definitions and log message (John Harrison) - Small improvements around VF CCS (Michal Wajdeczko) - Enable bus mastering for the I2C controller (Raag Jadav) - Prefer devm_mutex of hand rolling it (Christophe JAILLET) - Drop sysfs and debugfs attributes not available for VF (Michal Wajdeczko) - GuC CT devm actions improvements (Michal Wajdeczko) - Recommend new GuC versions for PTL and BMG (Julia Filipchuk) - Improveme driver handling for exhaustive eviction using new xe_validation wrapper around drm_exec (Thomas Hellström) - Add and use printk wrappers for tile and device (Michal Wajdeczko) - Better document workaround handling in Xe (Lucas De Marchi) - Improvements on ARRAY_SIZE and ERR_CAST usage (Lucas De Marchi, Fushuai Wang) - Align CSS firmware headers with the GuC APIs (John Harrison) - Test GuC to GuC (G2G) communication to aid debug in pre-production firmware (John Harrison) - Bail out driver probing if GuC fails to load (John Harrison) - Allow error injection in xe_pxp_exec_queue_add() (Daniele Ceraolo Spurio) - Minor refactors in xe_svm (Shuicheng Lin) - Fix madvise ioctl error handling (Shuicheng Lin) - Use attribute groups to simplify sysfs registration (Michal Wajdeczko) - Add Late Binding Firmware implementation in Xe to work together with the MEI component (Badal Nilawar, Daniele Ceraolo Spurio, Rodrigo Vivi) - Fix build with CONFIG_MODULES=n (Lucas De Marchi) Signed-off-by: Dave Airlie <[email protected]> From: Lucas De Marchi <[email protected]> Link: https://lore.kernel.org/r/c2et6dnkst2apsgt46dklej4nprqdukjosb55grpaknf3pvcxy@t7gtn3hqtp6n
2 parents 748f41f + d9b2623 commit 0faeb8c

File tree

133 files changed

+6859
-2330
lines changed

Some content is hidden

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

133 files changed

+6859
-2330
lines changed

drivers/gpu/drm/drm_gpusvm.c

Lines changed: 214 additions & 83 deletions
Large diffs are not rendered by default.

drivers/gpu/drm/xe/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ config DRM_XE
4040
select DRM_TTM
4141
select DRM_TTM_HELPER
4242
select DRM_EXEC
43+
select DRM_GPUSVM if !UML && DEVICE_PRIVATE
4344
select DRM_GPUVM
4445
select DRM_SCHED
4546
select MMU_NOTIFIER
4647
select WANT_DEV_COREDUMP
4748
select AUXILIARY_BUS
48-
select HMM_MIRROR
4949
select REGMAP if I2C
5050
help
5151
Driver for Intel Xe2 series GPUs and later. Experimental support

drivers/gpu/drm/xe/Kconfig.debug

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ config DRM_XE_DEBUG_GUC
104104

105105
config DRM_XE_USERPTR_INVAL_INJECT
106106
bool "Inject userptr invalidation -EINVAL errors"
107+
depends on DRM_GPUSVM
107108
default n
108109
help
109110
Choose this option when debugging error paths that

drivers/gpu/drm/xe/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ xe-y += xe_bb.o \
8484
xe_hw_error.o \
8585
xe_hw_fence.o \
8686
xe_irq.o \
87+
xe_late_bind_fw.o \
8788
xe_lrc.o \
8889
xe_migrate.o \
8990
xe_mmio.o \
@@ -130,6 +131,7 @@ xe-y += xe_bb.o \
130131
xe_tuning.o \
131132
xe_uc.o \
132133
xe_uc_fw.o \
134+
xe_validation.o \
133135
xe_vm.o \
134136
xe_vm_madvise.o \
135137
xe_vram.o \
@@ -140,8 +142,8 @@ xe-y += xe_bb.o \
140142
xe_wopcm.o
141143

142144
xe-$(CONFIG_I2C) += xe_i2c.o
143-
xe-$(CONFIG_HMM_MIRROR) += xe_hmm.o
144145
xe-$(CONFIG_DRM_XE_GPUSVM) += xe_svm.o
146+
xe-$(CONFIG_DRM_GPUSVM) += xe_userptr.o
145147

146148
# graphics hardware monitoring (HWMON) support
147149
xe-$(CONFIG_HWMON) += xe_hwmon.o
@@ -326,6 +328,7 @@ ifeq ($(CONFIG_DEBUG_FS),y)
326328
xe_gt_stats.o \
327329
xe_guc_debugfs.o \
328330
xe_huc_debugfs.o \
331+
xe_tile_debugfs.o \
329332
xe_uc_debugfs.o
330333

331334
xe-$(CONFIG_PCI_IOV) += xe_gt_sriov_pf_debugfs.o

drivers/gpu/drm/xe/abi/guc_actions_abi.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ enum xe_guc_action {
117117
XE_GUC_ACTION_ENTER_S_STATE = 0x501,
118118
XE_GUC_ACTION_EXIT_S_STATE = 0x502,
119119
XE_GUC_ACTION_GLOBAL_SCHED_POLICY_CHANGE = 0x506,
120+
XE_GUC_ACTION_UPDATE_SCHEDULING_POLICIES_KLV = 0x509,
120121
XE_GUC_ACTION_SCHED_CONTEXT = 0x1000,
121122
XE_GUC_ACTION_SCHED_CONTEXT_MODE_SET = 0x1001,
122123
XE_GUC_ACTION_SCHED_CONTEXT_MODE_DONE = 0x1002,
@@ -154,6 +155,8 @@ enum xe_guc_action {
154155
XE_GUC_ACTION_NOTIFY_FLUSH_LOG_BUFFER_TO_FILE = 0x8003,
155156
XE_GUC_ACTION_NOTIFY_CRASH_DUMP_POSTED = 0x8004,
156157
XE_GUC_ACTION_NOTIFY_EXCEPTION = 0x8005,
158+
XE_GUC_ACTION_TEST_G2G_SEND = 0xF001,
159+
XE_GUC_ACTION_TEST_G2G_RECV = 0xF002,
157160
XE_GUC_ACTION_LIMIT
158161
};
159162

drivers/gpu/drm/xe/abi/guc_actions_slpc_abi.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ struct slpc_shared_data {
210210
u8 reserved_mode_definition[4096];
211211
} __packed;
212212

213+
enum slpc_power_profile {
214+
SLPC_POWER_PROFILE_BASE = 0x0,
215+
SLPC_POWER_PROFILE_POWER_SAVING = 0x1
216+
};
217+
213218
/**
214219
* DOC: SLPC H2G MESSAGE FORMAT
215220
*

drivers/gpu/drm/xe/abi/guc_klvs_abi.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* | 0 | 31:16 | **KEY** - KLV key identifier |
1818
* | | | - `GuC Self Config KLVs`_ |
1919
* | | | - `GuC Opt In Feature KLVs`_ |
20+
* | | | - `GuC Scheduling Policies KLVs`_ |
2021
* | | | - `GuC VGT Policy KLVs`_ |
2122
* | | | - `GuC VF Configuration KLVs`_ |
2223
* | | | |
@@ -152,6 +153,30 @@ enum {
152153
#define GUC_KLV_OPT_IN_FEATURE_DYNAMIC_INHIBIT_CONTEXT_SWITCH_KEY 0x4003
153154
#define GUC_KLV_OPT_IN_FEATURE_DYNAMIC_INHIBIT_CONTEXT_SWITCH_LEN 0u
154155

156+
/**
157+
* DOC: GuC Scheduling Policies KLVs
158+
*
159+
* `GuC KLV`_ keys available for use with UPDATE_SCHEDULING_POLICIES_KLV.
160+
*
161+
* _`GUC_KLV_SCHEDULING_POLICIES_RENDER_COMPUTE_YIELD` : 0x1001
162+
* Some platforms do not allow concurrent execution of RCS and CCS
163+
* workloads from different address spaces. By default, the GuC prioritizes
164+
* RCS submissions over CCS ones, which can lead to CCS workloads being
165+
* significantly (or completely) starved of execution time. This KLV allows
166+
* the driver to specify a quantum (in ms) and a ratio (percentage value
167+
* between 0 and 100), and the GuC will prioritize the CCS for that
168+
* percentage of each quantum. For example, specifying 100ms and 30% will
169+
* make the GuC prioritize the CCS for 30ms of every 100ms.
170+
* Note that this does not necessarly mean that RCS and CCS engines will
171+
* only be active for their percentage of the quantum, as the restriction
172+
* only kicks in if both classes are fully busy with non-compatible address
173+
* spaces; i.e., if one engine is idle or running the same address space,
174+
* a pending job on the other engine will still be submitted to the HW no
175+
* matter what the ratio is
176+
*/
177+
#define GUC_KLV_SCHEDULING_POLICIES_RENDER_COMPUTE_YIELD_KEY 0x1001
178+
#define GUC_KLV_SCHEDULING_POLICIES_RENDER_COMPUTE_YIELD_LEN 2u
179+
155180
/**
156181
* DOC: GuC VGT Policy KLVs
157182
*

drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_stolen.h

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include "xe_ttm_stolen_mgr.h"
1010
#include "xe_res_cursor.h"
11+
#include "xe_validation.h"
1112

1213
struct xe_bo;
1314

@@ -21,7 +22,7 @@ static inline int i915_gem_stolen_insert_node_in_range(struct xe_device *xe,
2122
u32 start, u32 end)
2223
{
2324
struct xe_bo *bo;
24-
int err;
25+
int err = 0;
2526
u32 flags = XE_BO_FLAG_PINNED | XE_BO_FLAG_STOLEN;
2627

2728
if (start < SZ_4K)
@@ -32,21 +33,13 @@ static inline int i915_gem_stolen_insert_node_in_range(struct xe_device *xe,
3233
start = ALIGN(start, align);
3334
}
3435

35-
bo = xe_bo_create_locked_range(xe, xe_device_get_root_tile(xe),
36-
NULL, size, start, end,
37-
ttm_bo_type_kernel, flags, 0);
36+
bo = xe_bo_create_pin_range_novm(xe, xe_device_get_root_tile(xe),
37+
size, start, end, ttm_bo_type_kernel, flags);
3838
if (IS_ERR(bo)) {
3939
err = PTR_ERR(bo);
4040
bo = NULL;
4141
return err;
4242
}
43-
err = xe_bo_pin(bo);
44-
xe_bo_unlock_vm_held(bo);
45-
46-
if (err) {
47-
xe_bo_put(fb->bo);
48-
bo = NULL;
49-
}
5043

5144
fb->bo = bo;
5245

drivers/gpu/drm/xe/display/intel_fbdev_fb.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_fb_helper *helper,
4242
obj = ERR_PTR(-ENODEV);
4343

4444
if (!IS_DGFX(xe) && !XE_GT_WA(xe_root_mmio_gt(xe), 22019338487_display)) {
45-
obj = xe_bo_create_pin_map(xe, xe_device_get_root_tile(xe),
46-
NULL, size,
47-
ttm_bo_type_kernel, XE_BO_FLAG_SCANOUT |
48-
XE_BO_FLAG_STOLEN |
49-
XE_BO_FLAG_GGTT);
45+
obj = xe_bo_create_pin_map_novm(xe, xe_device_get_root_tile(xe),
46+
size,
47+
ttm_bo_type_kernel, XE_BO_FLAG_SCANOUT |
48+
XE_BO_FLAG_STOLEN |
49+
XE_BO_FLAG_GGTT, false);
5050
if (!IS_ERR(obj))
5151
drm_info(&xe->drm, "Allocated fbdev into stolen\n");
5252
else
5353
drm_info(&xe->drm, "Allocated fbdev into stolen failed: %li\n", PTR_ERR(obj));
5454
}
5555

5656
if (IS_ERR(obj)) {
57-
obj = xe_bo_create_pin_map(xe, xe_device_get_root_tile(xe), NULL, size,
58-
ttm_bo_type_kernel, XE_BO_FLAG_SCANOUT |
59-
XE_BO_FLAG_VRAM_IF_DGFX(xe_device_get_root_tile(xe)) |
60-
XE_BO_FLAG_GGTT);
57+
obj = xe_bo_create_pin_map_novm(xe, xe_device_get_root_tile(xe), size,
58+
ttm_bo_type_kernel, XE_BO_FLAG_SCANOUT |
59+
XE_BO_FLAG_VRAM_IF_DGFX(xe_device_get_root_tile(xe)) |
60+
XE_BO_FLAG_GGTT, false);
6161
}
6262

6363
if (IS_ERR(obj)) {

drivers/gpu/drm/xe/display/xe_dsb_buffer.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ bool intel_dsb_buffer_create(struct intel_crtc *crtc, struct intel_dsb_buffer *d
4343
return false;
4444

4545
/* Set scanout flag for WC mapping */
46-
obj = xe_bo_create_pin_map(xe, xe_device_get_root_tile(xe),
47-
NULL, PAGE_ALIGN(size),
48-
ttm_bo_type_kernel,
49-
XE_BO_FLAG_VRAM_IF_DGFX(xe_device_get_root_tile(xe)) |
50-
XE_BO_FLAG_SCANOUT | XE_BO_FLAG_GGTT);
46+
obj = xe_bo_create_pin_map_novm(xe, xe_device_get_root_tile(xe),
47+
PAGE_ALIGN(size),
48+
ttm_bo_type_kernel,
49+
XE_BO_FLAG_VRAM_IF_DGFX(xe_device_get_root_tile(xe)) |
50+
XE_BO_FLAG_SCANOUT | XE_BO_FLAG_GGTT, false);
5151
if (IS_ERR(obj)) {
5252
kfree(vma);
5353
return false;

0 commit comments

Comments
 (0)