Skip to content

Commit 8bdb468

Browse files
committed
Merge tag 'drm-xe-next-2024-08-28' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next
UAPI Changes: - Fix OA format masks which were breaking build with gcc-5 Cross-subsystem Changes: Driver Changes: - Use dma_fence_chain_free in chain fence unused as a sync (Matthew Brost) - Refactor hw engine lookup and mmio access to be used in more places (Dominik, Matt Auld, Mika Kuoppala) - Enable priority mem read for Xe2 and later (Pallavi Mishra) - Fix PL1 disable flow in xe_hwmon_power_max_write (Karthik) - Fix refcount and speedup devcoredump (Matthew Brost) - Add performance tuning changes to Xe2 (Akshata, Shekhar) - Fix OA sysfs entry (Ashutosh) - Add first GuC firmware support for BMG (Julia) - Bump minimum GuC firmware for platforms under force_probe to match LNL and BMG (Julia) - Fix access check on user fence creation (Nirmoy) - Add/document workarounds for Xe2 (Julia, Daniele, John, Tejas) - Document workaround and use proper WA infra (Matt Roper) - Fix VF configuration on media GT (Michal Wajdeczko) - Fix VM dma-resv lock (Matthew Brost) - Allow suspend/resume exec queue backend op to be called multiple times (Matthew Brost) - Add GT stats to debugfs (Nirmoy) - Add hwconfig to debugfs (Matt Roper) - Compile out all debugfs code with ONFIG_DEUBG_FS=n (Lucas) - Remove dead kunit code (Jani Nikula) - Refactor drvdata storing to help display (Jani Nikula) - Cleanup unsused xe parameter in pte handling (Himal) - Rename s/enable_display/probe_display/ for clarity (Lucas) - Fix missing MCR annotation in couple of registers (Tejas) - Fix DGFX display suspend/resume (Maarten) - Prepare exec_queue_kill for PXP handling (Daniele) - Fix devm/drmm issues (Daniele, Matthew Brost) - Fix tile and ggtt fini sequences (Matthew Brost) - Fix crashes when probing without firmware in place (Daniele, Matthew Brost) - Use xe_managed for kernel BOs (Daniele, Matthew Brost) - Future-proof dss_per_group calculation by using hwconfig (Matt Roper) - Use reserved copy engine for user binds on faulting devices (Matthew Brost) - Allow mixing dma-fence jobs and long-running faulting jobs (Francois) - Cleanup redundant arg when creating use BO (Nirmoy) - Prevent UAF around preempt fence (Auld) - Fix display suspend/resume (Maarten) - Use vma_pages() helper (Thorsten) - Calculate pagefault queue size (Stuart, Matthew Auld) - Fix missing pagefault wq destroy (Stuart) - Fix lifetime handling of HW fence ctx (Matthew Brost) - Fix order destroy order for jobs (Matthew Brost) - Fix TLB invalidation for media GT (Matthew Brost) - Document GGTT (Rodrigo Vivi) - Refactor GGTT layering and fix runtime outer protection (Rodrigo Vivi) - Handle HPD polling on display pm runtime suspend/resume (Imre, Vinod) - Drop unrequired NULL checks (Apoorva, Himal) - Use separate rpm lockdep map for non-d3cold-capable devices (Thomas Hellström) - Support "nomodeset" kernel command-line option (Thomas Zimmermann) - Drop force_probe requirement for LNL and BMG (Lucas, Balasubramani) Signed-off-by: Dave Airlie <[email protected]> From: Lucas De Marchi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/wd42jsh4i3q5zlrmi2cljejohdsrqc6hvtxf76lbxsp3ibrgmz@y54fa7wwxgsd
2 parents 4f7d8da + 3adcf97 commit 8bdb468

Some content is hidden

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

87 files changed

+2271
-835
lines changed

Documentation/gpu/xe/xe_mm.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ Memory Management
77
.. kernel-doc:: drivers/gpu/drm/xe/xe_bo_doc.h
88
:doc: Buffer Objects (BO)
99

10+
GGTT
11+
====
12+
13+
.. kernel-doc:: drivers/gpu/drm/xe/xe_ggtt.c
14+
:doc: Global Graphics Translation Table (GGTT)
15+
16+
GGTT Internal API
17+
-----------------
18+
19+
.. kernel-doc:: drivers/gpu/drm/xe/xe_ggtt_types.h
20+
:internal:
21+
22+
.. kernel-doc:: drivers/gpu/drm/xe/xe_ggtt.c
23+
:internal:
24+
1025
Pagetable building
1126
==================
1227

drivers/gpu/drm/drm_print.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ void __drm_puts_coredump(struct drm_printer *p, const char *str)
100100
copy = iterator->remain;
101101

102102
/* Copy out the bit of the string that we need */
103-
memcpy(iterator->data,
104-
str + (iterator->start - iterator->offset), copy);
103+
if (iterator->data)
104+
memcpy(iterator->data,
105+
str + (iterator->start - iterator->offset), copy);
105106

106107
iterator->offset = iterator->start + copy;
107108
iterator->remain -= copy;
@@ -110,7 +111,8 @@ void __drm_puts_coredump(struct drm_printer *p, const char *str)
110111

111112
len = min_t(ssize_t, strlen(str), iterator->remain);
112113

113-
memcpy(iterator->data + pos, str, len);
114+
if (iterator->data)
115+
memcpy(iterator->data + pos, str, len);
114116

115117
iterator->offset += len;
116118
iterator->remain -= len;
@@ -140,8 +142,9 @@ void __drm_printfn_coredump(struct drm_printer *p, struct va_format *vaf)
140142
if ((iterator->offset >= iterator->start) && (len < iterator->remain)) {
141143
ssize_t pos = iterator->offset - iterator->start;
142144

143-
snprintf(((char *) iterator->data) + pos,
144-
iterator->remain, "%pV", vaf);
145+
if (iterator->data)
146+
snprintf(((char *) iterator->data) + pos,
147+
iterator->remain, "%pV", vaf);
145148

146149
iterator->offset += len;
147150
iterator->remain -= len;

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,3 +317,7 @@ void intel_dpt_destroy(struct i915_address_space *vm)
317317
i915_vm_put(&dpt->vm);
318318
}
319319

320+
u64 intel_dpt_offset(struct i915_vma *dpt_vma)
321+
{
322+
return dpt_vma->node.start;
323+
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#ifndef __INTEL_DPT_H__
77
#define __INTEL_DPT_H__
88

9+
#include <linux/types.h>
10+
911
struct drm_i915_private;
1012

1113
struct i915_address_space;
@@ -20,5 +22,6 @@ void intel_dpt_suspend(struct drm_i915_private *i915);
2022
void intel_dpt_resume(struct drm_i915_private *i915);
2123
struct i915_address_space *
2224
intel_dpt_create(struct intel_framebuffer *fb);
25+
u64 intel_dpt_offset(struct i915_vma *dpt_vma);
2326

2427
#endif /* __INTEL_DPT_H__ */

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "intel_de.h"
1515
#include "intel_display_irq.h"
1616
#include "intel_display_types.h"
17+
#include "intel_dpt.h"
1718
#include "intel_fb.h"
1819
#include "intel_fbc.h"
1920
#include "intel_frontbuffer.h"
@@ -1162,7 +1163,7 @@ static u32 skl_surf_address(const struct intel_plane_state *plane_state,
11621163
* within the DPT is always 0.
11631164
*/
11641165
drm_WARN_ON(&i915->drm, plane_state->dpt_vma &&
1165-
plane_state->dpt_vma->node.start);
1166+
intel_dpt_offset(plane_state->dpt_vma));
11661167
drm_WARN_ON(&i915->drm, offset & 0x1fffff);
11671168
return offset >> 9;
11681169
} else {

drivers/gpu/drm/xe/Makefile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ $(obj)/generated/%_wa_oob.c $(obj)/generated/%_wa_oob.h: $(obj)/xe_gen_wa_oob \
2828
xe-y += xe_bb.o \
2929
xe_bo.o \
3030
xe_bo_evict.o \
31-
xe_debugfs.o \
3231
xe_devcoredump.o \
3332
xe_device.o \
3433
xe_device_sysfs.o \
@@ -46,7 +45,6 @@ xe-y += xe_bb.o \
4645
xe_gt.o \
4746
xe_gt_ccs_mode.o \
4847
xe_gt_clock.o \
49-
xe_gt_debugfs.o \
5048
xe_gt_freq.o \
5149
xe_gt_idle.o \
5250
xe_gt_mcr.o \
@@ -59,7 +57,6 @@ xe-y += xe_bb.o \
5957
xe_guc_ads.o \
6058
xe_guc_ct.o \
6159
xe_guc_db_mgr.o \
62-
xe_guc_debugfs.o \
6360
xe_guc_hwconfig.o \
6461
xe_guc_id_mgr.o \
6562
xe_guc_klv_helpers.o \
@@ -69,9 +66,9 @@ xe-y += xe_bb.o \
6966
xe_heci_gsc.o \
7067
xe_hw_engine.o \
7168
xe_hw_engine_class_sysfs.o \
69+
xe_hw_engine_group.o \
7270
xe_hw_fence.o \
7371
xe_huc.o \
74-
xe_huc_debugfs.o \
7572
xe_irq.o \
7673
xe_lrc.o \
7774
xe_migrate.o \
@@ -107,7 +104,6 @@ xe-y += xe_bb.o \
107104
xe_ttm_vram_mgr.o \
108105
xe_tuning.o \
109106
xe_uc.o \
110-
xe_uc_debugfs.o \
111107
xe_uc_fw.o \
112108
xe_vm.o \
113109
xe_vram.o \
@@ -124,7 +120,6 @@ xe-$(CONFIG_HWMON) += xe_hwmon.o
124120
# graphics virtualization (SR-IOV) support
125121
xe-y += \
126122
xe_gt_sriov_vf.o \
127-
xe_gt_sriov_vf_debugfs.o \
128123
xe_guc_relay.o \
129124
xe_memirq.o \
130125
xe_sriov.o
@@ -133,7 +128,6 @@ xe-$(CONFIG_PCI_IOV) += \
133128
xe_gt_sriov_pf.o \
134129
xe_gt_sriov_pf_config.o \
135130
xe_gt_sriov_pf_control.o \
136-
xe_gt_sriov_pf_debugfs.o \
137131
xe_gt_sriov_pf_monitor.o \
138132
xe_gt_sriov_pf_policy.o \
139133
xe_gt_sriov_pf_service.o \
@@ -281,6 +275,16 @@ ifeq ($(CONFIG_DRM_FBDEV_EMULATION),y)
281275
endif
282276

283277
ifeq ($(CONFIG_DEBUG_FS),y)
278+
xe-y += xe_debugfs.o \
279+
xe_gt_debugfs.o \
280+
xe_gt_sriov_vf_debugfs.o \
281+
xe_gt_stats.o \
282+
xe_guc_debugfs.o \
283+
xe_huc_debugfs.o \
284+
xe_uc_debugfs.o
285+
286+
xe-$(CONFIG_PCI_IOV) += xe_gt_sriov_pf_debugfs.o
287+
284288
xe-$(CONFIG_DRM_XE_DISPLAY) += \
285289
i915-display/intel_display_debugfs.o \
286290
i915-display/intel_display_debugfs_params.o \

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ enum xe_guc_klv_ids {
351351
GUC_WORKAROUND_KLV_ID_GAM_PFQ_SHADOW_TAIL_POLLING = 0x9005,
352352
GUC_WORKAROUND_KLV_ID_DISABLE_MTP_DURING_ASYNC_COMPUTE = 0x9007,
353353
GUC_WA_KLV_NP_RD_WRITE_TO_CLEAR_RCSM_AT_CGP_LATE_RESTORE = 0x9008,
354+
GUC_WORKAROUND_KLV_ID_BACK_TO_BACK_RCS_ENGINE_RESET = 0x9009,
354355
};
355356

356357
#endif

drivers/gpu/drm/xe/compat-i915-headers/i915_vma.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
#define I915_VMA_H
88

99
#include <uapi/drm/i915_drm.h>
10-
#include <drm/drm_mm.h>
10+
11+
#include "xe_ggtt_types.h"
1112

1213
/* We don't want these from i915_drm.h in case of Xe */
1314
#undef I915_TILING_X
@@ -19,7 +20,7 @@ struct xe_bo;
1920

2021
struct i915_vma {
2122
struct xe_bo *bo, *dpt;
22-
struct drm_mm_node node;
23+
struct xe_ggtt_node *node;
2324
};
2425

2526
#define i915_ggtt_clear_scanout(bo) do { } while (0)
@@ -28,7 +29,7 @@ struct i915_vma {
2829

2930
static inline u32 i915_ggtt_offset(const struct i915_vma *vma)
3031
{
31-
return vma->node.start;
32+
return vma->node->base.start;
3233
}
3334

3435
#endif

0 commit comments

Comments
 (0)